| 年底 | 损失次数 | 平均损失金额(元) |
|---|---|---|
| 2017 | 200 | 1200 |
| 2018 | 400 | 1500 |
\[{{f}_{\Theta }}(\theta )=\frac{1}{\Gamma (\alpha )}{{\alpha }^{\alpha }}{{\theta }^{\alpha -1}}\exp (-\alpha \theta ),\theta >0\]
alpha = 1
lambda = 1.2
for (k in 1:10)
{
print(dnbinom(k,size=alpha,mu=lambda/alpha))
}## [1] 0.2479339
## [1] 0.1352367
## [1] 0.07376545
## [1] 0.0402357
## [1] 0.02194675
## [1] 0.01197095
## [1] 0.00652961
## [1] 0.003561606
## [1] 0.001942694
## [1] 0.001059651
| 建筑物种类 | 最高赔款额(元) | 保单数 |
|---|---|---|
| 1 | 10000 | 80 |
| 2 | 20000 | 35 |
| 3 | 30000 | 25 |
| 4 | 50000 | 15 |
| 5 | 100000 | 5 |
损失金额 \(X_i\): 帕累托(\(\alpha = 4, \theta =10\))
对每次损失的一般免赔额: \(d = 6\)
对每次损失的赔偿限额:18, 故 \(u = 24\)
共保比例: 75%
求保险公司累积赔款 \(S\) 的分布
beta = 3
r = 2
#create zero vecotr saving total loss vector for 10000 samples
total_loss <- rep(0,10000)
#create loss numbers vector
total_number <- rnbinom(10000,size=r,prob=1/(1+beta))
#simulate total loss for all samples
for(i in 0:10000)
{
total_loss[i] <- sum(rlnorm(total_number,5,2))
}
#90% VaR and TVaR
VaR_90percent = quantile(total_loss,0.9)
TVaR_90percent = mean(total_loss[total_loss>VaR_90percent])
VaR_90percent; TVaR_90percent## 90%
## 11918029
## [1] 12536227
#95% VaR and TVaR
VaR_95percent = quantile(total_loss,0.95)
TVaR_95percent = mean(total_loss[total_loss>VaR_95percent])
VaR_95percent;TVaR_95percent## 95%
## 12300873
## [1] 12991815
#99% VaR and TVaR
VaR_99percent = quantile(total_loss,0.99)
TVaR_99percent = mean(total_loss[total_loss>VaR_99percent])
VaR_99percent;TVaR_99percent## 99%
## 13368570
## [1] 14242459
| 类别 | 人数 | 概率 | 保险金(万元) |
|---|---|---|---|
| 1 | 100 | 0.01 | 50 |
| 2 | 120 | 0.02 | 40 |
| 3 | 200 | 0.025 | 45 |
| 4 | 400 | 0.018 | 55 |
| 5 | 260 | 0.015 | 60 |
| 6 | 150 | 0.01 | 65 |
library(actuar)##
## Attaching package: 'actuar'
## The following object is masked from 'package:grDevices':
##
## cm
#create zero vecotr saving total loss vector for 10000 samples
total_loss <- rep(0,10000)
#create loss numbers vector
total_number <- rpois(10000,3)
#parameter
coinsurance = 0.75
limit = 18
deductible = 6
#simulate total loss for all samples
for(i in 0:10000)
{
total_loss[i] <- sum(coinsurance*min(max(actuar::rpareto(total_number[i],3,4)-deductible,0),limit))
}
#plot emperical cumulative density function
plot.ecdf(total_loss,do.points=FALSE, verticals=TRUE)#plot emperical cumulative density function for loss larger than 0
total_payment <- total_loss[total_loss>0]
plot.ecdf(total_payment,do.points=FALSE, verticals=TRUE)#probability that total loss is larger than 0
length(total_payment)/length(total_loss)## [1] 0.1774
#summary for loss payment
summary(total_payment)## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.000981 0.798264 1.981997 3.386827 4.536530 13.500000
18, - 共保比例为 75%。 - 应用随机模拟求保险公司累积赔款 S 的分布。