Library: | VaR |
See also: | VaRcopula VaRest VaRopt VaRcredN2 |
Quantlet: | VaRcredN | |
Description: | Simulates a default distribution for a portfolio of homogeneous obligors where the default driver is normally distributed. Returns mean, variance and the quantile chosen. |
Usage: | out = VaRcredN(d, p, rho, opt) | |
Input: | ||
d | scalar, number of obligors | |
p | scalar, default probability | |
rho | scalar, asset correlation, has to be positive | |
opt.alpha | scalar, significance level for VaR estimation (Default = 0.95) | |
opt.nsimu | scalar, number of simulations (Default = 1000) | |
Output: | ||
out | list containing the mean, the variance and opt.alpha quantile of default distribution |
library("VaR") randomize(1) options=VaRopt("alpha",0.99,"nsimu",500) VaRcredN(20,0.05,0.2,options)
Contents of out.m [1,] 1.038 Contents of out.v [1,] 1.8442 Contents of out.VaR [1,] 6