Learn R Programming

fEGarch (version 1.0.1)

autoplot,fEGarch_risk-method: Plotting of Risk Measure Results (ggplot2)

Description

Plot risk measure results returned by measure_risk as a points-over-threshold plot in style of ggplot2.

Usage

# S4 method for fEGarch_risk
autoplot(object, which = NULL, ...)

Value

Returns a ggplot2 plot object.

Arguments

object

an object returned by measure_risk.

which

one of the levels of VaR and ES saved in object, usually either 0.975 or 0.99 by default.

...

without use.

Examples

Run this code
window.zoo <- get("window.zoo", envir = asNamespace("zoo"))
rt <- window.zoo(SP500, end = "2003-12-31")

egarch_spec() %>%
 fEGarch(rt = rt, n_test = 250) %>%
 predict_roll() %>%
 measure_risk() %>%
 autoplot(which = 0.99)


Run the code above in your browser using DataLab