garch | R Documentation |
Constructor of the GARCH(s,k,h)
object for Bayesian estimation in Stan.
garch(
ts,
order = c(1, 1, 0),
arma = c(0, 0),
xreg = NULL,
genT = FALSE,
asym = "none",
series.name = NULL
)
ts |
a numeric or ts object with the univariate time series. |
order |
a three length vector, with the GARCH model specification: the
three components |
arma |
a two length vector with the ARMA model specification, similar to the
|
xreg |
Optionally, a numerical matrix of external regressors,
which must have the same number of rows as |
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. |
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()
.
The function returns a list with the data for running stan()
function of rstan package.
Asael Alonzo Matamoros.
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
.
Sarima
auto.arima
set_prior
# 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.