autoplot,fEGarch_risk-method {fEGarch}R Documentation

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 signature 'fEGarch_risk'
autoplot(object, which = NULL, ...)

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.

Value

Returns a ggplot2 plot object.

Examples

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)



[Package fEGarch version 1.0.1 Index]