View source: R/ForecastYields.R
| ForecastYields | R Documentation |
Generates forecasts of bond yields for all model types
ForecastYields(
ModelType,
ModelPara,
InputsForOutputs,
FactorLabels,
Economies,
JLLlist = NULL,
GVARlist = NULL,
WishBRW = FALSE,
BRWlist = NULL,
Folder2save = NULL,
verbose = TRUE
)
ModelType |
character. Model type to be estimated. Permissible choices: "JPS original", "JPS global", "GVAR single", "JPS multi", "GVAR multi", "JLL original", "JLL No DomUnit", "JLL joint Sigma". |
ModelPara |
list. Point estimates of the model parameters. See outputs from |
InputsForOutputs |
list. Inputs for generating IRFs, GIRFs, FEVDs, GFEVDs, and Term Premia. |
FactorLabels |
list. Labels for all variables present in the model, as returned by |
Economies |
character vector. Names of the |
JLLlist |
list. Inputs for JLL model estimation (see |
GVARlist |
list. Inputs for GVAR model estimation (see |
WishBRW |
logical. Whether to estimate the physical parameter model with bias correction (see |
BRWlist |
list. Inputs for bias-corrected estimation (see |
Folder2save |
character. Folder path where outputs will be stored. Default saves outputs in a temporary directory. |
verbose |
logical. Print progress messages. Default is TRUE. |
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
InputsForOutputs input)ForHoriz: forecast horizon. Must be a positive integer.
t0Sample: initial sample date. Must be a positive integer smaller than the time series dimension of the model (Td)
t0Forecast: last sample date for the first forecast. Note that Td > t0Forecast + ForHoriz.
ForType: "Rolling" (rolling window forecast) or "Expanding" (for expanding window forecast)
- 'plot(object)'
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)
# Adjust Forecasting setting
InpForOutEx[[ModelType]]$Forecasting <- list(
WishForecast = 1, ForHoriz = 12, t0Sample = 1,
t0Forecast = 143, ForType = "Expanding"
)
Forecast <- ForecastYields(ModelType, ParaSetEx, InpForOutEx, FacLab, Economy,
WishBRW = FALSE, verbose = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.