Description Usage Arguments Details Methods Note Author(s) Examples
Extracts volatility from a fitted GARCH object.
1 2 
object 
an object of class 
type 
a character string denoting if the conditional standard
deviations 
... 
additional arguments to be passed. 
The function extracts the @volatility
from the slots
@sigma.t
or @h.t
of an object of class "fGARCH"
as returned by the function garchFit
.
The class of the returned value depends on the input to the
function garchFit
who created the object. The returned
value is always of the same class as the input object to the
argument data
in the function garchFit
, i.e. if
you fit a "timeSeries"
object, you will get back from
the function fitted
also a "timeSeries"
object,
if you fit an object of class "zoo"
, you will get back
again a "zoo"
object. The same holds for a "numeric"
vector, for a "data.frame"
, and for objects of class
"ts", "mts"
.
In contrast, the slot itself returns independent of the class
of the data input always a numceric vector, i.e. the function
call rslot(object, "fitted")
will return a numeric vector.
Generic function.
Extractor function for volatility or standard deviation from
an object of class "fGARCH"
.
volatility
is a generic function which extracts volatility values
from objects returned by modeling functions.
Diethelm Wuertz for the Rmetrics Rport.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24  ## Swiss Pension func Index 
x = as.timeSeries(data(LPP2005REC))
## garchFit
fit = garchFit(LPP40 ~ garch(1, 1), data = 100*x, trace = FALSE)
fit
## volatility 
# Standard Deviation:
volatility = volatility(fit, type = "sigma")
head(volatility)
class(volatility)
# Variance:
volatility = volatility(fit, type = "h")
head(volatility)
class(volatility)
## slot 
volatility = slot(fit, "sigma.t")
head(volatility)
class(volatility)
volatility = slot(fit, "h.t")
head(volatility)
class(volatility)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.