I have been attempting to run a rolling GARCH model that predicts variance without much success, and so assistance would be much appreciated. My most recent attempts to get the model working have resulted in variance predictions that are constant throughout the prediction period, and thus my attempt at rolling clearly has worked. Please find below my code:
Code:
// Generate empty variables to fill gen t4=_n gen testing4 = . // Rolling Window of 200 obervations until the 500th observation quietly forvalues Date = 200/500 { if insample ==0 arch Returns, arch(1) garch(1) //Predict the variance and fill in empty variable predict Yhat if t4==`Date', variance replace testing4 = Yhat if t4==`Date' drop Yhat }
Overall the purpose of this code is for a project that tests the implications of changing the size of the estimation window on the accuracy of variance predictions.
Kind regards,
Connor
0 Response to Rolling regression GARCH volatility prediction
Post a Comment