Library: | VaR |
See also: | VaRcopula VaRest VaRopt VaRestMC |
Quantlet: | VaRestMCcopula | |
Description: | estimates VaR for a given portfolio using copulas |
Usage: | VaRMCc = VaRestMCcopula(history,portfolio,mycopula,opt) | |
Input: | ||
history | n x 2 matrix of the history of the shares | |
portfolio | 2 x 1 vector, the portfolio | |
mycopula | scalar, integer between 1 and 22, selects the copula; see VaRcopula for details | |
opt.alpha | scalar, significance level for VaR estimation. (Default = 0.01) | |
opt.nsimu | scalar, number of Monte-Carlo simulations. (Default = 1000) | |
Output: | ||
VaRMCc | list containing the copula parameter and the VaR |
library("VaR") randomize(1) hist=normal(100,2) opt=VaRopt("alpha",0.01,"nsimu",1000) VaRestMCcopula(hist,1|2,4,opt)
Contents of VaRMCc.theta [1,] 1.2905 Contents of VaRMCc.VaR [1,] -5.3862