This function estimates a multiplicative mixed-frequency GARCH model. For the sake of numerical stability, it is best to multiply log returns by 100.
fit_mfgarch(
data,
y,
x = NULL,
K = NULL,
low.freq = "date",
var.ratio.freq = NULL,
gamma = TRUE,
weighting = "beta.restricted",
x.two = NULL,
K.two = NULL,
low.freq.two = NULL,
weighting.two = NULL,
multi.start = FALSE,
control = list(par.start = NULL)
)data frame containing a column named date of type 'Date'.
name of high frequency dependent variable in df.
covariate employed in mfGARCH.
an integer specifying lag length K in the long-term component.
a string of the low frequency variable in the df.
specify a frequency column on which the variance ratio should be calculated.
if TRUE, an asymmetric GJR-GARCH is used as the short-term component. If FALSE, a simple GARCH(1,1) is employed.
specifies the weighting scheme employed in the long-term component. Options are "beta.restricted" (default) or "beta.unrestricted"
optional second covariate
lag lgenth of optional second covariate
low frequency of optional second covariate
specifies the weighting scheme employed in the optional second long-term component. Currently, the only option is "beta.restricted"
if TRUE, optimization is carried out with multiple starting values
a list
A list of class mfGARCH with letters and numbers.
par - vector of estimated parameters
rob.std.err - sandwich/HAC-type standard errors
broom.mgarch - a broom-like data.frame with entries 1) estimate: column of estimated parameters 2) rob.std.err - sandwich/HAC-type standard errors 3) p.value - p-values derived from sandwich/HAC-type standard errors 4) opg.std.err - Bollerslev-Wooldrige/OPG standard errors for GARCH processes 5) opg.p.value - corresponding alternative p-values
tau - fitted long-term component
g - fitted short-term component
df.fitted - data frame with fitted values and residuals
K - chosen lag-length in the long-term component
weighting.scheme - chosen weighting scheme
llh - log-likelihood value at estimated parameter vector
bic - corresponding BIC value
y - dependent variable y
optim - output of the optimization routine
K.two - lag-lenth of x.two if two covariates are employed
weighting.scheme.two - chosen weighting scheme of x.two (if K.two != NULL)
tau.forecast - one-step ahead forecast of the long-term component
variance.ratio - calculated variance ratio
est.weighting - estimated weighting scheme
est.weighting.two - estimated weighting scheme of x.two (if K.two != NULL)
# NOT RUN {
fit_mfgarch(data = df_financial, y = "return", x = "nfci", low.freq = "week", K = 52)
fit_mfgarch(data = df_mfgarch, y = "return", x = "nfci", low.freq = "year_week", K = 52,
x.two = "dindpro", K.two = 12, low.freq.two = "year_month", weighting.two = "beta.restricted")
# }
Run the code above in your browser using DataLab