statsmodels.tsa.deterministic.Fourier¶
-
class
statsmodels.tsa.deterministic.
Fourier
(period: float, order: int)[source]¶ Fourier series deterministic terms
- Parameters
Notes
Both a sine and a cosine term are included for each i=1, …, order
fi,s,t=sin(2πi×tm)fi,c,t=cos(2πi×tm)where m is the length of the period.
Examples
Solar data has an 11-year cycle
>>> from statsmodels.datasets import sunspots >>> from statsmodels.tsa.deterministic import Seasonality >>> data = sunspots.load_pandas().data >>> fourier_gen = Fourier(11, order=2) >>> fourier_gen.in_sample(data.index)
- Attributes
Methods
in_sample
(index)Produce deterministic trends for in-sample fitting.
out_of_sample
(steps, index[, forecast_index])Produce deterministic trends for out-of-sample forecasts
Methods
in_sample
(index)Produce deterministic trends for in-sample fitting.
out_of_sample
(steps, index[, forecast_index])Produce deterministic trends for out-of-sample forecasts
Properties
Flag indicating whether the values produced are dummy variables
The order of the Fourier terms included
The period of the Fourier terms