I am currently facing a problem with my GARCH model, specifically with the forecasted results. It appears that all the forecasted values are turning out to be identical, which leads me to suspect that these results are inaccurate. I would greatly appreciate any suggestions or guidance on how to resolve this issue.
In order to demonstrate the problem more clearly, I have prepared a simple example where I encountered the same issue—finding that the forecasted values are all the same.
Thank you in advance for your assistance, and I look forward to any insights or recommendations you can provide to address this matter.
EXAMPLE:
datos=[3.4, 5,7, 6.3, 4.5, 3.2, 3.8, 6.7]
Define the GARCH model
model = arch_model(datos, vol='Garch', p=1, q=1)
Fit the GARCH model
result = model.fit()
Print model summary
print(result.summary())
Fit the model
resultado = model.fit()
Print the model summary
print(resultado.summary())
Forecast future observations
forecast_horizon = 10 # Specify the number of periods to forecast
forecasts = resultado.forecast(start=0, horizon=forecast_horizon)
Extract the forecasted values
forecasted_values = forecasts.mean[-1:].values.flatten()
print("Forecasted Values:")
print(forecasted_values)
Forecasted Values:
[4.98545041 4.98545041 4.98545041 4.98545041 4.98545041 4.98545041
4.98545041 4.98545041 4.98545041 4.98545041]
arch_modelfunction you're using can be found. But, I would expect its default to have a constant mean, which is consistent with what you're showing here, and not an error. You should know that, generally, the point of GARCH itself is to model time-varying volatility (i.e. the spread around the mean value), not so much to try to capture complex dynamics in the mean (although, there are commonly used extensions, like ARMA-GARCH, that try to do both). – Chris Haug Jun 25 '23 at 16:02