| InputsForOpt | R Documentation |
Generates inputs necessary to build the likelihood function for the ATSM model
InputsForOpt(
InitialSampleDate,
FinalSampleDate,
ModelType,
Yields,
GlobalMacro,
DomMacro,
FactorLabels,
Economies,
DataFrequency,
GVARlist = NULL,
JLLlist = NULL,
WishBRW = FALSE,
BRWlist = NULL,
UnitYields = "Month",
CheckInputs = TRUE,
BS_Adj = FALSE,
verbose = TRUE
)
InitialSampleDate |
Start date of the sample period in the format "dd-mm-yyyy" |
FinalSampleDate |
End date of the sample period in the format "dd-mm-yyyy" |
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". |
Yields |
numerical matrix with time series of yields ( |
GlobalMacro |
numerical matrix with time series of the global risk factors ( |
DomMacro |
numerical matrix with time series of the country-specific risk factors for all |
FactorLabels |
list. Labels for all variables present in the model, as returned by |
Economies |
character vector. Names of the |
DataFrequency |
character. Data frequency. Permissible choices: "Daily All Days", "Daily Business Days", "Weekly", "Monthly", "Quarterly", "Annually". |
GVARlist |
list. Inputs for GVAR model estimation. See details below. |
JLLlist |
list. Inputs for JLL model estimation. See details below. |
WishBRW |
logical. Whether to estimate the physical parameter model with bias correction (see |
BRWlist |
list. Inputs for bias-corrected estimation. |
UnitYields |
character. Maturity unit of yields. Permissible choices: "Month" or "Year". Default is "Month". |
CheckInputs |
logical. Whether to perform a prior check on the consistency of the provided input list. Default is TRUE. |
BS_Adj |
logical. Whether to adjust the global series for the sepQ models in the Bootstrap setting. Default is FALSE. |
verbose |
logical. Print progress messages. Default is TRUE. |
An object of class 'ATSMModelInputs' containing the necessary inputs for performing the model optimization.
VARXtype: "unconstrained" or "constrained"
W_type: "Time-varying" or "Sample Mean"
t_First_Wgvar, t_Last_Wgvar: year as character
DomUnit: name of the dominant economy or None
WishSigmas: TRUE (estimate variance-covariance matrices) or FALSE
SigmaNonOrtho: NULL or K x K matrix
BiasCorrection: TRUE (bias-corrected) or FALSE
flag_mean: TRUE (mean) or FALSE (median)
gamma: numeric adjustment parameter
N_iter: number of iterations
N_burn: number of burn-in iterations
B: number of bootstrap samples
checkBRW: TRUE or FALSE
B_check: number of bootstrap samples for closeness check
Td model time series dimension.
C number of countries in the system.
G number of global unspanned factors.
M number of country-specific unspanned factors.
K total number of risk factors.
J number of bond yields per country used in estimation.
- 'print(object)' - 'summary(object)'
# Example 1:
data(GlobalMacro)
data(DomMacro)
data(Yields)
ModelType <- "JPS original"
Economies <- "Mexico"
t0 <- "01-05-2007" # Initial Sample Date (Format: "dd-mm-yyyy")
tF <- "01-12-2018" # Final Sample Date (Format: "dd-mm-yyyy")
N <- 3
GlobalVar <- c("Gl_Eco_Act") # Global Variables
DomVar <- c("Eco_Act") # Domestic Variables
FactorLabels <- LabFac(N, DomVar, GlobalVar, Economies, ModelType)
DataFreq <- "Monthly"
ATSMInputs <- InputsForOpt(t0, tF, ModelType, Yields, GlobalMacro, DomMacro,
FactorLabels, Economies, DataFreq,
CheckInputs = FALSE, verbose = FALSE
)
# Example 2:
LoadData("CM_2024")
ModelType <- "GVAR multi"
Economies <- c("China", "Brazil", "Mexico", "Uruguay")
t0 <- "01-05-2007" # InitialSampleDate (Format: "dd-mm-yyyy")
tF <- "01-12-2019" # FinalSampleDate (Format: "dd-mm-yyyy")
N <- 2
GlobalVar <- c("Gl_Eco_Act", "Gl_Inflation") # Global Variables
DomVar <- c("Inflation") # Domestic Variables
FactorLabels <- LabFac(N, DomVar, GlobalVar, Economies, ModelType)
DataFreq <- "Monthly"
GVARlist <- list(
VARXtype = "unconstrained", W_type = "Sample Mean",
t_First_Wgvar = "2007", t_Last_Wgvar = "2019", DataConnectedness = TradeFlows
)
ATSMInputs <- InputsForOpt(t0, tF, ModelType, Yields, GlobalMacro, DomMacro,
FactorLabels, Economies, DataFreq, GVARlist,
CheckInputs = FALSE, verbose = FALSE
)
# Example 3:
LoadData("CM_2024")
ModelType <- "JLL original"
Economies <- c("China", "Brazil", "Uruguay")
t0 <- "01-05-2007" # InitialSampleDate (Format: "dd-mm-yyyy")
tF <- "01-12-2019" # FinalSampleDate (Format: "dd-mm-yyyy")
N <- 2
GlobalVar <- c("Gl_Eco_Act", "Gl_Inflation") # Global Variables
DomVar <- c("Eco_Act", "Inflation") # Domestic Variables
FactorLabels <- LabFac(N, DomVar, GlobalVar, Economies, ModelType)
JLLinputs <- list(DomUnit = "China")
DataFrequency <- "Monthly"
ATSMInputs <- InputsForOpt(t0, tF, ModelType, Yields, GlobalMacro, DomMacro,
FactorLabels, Economies, DataFreq,
JLLlist = JLLinputs,
CheckInputs = FALSE, verbose = FALSE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.