Description Details Author(s) Examples
opVaR package computes operational risk by Monte Carlo simulation performed by mc
function.
It provides reading losses, merges them by chosen periods, fits frequency and severity distributions.
Finally, VaR is computed basing on simulated yearly losses.
Package: | opVaR |
Type: | Package |
Version: | 1.0 |
Date: | 2010-05-30 |
License: | GPL-3 |
LazyLoad: | yes |
Anna Patrycja Zalewska, Faculty of Mathematics, Informatics and Mechanics at the University of Warsaw.
Maintainer: Anna Patrycja Zalewska <anna.patrycja.zalewska@gmail.com>
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 31 32 33 34 35 | data(loss.data.object)
D<- loss.matrix(loss.data.object);D
# matrix of loss summaries
loss.matrix.image(data=loss.data.object)
# table of loss summaries
loss.density(a=1,b=2,loss.data.object)
# loss denisties for every business line
# and second risk category
# "Clients, Products and Business Practices"
x<- read.loss(3,2,loss.data.object)
# read losses from third business line
# and second risk category
hist.period(x,"days")
# frequency histogram for days
root.period(x,"days","nbinomial")
# fitted frequency - nbinomial
z<- x[,2] # these are losses amounts
par(mfrow = c(1,2))
fit.plot(z,dnorm, param = list(mean = mean(z),sd = sd(z)))
fit.plot(z,dnorm, param = list(mean = mean(z),sd = sd(z)),draw.diff=T)
# empirical and fitted severity distributions
loss.fit.dist("lognormal",x)
# fitting lognormal distribution
mc(x,rfun="log-normal",nmb=200)
# 200 yearly losses simulated for x
# with given lognormal distribution as severity distribution
# and chosen binomial distribution as frequency distribution
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.