ugarchfilter-methods | R Documentation |
Method for filtering a variety of univariate GARCH models.
ugarchfilter(spec, data, out.sample = 0, n.old=NULL, rec.init = 'all',
trunclag = 1000, ...)
data |
A univariate data object. Can be a numeric vector, matrix, data.frame, zoo, xts, timeSeries, ts or irts object. |
spec |
A univariate GARCH spec object of class |
out.sample |
A positive integer indicating the number of periods before the last to keep for
out of sample forecasting (as in |
n.old |
For comparison with uGARCHfit models using the out.sample argument, this is the length of the original dataset (see details). |
rec.init |
The recursion initialization method (see |
trunclag |
The truncation lags for the binomial expansion in the FIGARCH model. |
... |
For the multiplicative component sGARCH model (mcsGARCH), the additional argument ‘DailyVar’ is required and should be an xts object of the daily forecasted variance to use with the intraday data. |
The n.old argument is optional and indicates the length of the original data (in cases when this represents a series augmented by newer data). The reason for using this is so that the old and new datasets agree since the original recursion uses the sum of the residuals to start the recursion and therefore is influenced by new data. For a small augmentation the values converge after x periods, but it is sometimes preferable to have this option so that there is no forward looking information contaminating the study.
A uGARCHfilter
object containing details of the GARCH filter.
Alexios Ghalanos
For specification ugarchspec
, fitting ugarchfit
,
forecasting ugarchforecast
, simulation ugarchsim
,
rolling forecast and estimation ugarchroll
, parameter distribution
and uncertainty ugarchdistribution
, bootstrap forecast
ugarchboot
.
## Not run:
data(sp500ret)
ctrl = list(RHO = 1,DELTA = 1e-8,MAJIT = 100,MINIT = 650,TOL = 1e-6)
spec = ugarchspec(variance.model = list(model = "eGARCH", garchOrder = c(1,1)),
mean.model = list(armaOrder = c(1,1), include.mean = TRUE),
distribution.model = "std")
egarch.fit = ugarchfit(data = sp500ret[,1,drop=FALSE], spec = spec,
solver = "solnp", solver.control = ctrl)
spec = ugarchspec(variance.model = list(model = "eGARCH", garchOrder = c(1,1)),
mean.model = list(armaOrder = c(1,1), include.mean = TRUE),
distribution.model = "std", fixed.pars = as.list(coef(egarch.fit)))
egarch.filter = ugarchfilter(data = sp500ret[,1,drop=FALSE], spec = spec)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.