-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
volatility forecast in comparison with realized volatility #701
Comments
Could you post more of your code? I isn't clear what |
resid_predict = return[-splitDate: ] - ARIMA_model.predict (start=splitDate, end=end_date) y= pd.concat ([ ARIMA_model.resid.dropna() , resid_predict ]) model_set= arch_model(y=y, mean = 'zero', vol= 'GARCH', dist='t', p=1 , o=0, q=1) result= model_set.fit(disp = 'off', last_obs=splitDate) frcst = result.forecast(horizon=1, start=splitDate, method="simulation", simulations=30 *50) fig, ax = plt.subplots(figsize= (12,6)) if I set (7,7) for orders of GARCH then: |
I'm trying to model returns with an ARIMA-GARCH. when I compare one step forecasts for 30 days (of test set) with realized volatility, I find there is a drift between two line-plot:
frcst = result.forecast(horizon=1, start=splitDate, method="simulation", simulations=30 *50)
frcst_variance=frcst.variance .squeeze()
realized_volatility= realized_volatility(n_period=30)
fig, ax = plt.subplots(figsize= (12,6))
ax.plot(np.sqrt(frcst_variance.sort_index()), "red" ,realized_volatility.sort_index(), "blue",linewidth =0.5)
it sounds the forecast is accurate unless the drift which has occurred. why this has occurred?
The text was updated successfully, but these errors were encountered: