Learn R Programming

MultiATSM (version 1.4.0)

ForecastYields: Generates forecasts of bond yields for all model types

Description

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
)

Value

An object of class 'ATSMModelForecast' containing the following elements:

  1. Out-of-sample forecasts of bond yields per forecast horizon

  2. Out-of-sample forecast errors of bond yields per forecast horizon

  3. Root mean square errors per forecast horizon

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.

Available Methods

- `plot(object)`

Examples

Run this code
# \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)
# }

Run the code above in your browser using DataLab