OK, so in this lecture, we will be looking at another Gargash model, this time with more lag's.
So you can see that I've set P to eight and cute's of five, although you can feel free to choose other
values if you like.
Again, we're going to use the T distribution since we've seen that it works well with only one extra
parameter.
The next step is to call a Fed function.
The next step is to call summary.
So as you can see, the log likelihood has improved slightly as an exercise, if you've forgotten what
the previous values were, print them out in this notebook to check them yourself.
Now, interestingly, when we look at the large coefficients, we see that many of them do not have
significant P values.
So you might assume that because I regard SPQR model has a better log likelihood that this is our best
choice.
However, recall that statisticians prefer to use the AIC.
So the next step is to check the AIC for each of our models.
So as you can see, the arch one is by far the worst gurche one, one normal was a significant improvement,
but one one t improves the AIC even more.
In this case, we would reject the Garchik five, since that gives us a worse EIC.
The next step is to save the condition of volatility in our data frame DRV, to also plot the guards
Bhiku against the guards one on one TE.
So as you can see, they are very close.
The next step is to create a forecast again, we'll start at the same date as before.
The next step is to store the forecast using the column name Garchik you forecast.
The next step is to plot the forecast against our best models so far, the March one won T.
OK, so as you can see, they're essentially indistinguishable, so just in terms of this, there would
be no advantage to using the guards PKU.
The next step is to plot the forecast for the test set, which you may have noticed we haven't yet done,
we'll do this using the Q only because it's the last model we created.
So we'll start by creating trainer and test 3x the same way we've done in the past.
The next step is to store the train predictions using the conditional volatility.
We'll also store the test predictions using the square root of the variance of the forecasts.
The final step will be to plot our train and test predictions.
So as expected for the test set, the forecast of the variance simply converges to the unconditional
value.
The actual long term variance, of course, does not follow this pattern.
However, the prediction seems to be somewhere in the middle below the highest values, but above the
lowest values.
As mentioned in the previous lectures, we don't expect any model to predict random volatility fluctuations
several years ahead.
It simply wouldn't make sense.