I am trying to learn about volatility forecasting using three models: ARCH(1), GARCH(1, 1) and EGARCH(1, 1) using python. I wanted to know if my general procedure is correct, and specifically if my time horizon is correct (i.e. is it reasonable to use 9 years of daily stock returns data to then forecast into 3 years).
The first step of my procedure is to import the daily returns data between 1st Jan 2010 and 25th March 2022 from two stocks, using the yfinance python package. I then took the first 80% of this data and calculated logarithmic returns and used this to be the "training set", where I used Scipy's minimise function to determine the parameters for each of the models. I then used the models with the determined parameters to forecast into the remaining 20% of the returns data, which I deem the "testing set" (roughly from 2019-2022). To compare my forecasts with the "actual volatility", I calculated log returns (it_test_returns) for the testing set as well, to get the actual volatility between 2019 and 2022:
(np.sqrt(252) * it_test_returns.rolling(window=30).std())*(1/100)
And then I plotted this against my forecasts. The resulting plots do look reasonable, but I can't find much information on whether I have used enough training data to forecast three years.
arch
package for estimating and forecasting the GARCH models, then you might find some help here. My answer also provides a link to the arch documentation where the author goes through a lot of examples forecasting various GARCH models. Maybe this will provide some additional insight? $\endgroup$