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

Quantlet: VaRtimeplot
Description: shows the time plot of VaR forecasts and the associated changes of the P&L of the portfolio.

Usage: VaRtimeplot(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. Parameters which are not given are replaced by defaults (see below).
opt.h positive integer, window width. If not given, set to 250.
opt.w scalar, 1 x d or n x d, weights for assets. If not given, set to 1.
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".
opt.style string vector, line styles for different VaR functions. Possible values are the line styles from setmask. The default is "solid".
opt.size string vector, line thickness for different VaR functions. Possible values are the line sizes from setmask. The default is "thin".
opt.data string vector, contains color, style and size (in that order) for portfolio data points. The default is "black"|"point"|"medium".
opt.exceed string vector, contains color, style and size (in that order) for points that should be marked as exceeding the VaR. The default is "black"|"point"|"medium".
opt.plot string vector, default is "all" for upper and lower VaR forecasts, use "low" for lower only.
Output:
VaRtimeplot or opt.name+"timeplot", 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 

opt=VaRopt("exceed","blue"|"fillcircle"|"small")

VaRtimeplot(y,VaR,opt) ; VaR time plot

Result:

The VaR forecasts (using method RMA) are plotted 

together with the portfolio returns. Returns which

exceed the VaR are marked in blue.

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)  

Result:

The VaR forecasts (using methods RMA, EMA and MAD) are plotted 

together with the portfolio returns.


Library: VaR
See also: VaRest VaRopt

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

Author: Marlene Mueller, 2000/07/13
(C) MD*TECH Method and Data Technologies, 21.9.2000