Learn R Programming

GAS (version 0.1.1)

MultiGASFor: Forecast with multivariate GAS models

Description

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).

Usage

MultiGASFor(mGASFit, H, 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
boolean 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 = TRUE.
Bands
numeric Vector of probabilities representing the confidence band levels for multistep ahead parameters forecasts. Only if Roll = TRUE.
ReturnDraws
boolean Return the draws from the multistep ahead predictive distribution when Roll = TRUE ?

Value

An object of the class mGASFor

References

Blasques, F., Koopman, S. J., Lasak, K., & 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.

Examples

Run this code
## Not run: 
# # Specify a GAS model with multivatiate  Student-t conditional
# # distribution and time-varying scales and correlations.
# 
# # Stock returns forecast
# 
# data("StockIndices")
# 
# mY = StockIndices[, 1:2]
# 
# ## Specification mvt
# GASSpec = MultiGASSpec(Dist = "mvt", ScalingType = "Identity",
#                        GASPar = list(location = FALSE, scale = TRUE,
#                                      correlation = TRUE, shape = FALSE))
# 
# # Perform H-step ahead forecast with confidence bands
# 
# # estimation
# Fit = MultiGASFit(GASSpec, mY)
# 
# #forecast
# 
# Forecast  = MultiGASFor(Fit, H = 50)
# 
# Forecast
# 
# # Perform 1-Step ahead rolling forecast
# 
# InSampleData  = mY[1:1000, ]
# OutSampleData = mY[1001:2404, ]
# 
# # estimation
# Fit = MultiGASFit(GASSpec, InSampleData)
# 
# Forecast  = MultiGASFor(Fit, Roll = TRUE, out = OutSampleData)
# 
# Forecast
# ## End(Not run)

Run the code above in your browser using DataLab