Generates forecasts of bond yields for all model types
Usage
ForecastYields(
ModelType,
ModelPara,
InputsForOutputs,
FactorLabels,
Economies,
JLLlist = NULL,
GVARlist = NULL,
WishBRW,
BRWlist = NULL,
Folder2save = NULL,
verbose = TRUE
)
Arguments
- ModelType
A character vector indicating the model type to be estimated.
- ModelPara
A list containing the point estimates of the model parameters. For details, refer to the outputs from the
Optimization
function.- InputsForOutputs
A list containing the necessary inputs for generating IRFs, GIRFs, FEVDs, GFEVDs and Term Premia.
- FactorLabels
A list of character vectors with labels for all variables in the model.
- Economies
A character vector containing the names of the economies included in the system.
- JLLlist
A list of necessary inputs for the estimation of JLL-based models (see the
JLL
function).- GVARlist
A list containing the necessary inputs for the estimation of GVAR-based models (see the
GVAR
function).- WishBRW
Whether to estimate the physical parameter model with bias correction, based on the method by Bauer, Rudebusch and Wu (2012) (see
Bias_Correc_VAR
function). Default is set to 0.- BRWlist
List of necessary inputs for performing the bias-corrected estimation (see
Bias_Correc_VAR
function).- Folder2save
Folder path where the outputs will be stored. Default option saves the outputs in a temporary directory.
- verbose
Logical flag controlling function messaging. Default is TRUE.
Value
An object of class 'ATSMModelForecast' containing the following elements:
Out-of-sample forecasts of bond yields per forecast horizon
Out-of-sample forecast errors of bond yields per forecast horizon
Root mean square errors per forecast horizon
Examples
# \donttest{
data("ParaSetEx")
data("InpForOutEx")
# Adjust inputs according to the loaded features
ModelType <- "JPS original"
Economy <- "Brazil"
FacLab <- LabFac(N = 1, DomVar = "Eco_Act", GlobalVar = "Gl_Eco_Act", Economy, ModelType)
InpForOutEx[[ModelType]]$Forecasting <- list(WishForecast = 1, ForHoriz = 12, t0Sample = 1,
t0Forecast = 143, ForType = "Expanding")
Forecast <- ForecastYields(ModelType, ModelParaEx, InpForOutEx, FacLab, Economy,
WishBRW = 0, verbose = TRUE)
#> 4) OUT-OF-SAMPLE FORECASTING ANALYSIS
#> Out-of-sample forecast for the information set: 01-07-2006 || 01-05-2018
#> Out-of-sample forecast for the information set: 01-07-2006 || 01-06-2018
#> Out-of-sample forecast for the information set: 01-07-2006 || 01-07-2018
#> Elapsed time: 8.72 seconds
# }