Description Usage Arguments Details Value Methods Examples
A method for generating forecast performance measures from a forecasted object
of class uGARCHforecast
or ARFIMAforecast
subject to either out of sample data being available from the fitted routine or user
provided realized data.
1 |
object |
A |
... |
Additional arguments include |
The method is only valid for objects which have been previously called with the out.sample
option in the fitting routine with a minimum of 10 out of sample point available. The realized
option, while still requiring the out.sample
to have been used, will allow either a matrix with
both the realized sigma and data or a vector with either to be provided for the calculation of the
loss measures. The realized.type
indicates what realized data is provided, and in the case
of “both” and a matrix, unless the matrix columns are named (with valid names being
“sigma” and “series”, the function will assume that sigma is the first column and
the series is the second one.
A uGARCHfpm
or codeARFIMAfpm object containing details of the
forecast performance measures for which extractor and show methods exist (see class for details).
Generic method for expansion to other classes
The method currently supports this class.
The method currently supports this class.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | ## Not run:
data(dmbp)
spec = ugarchspec(variance.model = list(model = "sGARCH", garchOrder = c(1,1)),
mean.model = list(armaOrder = c(1,1), include.mean = TRUE), distribution.model = "std")
fit = ugarchfit(data = dmbp[,1], out.sample = 50, spec = spec)
pred = ugarchforecast(fit, n.ahead = 50)
pred.fpm = fpm(pred)
# show method
pred.fpm
# extract meanloss
as.data.frame(pred.fpm, which = "sigma", type = "meanloss")
# extract the actual loss series
as.data.frame(pred.fpm, which = "sigma", type = "loss", rollframe = 0)
# an example with rolling:
pred = ugarchforecast(fit, n.ahead = 50, n.roll = 2)
pred.fpm = fpm(pred)
# show method
pred.fpm
# extract meanloss
as.data.frame(pred.fpm, which = "sigma", type = "meanloss")
# extract the actual loss series (notice the NA's at the end since
# we are calculating on 50 + 2 (roll) points using only 50 out.sample data points (for realized)
as.data.frame(pred.fpm, which = "sigma", type = "loss", rollframe = 2)
# an example with fictional realized:
pred = ugarchforecast(fit, n.ahead = 50, n.roll = 1)
pred.fpm = fpm(pred, realized = rep(-0.01, 52), realized.type = "series")
# show method
pred.fpm
# extract meanloss
as.data.frame(pred.fpm, which = "sigma", type = "meanloss")
# extract the actual loss series (notice the NA's at the end since
# we are calculating on 50 + 2 (roll) points using only 50 out.sample data points (for realized)
as.data.frame(pred.fpm, which = "series", type = "loss", rollframe = 1)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.