Fit any of the additional short- or long-memory GARCH-type
models from the fEGarch
package aside from those
of the extended EGARCH family.
garchm_estim(
rt,
model = c("garch", "gjrgarch", "tgarch", "aparch", "figarch", "figjrgarch", "fitgarch",
"fiaparch"),
orders = c(1, 1),
cond_dist = c("norm", "std", "ged", "ald", "snorm", "sstd", "sged", "sald"),
drange = c(0, 1),
meanspec = mean_spec(),
Drange = c(0, 1),
nonparspec = locpol_spec(),
use_nonpar = FALSE,
n_test = 0,
start_pars = NULL,
LB = NULL,
UB = NULL,
control = list(),
control_nonpar = list(),
mean_after_nonpar = FALSE,
parallel = TRUE,
ncores = max(1, future::availableCores() - 1),
trunc = "none",
presample = 50,
Prange = c(1, 5)
)
An object of S4-class "fEGarch_fit_garch"
, "fEGarch_fit_gjrgarch"
,
"fEGarch_fit_tgarch"
,
"fEGarch_fit_aparch"
, "fEGarch_fit_figarch"
, "fEGarch_fit_figjrgarch"
,
"fEGarch_fit_fitgarch"
or "fEGarch_fit_fiaparch"
is returned depending on the selected input for the argument
model
. The object then contains the following elements.
pars
:a named numeric vector with the parameter estimates.
se
:a named numeric vector with the obtained standard errors in accordance with the parameter estimates.
vcov_mat
:the variance-covariance matrix of the parameter estimates with named columns and rows.
rt
:the input object rt
(or at least the training data, if n_test
is greater than zero);
if rt
was a "zoo"
or "ts"
object, the formatting is kept.
cmeans
:the estimated conditional means; if rt
was a "zoo"
or "ts"
object, the formatting is also applied to cmeans
.
sigt
:the estimated conditional standard deviations (or for use_nonpar = TRUE
the estimated total
volatilities, i.e. scale function value times conditional standard deviation); if rt
was a "zoo"
or "ts"
object, the formatting is also applied to sigt
.
etat
:the obtained residuals; if rt
was a "zoo"
or "ts"
object, the formatting is also applied to etat
.
orders
:a two-element numeric vector stating the considered model orders.
cond_dist
:a character value stating the conditional distribution considered in the model fitting.
long_memo
:a logical value stating whether or not long memory was considered in the model fitting.
llhood
:the log-likelihood value obtained at the optimal parameter combination.
inf_criteria
:a named two-element numeric vector with the corresponding AIC (first element) and BIC (second element) of the fitted parametric model part; for purely parametric models, these criteria are valid for the entire model; for semiparametric models, they are only valid for the parametric step and are not valid for the entire model.
meanspec
:the settings for the model in the conditional mean; is an object
of class "mean_spec"
that is identical to the object passed to the input argument
meanspec
.
test_obs
:the observations at the end up the input rt
reserved for
testing following n_test
.
scale_fun
:the estimated scale function values, if use_nonpar = TRUE
, otherwise
NULL
; formatting of rt
is reused.
nonpar_model
:the estimation object returned by tsmooth
or tsmoothlm
for
use_nonpar = TRUE
.
trunc
:the input argument trunc
.
the observed series ordered from past to present; can be
a numeric vector, a "zoo"
class time series object, or a
"ts"
class time series object.
any character object among "garch"
, "gjrgarch"
,
"aparch"
, "tgarch"
, "figarch"
, "figjrgarch"
,
"fitgarch"
and "fiaparch"
.
a two-element numeric vector containing the two model
orders \(p\) and \(q\) (see Details for more information); currently,
only the default orders = c(1, 1)
is supported for long-memory
models; other specifications
of a two-element numeric vector will lead to orders = c(1, 1)
being
run and a warning message being returned for long-memory models.
the conditional distribution to consider as a
character object; the default is a conditional normal distribution
"norm"
; available are also, however, a \(t\)-distribution
("std"
), a generalized error distribution ("ged"
), an
average Laplace distribution ("ald"
),
and their four skewed variants ("snorm"
, "sstd"
,
"sged"
, "sald"
).
a two-element numeric vector that gives the boundaries of the
search interval for the fractional differencing parameter \(d\) in the
conditional volatility model part of a long-memory model; is
overwritten by the settings of the arguments LB
and UB
.
an object of class "mean_spec"; indicates the specifications for the model in the conditional mean.
a two-element numeric vector that indicates the boundaries
of the interval over which to search for the fractional differencing
parameter \(D\) in a long-memory ARMA-type model in the conditional
mean model part; by default,
\(D\) being searched for on the
interval from 0 to \(0.5 - 1\times 10^{-6}\); note that specific
settings in the arguments
LB
and UB
overwrite this argument.
an object of class "locpol_spec"
returned
by locpol_spec
; defines the settings of the nonparametric
smoothing technique for use_nonpar = TRUE
.
a logical indicating whether or not to implement a
semiparametric extension of the volatility model defined through spec
;
see "Details" for more information.
a single numerical value indicating, how many observations
at the end of rt
not to include in the fitting process and to
reserve for backtesting.
the starting parameters for the numerical optimization
routine; should be of the same length as the parameter output vector
within the output object (also keeping the same order); for NULL
,
an internally saved default set of values is used; elements should be set with respect to a series rescaled
to have sample variance one.
the lower boundaries of the parameters in the numerical optimization
routine; should be of the same length as the parameter output vector
within the output object (also keeping the same order); for NULL
,
an internally saved default set of values is used; elements should be set with respect to a series rescaled
to have sample variance one.
the upper boundaries of the parameters in the numerical optimization
routine; should be of the same length as the parameter output vector
within the output object (also keeping the same order); for NULL
,
an internally saved default set of values is used; elements should be set with respect to a series rescaled
to have sample variance one.
a list that is passed to control
of the
function solnp
of the package Rsolnp
.
a list containing changes to the arguments
for the hyperparameter estimation algorithm in the nonparametric
scale function estimation for
use_nonpar = TRUE
; see "Details" for more information.
only for use_nonpar = TRUE
; considers the unconditional mean
of the parametric model part in the QMLE step in a semiparametric model; by default, a zero-mean
model is considered for the parametric part in a semiparametric model.
only relevant for a (skewed) average Laplace (AL)
distribution, i.e.
if cond_dist
in spec
is set to cond_dist = "ald"
or
cond_dist = "sald"
; parallel
is a logical value indicating whether
or not the slices for the positive integer-valued parameter of the SM
distribution should be fitted in parallel for a speed boost.
only relevant for a (skewed) average Laplace (AL)
distribution, i.e.
if cond_dist
in spec
is set to cond_dist = "ald"
or
cond_dist = "sald"
, and if simultaneously parallel = TRUE
;
ncores
is a single numeric value indicating the number of cores to
use for parallel computations.
a positive integer indicating the finite truncation length of the
infinite-order polynomials of the infinite-order representations of the
long-memory model parts; the character "none"
is an optional input
that specifies that truncation should always be applied back to the first (presample) observation
time point, i.e. that maximum length filters should be applied at all times.
the presample length for initialization (for extended EGARCH- / Log-GARCH-type models only relevant for the FARIMA-part, as series in log-transformed conditional variance are initialized by zero).
a two-element vector that indicates the search boundaries for the parameter \(P\) in a (skewed) average Laplace distribution.
See the documentation on garch
, gjrgarch
,
tgarch
, aparch
, figarch
,
figjrgarch
, fitgarch
and fiaparch
for more detailed
information on the corresponding models and functions selectable through this
wrapper function.
window.zoo <- get("window.zoo", envir = asNamespace("zoo"))
rt <- window.zoo(SP500, end = "2002-12-31")
model <- garchm_estim(rt, model = "garch")
model
Run the code above in your browser using DataLab