Reputation: 490
I'm trying to forecast some measure of weight using SARIMAX. The model fits the data quite well, but when it comes to forecasting it's not doing what I expected. In the image below you can see my data has a seasonal component right around December. But when I forecast into December the line remains flat. I guess I expected it to model this trend as I added a season component. Is this expectation incorrect or am I doing something wrong? My code is below the image. Thanks for your help!
# Model
model = SARIMAX(sum_all_model,order=(0,1,2),seasonal_order=(2,0,2,12))
results = model.fit()
# Forecasting
forecast = results.forecast(100)
Upvotes: 1
Views: 1847
Reputation: 3195
One issue is that the last argument of the seasonal_period
gives the number of periods in a season, and this is relative to the frequency of the input data.
It looks like your input data is maybe daily, so by setting the seasonal period to 12, you're saying that the season repeats every 12 days, not every 12 months.
Two notes:
Upvotes: 2