Learn R Programming

fGarch (version 4033.92)

plot-methods: GARCH plot methods

Description

Plot methods for GARCH modelling.

Usage

# S4 method for fGARCH,missing
plot(x, which = "ask", ...)

Arguments

x

an object of class "fGARCH".

which

a character string or a vector of positive integers specifying which plot(s) should be displayed, see section ‘Details’.

...

optional arguments to be passed.

Author

Diethelm Wuertz for the Rmetrics R-port;

VaR and ES graphs were added by Georgi N. Boshnakov in v4033.92

Details

The plot method for "fGARCH" objects offers a selection of diagnostic, exploratory, and presentation plots from a menu. Argument which can be used to request specific plots. This is particularly useful in scripts.

If which is of length larger than one, all requested plots are produced. For this to be useful, the graphics window should be split beforehand in subwindows, e.g., using par(mfrow = ...), par(mfcol = ...), or layout() (see section ‘Examples’). If this is not done, then only the last plot will be visible.

The following graphs are available:

1Time SeriesPlot
2Conditional Standard Deviation Plot
3Series Plot with 2 Conditional SD Superimposed
4Autocorrelation function Plot of Observations
5Autocorrelation function Plot of Squared Observations
6Cross Correlation Plot
7Residuals Plot
8Conditional Standard Deviations Plot
9Standardized Residuals Plot
10ACF Plot of Standardized Residuals
11ACF Plot of Squared Standardized Residuals
12Cross Correlation Plot between $r^2$ and r
13Quantile-Quantile Plot of Standardized Residuals
14Series with -VaR Superimposed
15Series with -ES Superimposed
16Series with -VaR & -ES Superimposed

See Also

fGARCH method for tsdiag,

garchFit, class fGARCH,

predict, fitted, residuals VaR ES

plot

Examples

Run this code
## simulate a Garch(1,1) time series
x <- garchSim(n = 200)
head(x) 

## fit GARCH(1,1) model
fit <- garchFit(formula = ~ garch(1, 1), data = x, trace = FALSE)

if (FALSE) {
## choose plots interactively
plot(fit)
}
   
## Batch Plot:
plot(fit, which = 3)

## a 2 by 2 matrix of plots
op <- par(mfrow = c(2,2))          # prepare 2x2 window
plot(fit, which = c(10, 11, 3, 16)) # plot
par(op)                            # restore the previous layout

Run the code above in your browser using DataLab