I'm trying to perform the MCS test using the R-package "MCS" to compare GARCH-MIDAS Models. The loss function requires as inputs a vector with some realized volatility measure ˜ σt+1 (I chose the squared returns) and a matrix of volatility forecasts ˆ σt+1 ( using GARCH Midas models).
I Don't know how to compute these vectors :
1/ As a vector of realized volatility, I wrote " vol<-(returns)^2" but I rather need a "one-step-ahead" realized volatility (˜ σt+1 ), as follows :
2/ Since the output from models estimation (using package "mfGARCH")consisted in parameter estimates, I don't know how to get the one-step-ahead volatility forcasts.
Could anyone provide some R code to help?