# NOT RUN {
### Load Example Data Set
data(lossdat)
### Estimation of Complete Risk Model
opriskmodel1=list()
for(i in 1:length(lossdat)){
opriskmodel1[[i]]=list()
opriskmodel1[[i]]$freqdist=fitFreqdist(lossdat[[i]],"pois")
opriskmodel1[[i]]$sevdist=fitPlain(lossdat[[i]],"lnorm")
}
### Cell 1: Gumbel Copula, Cell 2: Independence, Cell 3: Frank Copula, Cell 4: Independence
opriskmodel1[[1]]$dependency=fitDependency(lossdat[[1]],6)
opriskmodel1[[3]]$dependency=fitDependency(lossdat[[3]],4)
### Monte Carlo Simulation
mc_out=mcSim(opriskmodel1,100)
### Evaluation of 95
VaR(mc_out,.95)
sla(opriskmodel1,.95)
### Monte Carlo Simulation
mc_out=mcSim(opriskmodel1,100)
### Evaluation of 95% Value-at-Risk
VaR(mc_out,.95)
# }
Run the code above in your browser using DataLab