Forecast with multivariate GAS models. One-step ahead prediction of the conditional density is available in closed form. Multistep ahead prediction are performed by simulation as detailed in Blasques et al. (2016).
MultiGASFor(mGASFit, H =NULL, Roll =FALSE, out =NULL, B =10000, Bands = c(0.1,0.15,0.85,0.9), ReturnDraws =FALSE)
Arguments
mGASFit: An object of the class mGASFit created using the function MultiGASFit
H: numeric Forecast horizon. Ignored if Roll = TRUE
Roll: logical Forecast should be made using a rolling procedure ? Note that if Roll = TRUE, then out has to be specified.
out: matrix of out of sample observation of dimension H x N for rolling forecast. N refers to the cross sectional dimension.
B: numeric Number of draws from the iH-step ahead distribution if Roll = FALSE.
Bands: numeric Vector of probabilities representing the confidence band levels for multistep ahead parameters forecasts. Only if Roll = FALSE.
ReturnDraws: logical Return the draws from the multistep ahead predictive distribution when Roll = FALSE ?
Returns
An object of the class mGASFor
References
Blasques F, Koopman SJ, Lasak K, and Lucas, A (2016). "In-sample Confidence Bands and Out-of-Sample Forecast Bands for Time-Varying Parameters in Observation-Driven Models." International Journal of Forecasting, 32(3), 875-887. tools:::Rd_expr_doi("10.1016/j.ijforecast.2016.04.002") .
Author(s)
Leopoldo Catania
Examples
## Not run:# Specify a GAS model with multivatiate Student-t conditional# distribution and time-varying scales and correlations.# Stock returns forecastset.seed(123)data("StockIndices")mY = StockIndices[,1:2]# Specification mvtGASSpec = MultiGASSpec(Dist ="mvt", ScalingType ="Identity", GASPar = list(location =FALSE, scale =TRUE, correlation =TRUE, shape =FALSE))# Perform H-step ahead forecast with confidence bands# EstimationFit = MultiGASFit(GASSpec, mY)# ForecastForecast = MultiGASFor(Fit, H =50)
Forecast
# Perform 1-Step ahead rolling forecastInSampleData = mY[1:1000,]OutSampleData = mY[1001:2404,]# EstimationFit = MultiGASFit(GASSpec, InSampleData)Forecast = MultiGASFor(Fit, Roll =TRUE, out = OutSampleData)
Forecast
## End(Not run)