Description Usage Arguments Details Value Author(s) See Also Examples
Method for filtering a variety of univariate GARCH models.
1 | ugarchfilter(spec, data, out.sample = 0, n.old=NULL, ...)
|
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). |
... |
. |
The n.old argument is optional and indicates the length of the original dataseries (in cases when this represents a dataseries 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
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## 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.