Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: VaR
See also: VaRest VaRopt VaRtimeplot

Quantlet: VaRqqplot
Description: visualizes the reliability of VaR forecasts.

Usage: VaRqq(y,VaR{,VaR1,{,VaR2{,VaR3}}}{,opt})
Input:
y n x d matrix, the returns of d time series.
VaR (n-h) x 1 or (n-h) x 2 matrix, VaR forecasts.
VaR1 (n-h) x 1 or (n-h) x 2 matrix, VaR forecasts.
VaR2 (n-h) x 1 or (n-h) x 2 matrix, VaR forecasts.
VaR3 (n-h) x 1 or (n-h) x 2 matrix, VaR forecasts.
opt optional, a list with optional input. The function "VaRopt" can be used to set up this parameter. The order of the list elements is not important.
opt.h positive integer, window width. If not given, set to 250.
opt.name string, prefix for the output. If not given, "VaR" is used.
opt.title string, title for the output. If not given, a default is set.
opt.color string vector, colors for different VaR functions. Possible values are the color strings from setmask. The default is "black".
Output:
VaRqqplot or opt.name+"qqplot", display, containing portfolio data and VaR forecasts.

Example:
library("VaR")
x=read("kupfer")      ; time series
x=x[1:1001]
y=diff(log(x))        ; returns
VaR=VaRest(y)         ; VaR
VaRqqplot(y,VaR)      ; QQ plot

Result:
The VaR is estimated and a QQ plot of y/VaR is
displayed.
Example:
library("VaR")
x=read("kupfer")       ; time series
x=x[1:1001]
y=diff(log(x))         ; returns
VaRrma=VaRest(y,"RMA") ; VaR using RMA
VaRema=VaRest(y,"EMA") ; VaR using EMA
VaRmad=VaRest(y,"MAD") ; VaR using MAD
opt=VaRopt("color","red"|"blue"|"green")
VaRtimeplot(y,VaRrma,VaRema,VaRmad,opt)
VaRqqplot(y,VaRrma,VaRema,VaRmad,opt)

Result:
The VaR forecasts (using methods RMA, EMA and MAD) are
estimated and plotted together with the portfolio
returns. Additionally, QQ plots of y/VaR are
displayed.



Author: M. Mueller, 20000713
(C) MD*TECH Method and Data Technologies, 05.02.2006