Returns a series of the same size as series, with the same start_date and end_date, but values shifted by nper.
Parameters: | series : TimeSeries
nper : int
copy : {True, False}, optional
|
---|
Examples
>>> series = time_series([0,1,2,3], start_date=Date(freq='A', year=2005))
>>> series
timeseries(data = [0 1 2 3],
dates = [2005 ... 2008],
freq = A-DEC)
>>> tshift(series, -1)
timeseries(data = [-- 0 1 2],
dates = [2005 ... 2008],
freq = A-DEC)
>>> pct_change = 100 * (series/series.tshift(-1, copy=False) - 1)