Closed Vasudeva-bit closed 11 months ago
You are seeing constant values because for a constant mean and you are seeing the mean forecasts (which are by construction constant). If you want to look at the forecast variances, you should look at the variances
attribute.
In your case:
You are looking at the wrong value. result.variance
is what you want.
print(result.variance.values[-1])
[530.57831213 534.01591322 537.4535143 540.89111539 544.32871648]
Or in a more traditional dataset:
from arch.data import sp500
y = sp500.load()["Adj Close"].pct_change().dropna()
model = arch_model(y, rescale=True)
model = model.fit(disp='off')
result = model.forecast(horizon=5)
print(result.variance)
h.1 h.2 h.3 h.4 h.5
Date
2018-12-31 3.59647 3.568502 3.540887 3.513621 3.486701
Oh! Thanks for clarification.
The
arch_model
estimator fromarch
is forecasting same value irrespective of thehorizon
parameter.Output
[20.2404549 20.2404549 20.2404549 20.2404549 20.2404549]