garch {RTL} | R Documentation |
Wrapper for a Garch(1,1) returning either a plot or data.
Description
Computes annualised Garch(1,1) volatilities using fGarch package.
Usage
garch(x = x, out = TRUE)
Arguments
x |
Wide dataframe with date column and single series (univariate). |
out |
"chart" to return |
Value
replot_xts
chart, xts
data, or uGARCHfit
fit
Author(s)
Philippe Cote
Examples
## Not run:
x <- dflong %>% dplyr::filter(series == "CL01")
x <- returns(df = x, retType = "rel", period.return = 1, spread = TRUE)
x <- rolladjust(x = x, commodityname = c("cmewti"), rolltype = c("Last.Trade"))
summary(garch(x = x, out = "fit"))
garch(x = x, out = "chart")
garch(x = x, out = "data")
## End(Not run)
[Package RTL version 1.3.5 Index]