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 VaRqqplot

Macro: VaRpred
Description: predicts the value at risk (VaR).

Usage: VaR = VaRpred(y{,method}{,opt})
Input:
y n x d matrix, the returns of d assets.
method method for VaR, one of "BETA" (beta factor model), "BETACOR" (corrected beta factor model), "PRINC" (principal components), "PRINCW" (weighted principal components). "SUMS" (sums of uncorrelated variables). "COMPLETE" (no reduction of variance matrix). default is the "COMPLETE" option, the beta factor models assume that the first column in the data matrix is the index.
opt optional, a list with optional input. The macro "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.alpha scalar in (0,1), significance level. The default is 0.01.
opt.w scalar, 1 x d or n+1 x d, weights for assets. If not given, set to 1, the first coordinate is not used in computation for beta factor models.
Output:
VaR 1 x 2 vector, the VaR for observation n+1.

Example:
library("VaR")
x=read("kupfer")
x=x[1:50]  
x=diff(log(x))        
opt=VaRopt("w",1)
VaRpred(x,"COMPLETE",opt)
opt=VaRopt("w",2)
VaRpred(x,"COMPLETE",opt)
Result:
value at risk calculated for two different weights
Contents of VaR
[1,] -0.019467  0.019467 
Contents of VaR
[1,] -0.038933  0.038933 

Library: VaR
See also: VaRest VaRopt VaRtimeplot VaRqqplot

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: Zdenek Hlavka, 2000/07/13
(C) MD*TECH Method and Data Technologies, 17.8.2000