mcSim: Monte Carlo Simulation from opriskmodel objects for total...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/mcSim.R

Description

Function for conducting Monte Carlo Simulation of complete opriskmodel objects (list of cells with (1) frequency model, (2) severity model and (3) dependencymodel)

Usage

1
2
mcSim(opriskmodel, n_sim, verbose=TRUE)
VaR(mc_out, alpha)

Arguments

opriskmodel

an opriskmodel object

n_sim

number of simulations

mc_out

Monte Carlo simulation output

alpha

significance level for quantile/value-at-risk

verbose

verbose mode

Value

A mcsim object, which can be further processed by the VaR function to estimate empirical quantiles as value-at-risk measure

Author(s)

Marius Pfeuffer

See Also

sla

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
## 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
VaR(mc_out,.95)

## End(Not run)

OpVaR documentation built on May 29, 2018, 9:04 a.m.