Returns the rolling percentage change of the series.
Parameters: | series : {TimeSeries}
nper : {int}
|
---|
Notes
Series of integer types will be upcast 1.0 == 100% in result
Examples
>>> series = ts.time_series(
... [2.,1.,2.,3.], start_date=ts.Date(freq='A', year=2005))
>>> series.pct()
timeseries([-- -0.5 1.0 0.5],
dates = [2005 ... 2008],
freq = A-DEC)
>>> series.pct(2)
timeseries([-- -- 0.0 2.0],
dates = [2005 ... 2008],
freq = A-DEC)