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

 Quantlet: 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), "RE" (model based on random effects: common correlation), "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. Model RE needs at least two-dimensional data. 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. 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
```

Author: Z. Hlavka, 20010220 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006