garch {bayesforecast} | R Documentation |
A constructor for a GARCH(s,k,h) model.
Description
Constructor of the GARCH(s,k,h)
object for Bayesian estimation in Stan.
Usage
garch(ts,order = c(1,1,0),arma = c(0,0),xreg = NULL,
genT = FALSE,asym = "none",series.name = NULL)
Arguments
ts |
a numeric or ts object with the univariate time series. |
order |
A specification of the garch model: the three components (s, k, h) are the arch order, the garch order, and the mgarch order. |
arma |
A specification of the ARMA model,same as order parameter: the two components (p, q) are the AR order,and the MA order. |
xreg |
Optionally, a numerical matrix of external regressors, which must have the same number of rows as ts. It should not be a data frame. |
genT |
a boolean value to specify for a generalized t-student garch model. |
asym |
a string value for the asymmetric function for an asymmetric GARCH process. By default
the value |
series.name |
an optional string vector with the time series names. |
Details
The function returns a list with the data for running stan()
function of
rstan package.
By default the garch()
function generates a GARCH(1,1) model, when
genT
option is TRUE
a t-student innovations GARCH model
(see Ardia (2010)) is generated, and for Asymmetric GARCH models use the
option asym
for specify the asymmetric function, see Fonseca,
et. al (2019) for more details.
The default priors used in a GARCH(s,k,h) model are:
ar ~ normal(0,0.5)
ma ~ normal(0,0.5)
mu0 ~ t-student(0,2.5,6)
sigma0 ~ t-student(0,1,7)
arch ~ normal(0,0.5)
garch ~ normal(0,0.5)
mgarch ~ normal(0,0.5)
dfv ~ gamma(2,0.1)
breg ~ t-student(0,2.5,6)
For changing the default prior use the function set_prior()
.
Value
The function returns a list with the data for running stan()
function of
rstan package.
Author(s)
Asael Alonzo Matamoros.
References
Engle, R. (1982). Autoregressive Conditional Heteroscedasticity with Estimates of
the Variance of United Kingdom Inflation. Econometrica, 50(4), 987-1007.
url: http://www.jstor.org/stable/1912773
.
Bollerslev, T. (1986). Generalized autoregressive conditional heteroskedasticity.
Journal of Econometrics. 31(3), 307-327.
doi: https://doi.org/10.1016/0304-4076(86)90063-1
.
Fonseca, T. and Cequeira, V. and Migon, H. and Torres, C. (2019). The effects of
degrees of freedom estimation in the Asymmetric GARCH model with Student-t
Innovations. arXiv doi: arXiv: 1910.01398
.
Ardia, D. and Hoogerheide, L. (2010). Bayesian Estimation of the GARCH(1,1) Model
with Student-t Innovations. The R Journal. 2(7), 41-47.
doi: 10.32614/RJ-2010-014
.
See Also
Examples
# Declaring a garch(1,1) model for the ipc data.
dat = garch(ipc,order = c(1,1,0))
dat
# Declaring a t-student M-GARCH(2,3,1)-ARMA(1,1) process for the ipc data.
dat = garch(ipc,order = c(2,3,1),arma = c(1,1),genT = TRUE)
dat
# Declaring a logistic Asymmetric GARCH(1,1) process.
dat = garch(ipc,order = c(1,1,0),asym = "logit")
dat