SlideShare a Scribd company logo
1 of 67
Download to read offline
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Pricing Insurance Contracts with R
R in Insurance conference
CASS Business School
London 15th 2013
Giorgio Alfredo Spedicato
Ph.D C.Stat ACAS
15th July 2013
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Table of contents
1 Introduction
2 Pricing life contingency insurances
3 Personal lines pricing with R
4 XL reinsurance contracts pricing with R
5 Appendix: code
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Outline
1 Introduction
2 Pricing life contingency insurances
3 Personal lines pricing with R
4 XL reinsurance contracts pricing with R
5 Appendix: code
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
R for insurance applications
R statistical system, [R Development Core Team, 2012], is
becoming the leading software for performing statistical
analysis in Academics. Also, in business application it is now a
reliable competitor to aļ¬ƒrmed data analysis software like SAS
[SAS Institute Inc., 2011], SPSS [IBM Corp, 2012] and
Matlab [The MathWorks Inc., 2010].
Packages speciļ¬cally devoted to actuarial applications have
been available for some years especially for non - life business
applications.
This presentation will show how R can be successfully applied
to price insurance contracts. Life insurances, general
insurances personal lines and XL reinsurance treaty rate
making will be shown.
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
What does pricing mean?
Insurance pricing means setting the cost of the future
uncertain beneļ¬ts the insurer would provide to its
policyholders.
An insurance rate, P, is an estimate of the expected value of
future costs, that provides for all costs associated with the
transfer of risk, according to CAS ratemaking principles
[Casualty Actuarial Society, 1988].
PV (P) = PV ĖœL + ĖœE + Q (1)
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
What this presentation shows
Costs associated with the transfer of risk that premium ĖœP allows for are: the future claims cost ĖœL, allocated
expenses E as well as proļ¬t and contingency loads Q as Equation 1 expresses.
In the examples that follow, in addition to future losses / insurance beneļ¬ts ĖœL, the premium will have a
provision for 5% of variable expenses. Only for life insurances future insurance beneļ¬t will be discounted by
2.5% (PV).
The proļ¬t load percentage will be calculated in order the insurer to earn 15% on allocated capital.
Allocated capital will be calculated using a VaR approach: Ct = ĖœL.99 āˆ’ E ĖœL , being ĖœL the portfolio
beneļ¬t distribution and allowed within the proļ¬t and contingency load ĖœL as Equation 2 displays.
CoCper contract =
0.15 āˆ— ĖœL.99 āˆ’ E ĖœL
Exposures
(2)
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
What this presentation shows
All examples will show that R tools can be used to model not
only the cost component, ĖœL, but also to appreciate the
underlying cost of capital above deļ¬ned on which the proļ¬t
and contingency load will be calculated.
Full code for the three example will be shown in the Appendix.
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Outline
1 Introduction
2 Pricing life contingency insurances
3 Personal lines pricing with R
4 XL reinsurance contracts pricing with R
5 Appendix: code
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Life insurance pricing
Pricing life insurance contracts requires demographical
assumptions to be set out since future cash ļ¬‚ows are
contingent on policyholders life status (life contingencies).
Similarly, ļ¬nancial assumptions are required as well since the
long duration of life contracts allows the insurer to invest
premiums and reserves proceeds.
The example that follows is worked out with R package
lifecontingencies, [Spedicato, 2013]. It provides a full set of
functions that life actuaries could use in their professional
activity.
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Life insurance example
A term life insurance is to be sold to 1,000 individuals each
aged 25, term is 40 years. Face value is 100,000, single
premium.
Assume SoA illustrative life table to hold, interest rate 2.5%
Acquisition and handling expenses are: 3% of premium. Proļ¬t
load is 15% of the portfolio beneļ¬t distribution.
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Life insurance example
lifecontingencies package [Spedicato, 2013] allows the actuary
to model the full distribution of underlying life contingency
random variable, ĖœL, not only its classical actuarial present
value 100000 āˆ— A 1
25:40
. This allows to straightly incorporate
capital consideration in life insurance pricing.
Figure 1 shows the distribution of the beneļ¬ts associated to a
single policy.
Table 1 displays key ļ¬gures for the life insurance pricing
exercise exempliļ¬ed.
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Life insurance example
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Life insurance example
size 1000.00
capital 100000.00
duration 40.00
age 25.00
expense ratio 0.03
ļ¬nal premium 9994.42
Table : Life insurance example key ļ¬gures
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Outline
1 Introduction
2 Pricing life contingency insurances
3 Personal lines pricing with R
4 XL reinsurance contracts pricing with R
5 Appendix: code
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Introduction
Personal lines data bases contain millions of record regarding
policyholdersā€™ contracts and associated claims.
It is customary to buld predictive models on the frequency,
severity and (or directly) the risk premium of the coverages.
Currently, log-linear GLMs are the most used models.
Often ļ¬nal relativities diverge from modelled ones allowing for
regulatory and / or marketing constraints.
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Introduction
Standard GLM can be ļ¬t using glm function within base R.
Tweedie GLM used to ļ¬t directly risk premium is implemented
in cplm package, [Zhang, 2012].
In case needed, R parallel package can reduce the time to
simulate the portfolio aggregated total loss
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
The MTPL example
The data comes from faraway package [Faraway, 2011]. A
worked actuarial example on this dataset can be found in
[Spedicato, 2012].
It contains aggregate exposures, number and total MTPL
losses by level of classiļ¬cation variable of the Swedish MTPL
insurance bureau (70s data). While very old, it is however
very didactical.
Models on the frequency and the severity of losses will be ļ¬t.
Similarly, the distribution of insured beneļ¬ts will be modelled
in order to incorporate cost of capital consideration in the
ļ¬nal rate.
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Frequency modelling
Frequency is modelled by an overdispersed Poisson model
using ln Insured as oļ¬€set term.
Figure 2 shows the coeļ¬ƒcient plot as given by coefplot
[Lander, 2013] package.
The interpretation is quite natural for some coeļ¬ƒcients. For
example, frequency decreases by Bonus level and increases by
Average Mileage. Vehicle make and territory relativities are
also displayed.
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Frequency modelling
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Severity model
Claim cost is modelled by a Gamma log-linar model
The severity is used as dependent variable and number of
claims is used as weight.
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Severity modelling
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Pure premium modelling
Fitted frequency and severity are saved for each row in order
the pure premium to be calculated. Two Gamma GLM models
will be ļ¬t on such calculated value: one unconstrained and
one constrained (that takes into account pre - set values of
Bonus coeļ¬ƒcients).
Table 2 compare ļ¬nal coeļ¬ƒcients of both models. They have
been exponentiate in order to represent relativities with
respect to a base premium.
The intercept of the constrained model, multiplied by a
balancing value to totalized the expected claim cost, is the
base premium that the reference insured (living in Zone 4,
having bonus 0, less than 1000Km, driving a Make 9 car) will
pay.
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Rate relativities coeļ¬ƒcients
levels free restricted
(Intercept) 445.69 435.68
Kilometres2: 1001-15000 1.24 1.23
Kilometres3: 15001-20000 1.38 1.38
Kilometres4: 20000-25 000 1.51 1.52
Kilometres5: 25001+ 1.79 1.80
Make1 1.14 1.16
Make2 1.21 1.24
Make3 1.01 1.04
Make4 0.49 0.47
Make5 1.22 1.24
Make6 0.78 0.78
Make7 0.97 0.99
Make8 1.42 1.46
Zone1: Stockholm, Goteborg, Malmo 1.56 1.54
Zone2: Other large cities 1.26 1.25
Zone3: Smaller cities southern Sweden 1.12 1.11
Zone5: Smaller cities northern Sweden 1.20 1.19
Zone6: Rural areas northern Sweden 1.08 1.08
Zone7: Gotland 0.84 0.84
Table : MTPL tariļ¬€ relativities
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Capital consideration
It is possible to generate the distribution of portfolio total
losses as sum of each row simulated total losses.
Each row total loss is the convolution of Poisson distributed
claim with ĖœĪ» equal to ļ¬tted frequency. Each claim is assumed
to follow a Gamma distribution whose parameters can be
calculated backward thanks to GLM theory assumptions
(Equation 3).
E [Ėœc] = Āµi
var [Ėœc] = Ļ†Āµ2
i
(3)
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Capital consideration
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Finalizing the tariļ¬€
Each row total losses are simulated many times and the
distribution of Portfolio total losses, ĖœL is therefore derived, as
Figure 4 shows.
Keeping the assumption the portfolio not to change in terms
of size and underwriting mix, it can be derived an average
cost of capital per unit of exposures.
Table 3 summarizes key ļ¬gures regarding the MTPL pricing
exercise.
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Finalizing the tariļ¬€
exposures 2379212.08
frequency 0.05
severity 4955.25
average premium 243.48
Table : Personal Lines Example Key Figures
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Outline
1 Introduction
2 Pricing life contingency insurances
3 Personal lines pricing with R
4 XL reinsurance contracts pricing with R
5 Appendix: code
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Introduction
XL reinsurance contracts cover primary insurer for large losses.
They are used to stabilize portfoliosā€™ loss experience and to
reduce their volatility.
Clarkā€™s paper [Clark, 1996] provides a very good introduction
about pricing reisurance contracts.
Typical tools used for reinsurance pricing are: loss distribution
modelling, extreme value theory and convolution theory.
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
The XL example
A primary insurer seeks coverage for an MTPL portfolio.
Estimated exposures are 500K and the subject premium
(GWP) is 250Mln.
It asks a quote for 10xs2 Mln.
It has provided historical ground up losses over 500K that
have been trended and developed to ultimate for the analysis.
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
The pricing methodology
Model the cost, ĖœX, and the frequency, ĖœN, of gross claims
using distribution ļ¬tting
Apply convolution theory to determine the total gross ĖœLgross
and ceded, ĖœLceded, losses.
Apply loads (expenses and proļ¬t contingency) and quote the
price as a percentage of subject premium.
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Cost modelling
The distribution of large losses should be carefully assessed.
actuar package, [Dutang et al., 2008], package provide a wide
set of loss distribution densities and utility functions. R
packages ļ¬tdistrplus, [Delignette-Muller et al., 2012], for
distribution ļ¬tting, and ADGofTestR, [Bellosta, 2011], for AD
test of goodness of ļ¬t help for it.
The analysis on individual large losses data shows that Weibull
distribution provides the better ļ¬t, as Figure 5 shows. This is
well conļ¬rmed also by Anderson Darling test.
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Cost Modelling
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Frequency modelling
Historical portfolio analysis (omitted) leads to set the
frequency of losses in exess of 1Mln to 0.00001.
The is need to simulate gross and ceded total losses.
Convolution theory is used for this purpose.
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Ceded loss distribution
Gross total losses will be modelled by convolution as well as
ceded ones.
We assume the number of claim to follow a Poisson law of
parameter Ī» = E āˆ— 0.00001.
Each gross loss, ĖœXgross, will follow Weibull distribution using
parameters ļ¬tted in previous step, for the exceeding 1Mln
portion.
Ceded claims will be ĖœXceded = min(L, max(0, ĖœX āˆ’ P)), being
L = 10Mln and P = 2Mln. Their distribution is shown in
Figure 6.
ĖœL =
i=0...ĖœN
Xi (4)
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Ceded loss distribution
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Final XL quote
subject premium (SP) 250.00
expected ceded losses 0.71
rate (percent of SP) 0.55
Table : XL Reinsurance example key ļ¬gures
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Outline
1 Introduction
2 Pricing life contingency insurances
3 Personal lines pricing with R
4 XL reinsurance contracts pricing with R
5 Appendix: code
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Life insurance code I
> source("lifeInsurance.R",echo=TRUE)
> library(lifecontingencies) #load the library
> data(soaLt) #load the data frame containing x and lx
> portfolioSize=1000 #define the size of the portfolio
> #price the contract
>
> actuarialtable4Example=new("actuarialtable", x=soaLt$x, lx=soaLt$Ix, interest=
> oneContractDistribution=100000*rLifeContingencies(n=50000,lifecontingency="Axn
> meanValue=portfolioSize*100000*Axn(actuarialtable4Example,25,40) #mean value o
> allocatedCapital=qnorm(p=0.99,mean=meanValue, sd=sd(oneContractDistribution)*s
> profitLoadPerContract=0.15*allocatedCapital/portfolioSize #allocate profit to
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Life insurance code II
> #final premium
> PStochastic=(100000*Axn(actuarialtable4Example,25,40)+profitLoadPerContract)/(
> #save results
> png("./figures/lifeIns.png")
> hist(oneContractDistribution, col="steelblue",
+ main="Life insurance contracts benefit present value distribution")
> abline(v=mean(oneContractDistribution), col="red",lwd=3)
> abline(v=quantile(oneContractDistribution, p=0.99), col="orange",lwd=3)
> dev.off()
null device
1
> infos=c("size", "capital", "duration", "age", "expense ratio", "final premium"
> value=c(1000, 100000, 40, 25, 0.03, PStochastic) #save data
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Life insurance code III
> dfInfoLife=data.frame(infos, value)
> #out to latex
>
> print(xtable(dfInfoLife, caption="Life insurance example key figures",
+ label="tab:lifeIns"), include.row=FALSE, i .... [TRUNCATED]
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
MTPL pricing code I
> source("personalLines.R",echo=TRUE)
> #load data
> data(motorins,package="faraway")
> #data preparation using descriptions in motorins
> dataset<-transform(motorins,
+ Kilometres=factor(Kilometres, levels=c(1:5),
+ .... [TRUNCATED]
> #set the reference level the one with most exposure
> dataset$Zone=relevel(dataset$Zone, ref="4: Rural areas southern Sweden")
> dataset$Make=relevel(dataset$Make, ref="9")
> #define the bonus malus scale
> bonusCoefficient<-function(varBonus)
+ {
+ out=NULL
+ if(varBonus==1) out=1 else
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
MTPL pricing code II
+ if(varBonus==2 .... [TRUNCATED]
> attach(dataset)
The following object(s) are masked from 'dataset (position 3)':
Bonus, BonusNum, Claims, Insured, Kilometres, Make, Payment, perd, Zone
The following object(s) are masked from 'dataset (position 4)':
Bonus, BonusNum, Claims, Insured, Kilometres, Make, Payment, perd, Zone
The following object(s) are masked from 'dataset (position 5)':
Bonus, BonusNum, Claims, Insured, Kilometres, Make, Payment, perd, Zone
The following object(s) are masked from 'dataset (position 6)':
Bonus, BonusNum, Claims, Insured, Kilometres, Make, Payment, perd, Zone
The following object(s) are masked from 'dataset (position 7)':
Bonus, BonusNum, Claims, Insured, Kilometres, Make, Payment, perd, Zone
The following object(s) are masked from 'dataset (position 8)':
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
MTPL pricing code III
Bonus, BonusNum, Claims, Insured, Kilometres, Make, Payment, perd, Zone
The following object(s) are masked from 'temp (position 9)':
Bonus, BonusNum, Claims, Insured, Kilometres, Make, Payment, perd, Zone
The following object(s) are masked from 'temp (position 10)':
Bonus, BonusNum, Claims, Insured, Kilometres, Make, Payment, perd, Zone
The following object(s) are masked from 'temp (position 11)':
Bonus, BonusNum, Claims, Insured, Kilometres, Make, Payment, perd, Zone
The following object(s) are masked from 'dataset (position 12)':
Bonus, BonusNum, Claims, Insured, Kilometres, Make, Payment, perd, Zone
> ncdCoeff=sapply(as.numeric(Bonus),bonusCoefficient)
> detach(dataset)
> dataset$ncdCoeff=ncdCoeff
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
MTPL pricing code IV
> freqModel<-glm(Claims~Kilometres+Zone+Bonus+
+ Make,offset=log(Insured), data=dataset,family="poisson")
> library(coefplot)
> png("./figures/modelFreq.png")
> coefplot(model=freqModel, intercept=FALSE, title="Frequency model coef plot",
> dev.off()
null device
1
> #severity modelling
>
> dataset$averageCost=with(dataset, Payment/Claims)
> #Gamma GLM on severity
> sevModel<-glm(averageCost~Zone+Make+Bonus+Kilometres,
+ weights=Claims, data=dataset, family=Gamma(link="log ..." ... [T
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
MTPL pricing code V
> anova(sevModel, test="Chisq") #test III
Analysis of Deviance Table
Model: Gamma, link: log
Response: averageCost
Terms added sequentially (first to last)
Df Deviance Resid. Df Resid. Dev Pr(>Chi)
NULL 1796 5417.7
Zone 6 402.23 1790 5015.5 < 2.2e-16 ***
Make 8 242.34 1782 4773.2 1.809e-14 ***
Bonus 6 225.86 1776 4547.3 1.834e-14 ***
Kilometres 4 20.73 1772 4526.6 0.1345
---
Signif. codes: 0 ā€˜***ā€™ 0.001 ā€˜**ā€™ 0.01 ā€˜*ā€™ 0.05 ā€˜.ā€™ 0.1 ā€˜ ā€™ 1
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
MTPL pricing code VI
> #Kilometres factor not significant
> sevModel<-update(sevModel, ~.-Kilometres)
> anova(sevModel, test="Chisq") #test III
Analysis of Deviance Table
Model: Gamma, link: log
Response: averageCost
Terms added sequentially (first to last)
Df Deviance Resid. Df Resid. Dev Pr(>Chi)
NULL 1796 5417.7
Zone 6 402.23 1790 5015.5 < 2.2e-16 ***
Make 8 242.34 1782 4773.2 2.619e-14 ***
Bonus 6 225.86 1776 4547.3 2.610e-14 ***
---
Signif. codes: 0 ā€˜***ā€™ 0.001 ā€˜**ā€™ 0.01 ā€˜*ā€™ 0.05 ā€˜.ā€™ 0.1 ā€˜ ā€™ 1
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
MTPL pricing code VII
> #we decide to remove also Bonus even if statistically significant, as
> #coefficients profile seem judgmentally randomic
> sevModel<-update(sevMode .... [TRUNCATED]
> png("./figures/sevModel.png")
> coefplot(model=sevModel, intercept=FALSE, title="Severity model coef plot", yl
> dev.off()
null device
1
> #calculate fitted frequency and fitted severity
> fittedFrequency=predict(object=freqModel, newdata=dataset,type="response")
> fittedSeverity=predict(object=sevModel, newdata=dataset,type="response")
> #add those columns on main dataset for convenience
> dataset<-transform(dataset,
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
MTPL pricing code VIII
+ fittedFrequency=fittedFrequency,
+ .... [TRUNCATED]
> #check overall balance
> with(dataset, sum(purePremium*Insured))
[1] 560787950
> with(dataset, sum(Payment))
[1] 560790681
> #the difference between actual losses and losse amount is not material
> #add bonus malus coefficient
> dataset<-transform(dataset,
+ .... [TRUNCATED]
> burnCostFreeModel<-glm(purePremium~Zone+Bonus+Make+Kilometres,
+ weights=Insured, data=dataset, family=Gamma(link="log")
> ########################################
> #model free and constrained pure premiums
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
MTPL pricing code IX
> ########################################
> burnCostFreeModel< .... [TRUNCATED]
> #this is the burning cost model with bonus malus coefficients constrained
> burnCostConstrModel<-glm(purePremium~Zone+Make+Kilometres,
+ .... [TRUNCATED]
> #add the risk premium to the dataset
> dataset$risk_premium=predict(burnCostConstrModel,
+ newdata=dataset, type="resp ..." ... [TRUNCATED]
> #check the balance
> #actual total losses
> balancingValue<-with(dataset, sum(Payment)/sum(Insured*risk_premium))
> #5% delta
>
> ###################################################
> ### coefficient comparisons
> ################################################# .... [TRUNCATED]
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
MTPL pricing code X
> coefConstr<-coef(burnCostConstrModel)
> #create a pretty table and exponentiate coefficients
> tableCoefFree<-data.frame(levels=names(coefFree),
+ coefficientsFr .... [TRUNCATED]
> tableCoefConstr<-data.frame(levels=names(coefConstr),
+ coefficientRestricted=exp(as.numeric(coefConstr)))
> tableCoeff<-merge(x=tableCoefFree,y=tableCoefConstr)
> names(tableCoeff)[2:3]<-c("free","restricted")
> print(xtable(tableCoeff, caption="MTPL tariff relativities", label="tab:MTPLRe
+ include.row=FALSE, include.col=TRUE, size="scriptsize",
.... [TRUNCATED]
> #calculate the variance
> temp<-dataset
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
MTPL pricing code XI
> temp$costDisp=2.983458 #fDisprom Severity Model
> temp$costVar=with(temp, averageCost^2*costDisp) #calculate the cost conditiona
> temp$scaleCost=with(temp, costVar/averageCost) #calculate the scale
> temp$shapeCost=with(temp, averageCost/scaleCost)
> dataset<-temp
> #
> #nsim=1000
> #simMatrix<-matrix(0, nrow=nrow(dataset),ncol=nsim)
> # .convolve<-function(num, shape, scale)
> # {
> # out=numeric(1)
> # ou .... [TRUNCATED]
> #finalizing the tariff
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
MTPL pricing code XII
>
> #cost of capital
>
> MTPLCoC=0.15*(quantile(portfolioLosses,.99)-mean(portfolioLosses))
> MTPLCoCxInsured=MTPLCoC/sum(dataset$Insured)
> dataset$FinalCommercialPremium=(MTPLCoCxInsured+balancingValue*dataset$risk_pr
> png("./figures/mtplPTFdist.png")
> hist(portfolioLosses, main="MTPL portfolio Total Loss Distribution", xlab="tot
> abline(v=mean(portfolioLosses), col="red",lwd=3)
> abline(v=quantile(portfolioLosses, p=0.99),col="orange",lwd=3)
> dev.off()
null device
1
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
MTPL pricing code XIII
> #summarize
> attach(dataset)
The following object(s) are masked _by_ '.GlobalEnv':
fittedFrequency, fittedSeverity, ncdCoeff
The following object(s) are masked from 'dataset (position 3)':
averageCost, Bonus, BonusNum, Claims, costDisp, costVar,
FinalCommercialPremium, fittedFrequency, fittedSeverity, Insured,
Kilometres, Make, ncdCoeff, Payment, perd, purePremium, risk_premium,
scaleCost, shapeCost, Zone
The following object(s) are masked from 'dataset (position 4)':
averageCost, Bonus, BonusNum, Claims, costDisp, costVar,
FinalCommercialPremium, fittedFrequency, fittedSeverity, Insured,
Kilometres, Make, ncdCoeff, Payment, perd, purePremium, risk_premium,
scaleCost, shapeCost, Zone
The following object(s) are masked from 'dataset (position 5)':
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
MTPL pricing code XIV
averageCost, Bonus, BonusNum, Claims, costDisp, costVar,
FinalCommercialPremium, fittedFrequency, fittedSeverity, Insured,
Kilometres, Make, ncdCoeff, Payment, perd, purePremium, risk_premium,
scaleCost, shapeCost, Zone
The following object(s) are masked from 'dataset (position 6)':
averageCost, Bonus, BonusNum, Claims, costDisp, costVar,
FinalCommercialPremium, fittedFrequency, fittedSeverity, Insured,
Kilometres, Make, ncdCoeff, Payment, perd, purePremium, risk_premium,
scaleCost, shapeCost, Zone
The following object(s) are masked from 'dataset (position 7)':
averageCost, Bonus, BonusNum, Claims, costDisp, costVar,
FinalCommercialPremium, fittedFrequency, fittedSeverity, Insured,
Kilometres, Make, ncdCoeff, Payment, perd, purePremium, risk_premium,
scaleCost, shapeCost, Zone
The following object(s) are masked from 'dataset (position 8)':
averageCost, Bonus, BonusNum, Claims, costDisp, costVar,
FinalCommercialPremium, fittedFrequency, fittedSeverity, Insured,
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
MTPL pricing code XV
Kilometres, Make, ncdCoeff, Payment, perd, purePremium, risk_premium,
scaleCost, shapeCost, Zone
The following object(s) are masked from 'temp (position 9)':
averageCost, Bonus, BonusNum, Claims, costDisp, costVar, fittedFrequency,
fittedSeverity, Insured, Kilometres, Make, ncdCoeff, Payment, perd,
purePremium, risk_premium, scaleCost, shapeCost, Zone
The following object(s) are masked from 'temp (position 10)':
averageCost, Bonus, BonusNum, Claims, costDisp, costVar, fittedFrequency,
fittedSeverity, Insured, Kilometres, Make, ncdCoeff, Payment, perd,
purePremium, risk_premium, scaleCost, shapeCost, Zone
The following object(s) are masked from 'temp (position 11)':
averageCost, Bonus, BonusNum, Claims, costDisp, costVar, fittedFrequency,
fittedSeverity, Insured, Kilometres, Make, ncdCoeff, Payment, perd,
purePremium, risk_premium, scaleCost, shapeCost, Zone
The following object(s) are masked from 'dataset (position 12)':
averageCost, Bonus, BonusNum, Claims, costDisp, costVar,
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
MTPL pricing code XVI
FinalCommercialPremium, fittedFrequency, fittedSeverity, Insured,
Kilometres, Make, ncdCoeff, Payment, perd, purePremium, risk_premium,
scaleCost, shapeCost, Zone
> infos=c("exposures", "frequency", "severity", "average premium")
> values=c(sum(Insured), sum(Claims)/sum(Insured), sum(Payment)/sum(Claims),
+ sum(FinalCommercialPremium*Insured)/sum(Insured))
> dfInfoMTPL=data.frame(infos, values)
> print(xtable(dfInfoMTPL, caption="Personal Lines Example Key Figures",
+ label="tab:personalLinesSummary"),
+ include.row=FALSE .... [TRUNCATED]
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
XL Code I
> source("xlpricing.R",echo=TRUE)
> #pricing xl contracts with R
>
> #severity fitting
>
> library(fitdistrplus) #load fitdistrplus package
> library(actuar) #load package for distributions
> library(ADGofTest) #load package to fit anderson darling
> load(file="xlClaims.RData")
> claims2analyze=mtplLargeClaims$ultimate_cost[mtplLargeClaims$ultimate_cost>10^
> #try various function
> fitGamma<-fitdist(data=claims2analyze, distr="gamma", method="mme") #gamma wit
> fitWeibull<-fitdist(data=claims2analyze, distr="weibull", method="mle") #Weibu
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
XL Code II
> #lognormal
> fitLognormal<-fitdist(data=claims2analyze, distr="lnorm", method="mge",gof="AD
> #fitĀøcLogistic<-fitdist(data=claims2analyze, distr="logis", method="mle")
>
> #check wich bet
>
> #check which distribution is better
> ad.test(cla .... [TRUNCATED]
Anderson-Darling GoF Test
data: claims2analyze and pgamma
AD = 0.4421, p-value = 0.806
alternative hypothesis: NA
> ad.test(claims2analyze, pweibull, fitWeibull$estimate[1],fitWeibull$estimate[2
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
XL Code III
Anderson-Darling GoF Test
data: claims2analyze and pweibull
AD = 0.2758, p-value = 0.9551
alternative hypothesis: NA
> ad.test(claims2analyze, plnorm, fitLognormal$estimate[1],fitLognormal$estimate
Anderson-Darling GoF Test
data: claims2analyze and plnorm
AD = 4.2878, p-value = 0.006332
alternative hypothesis: NA
> png("./figures/weibullFit.png")
> plot(fitWeibull)
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
XL Code IV
> dev.off()
null device
1
> #apply convolution to find the ceded total loss distribution
>
> E=500000
> freq=1*10^-5
> lambda=E*freq
> nsim=10000
> grossLosses=numeric(nsim)
> cededLosses=numeric(nsim)
> netLosses=numeric(nsim)
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
XL Code V
> #function to get ceded losses
> .getCeded<-function(grossLoss, priority, limit)
+ {
+ out=numeric(1)
+ out=min(limit, max(0, grossLoss-priority) .... [TRUNCATED]
> #convolution modelling
>
> for(i in 1:nsim)
+ {
+ num=rpois(1, lambda) #simulate the number of claims
+ if(num==0) {
+ grossLosses[i]=0
+ .... [TRUNCATED]
> #price the contract
>
> expRatio=0.05
> SubjectPremium=250*10^6
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
XL Code VI
> allocatedCapital=quantile(cededLosses,.99)-mean(cededLosses)
> burningCost=(mean(cededLosses)+0.15*allocatedCapital)/(1-expRatio)
> rate=(burningCost)/SubjectPremium
> infos=c("subject premium (SP)", "expected ceded losses", "rate (percent of SP)
> value=c(SubjectPremium/10^6, mean(cededLosses)*10^-6, rate*100 ) #save data
> dfInfoXL=data.frame(infos, value)
> #out to latex
> png("./figures/xlCededDistr.png")
> hist(cededLosses, breaks=50, col="steelblue", main="Ceded losses distribution"
> dev.off()
null device
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
XL Code VII
1
> print(xtable(dfInfoXL, caption="XL Reinsurance example key figures", digit=2,
+ label="tab:xlReinsurance"), include.row=FALSE, include. .... [TRU
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Reference I
Bellosta, C. J. G. (2011).
ADGofTest: Anderson-Darling GoF test.
R package version 0.3.
Casualty Actuarial Society (1988).
Statement of principles regarding property and casualty insurance ratemaking.
http://www.casact.org/professionalism/standards/princip/sppcrate.pdf.
Online; accessed 25-05-2013.
Clark, D. R. (1996).
Basics of reinsurance pricing.
CAS Study Note, pages 41ā€“43.
Delignette-Muller, M. L., Pouillot, R., Denis, J.-B., and Dutang, C. (2012).
ļ¬tdistrplus: help to ļ¬t of a parametric distribution to non-censored or censored data.
R package version 1.0-0.
Dutang, C., Goulet, V., and Pigeon, M. (2008).
actuar: An r package for actuarial science.
Journal of Statistical Software, 25(7):38.
Faraway, J. (2011).
faraway: Functions and datasets for books by Julian Faraway.
R package version 1.0.5.
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Reference II
IBM Corp (2012).
SPSS, Release 21.0 Advanced Statistical Procedures Companion.
IBM Corp., Armonk, NY.
Lander, J. P. (2013).
coefplot: Plots Coeļ¬ƒcients from Fitted Models.
R package version 1.2.0.
R Development Core Team (2012).
R: A Language and Environment for Statistical Computing.
R Foundation for Statistical Computing, Vienna, Austria.
ISBN 3-900051-07-0.
SAS Institute Inc. (2011).
SAS/STAT Software, Version9.3.
Cary, NC.
Spedicato, G. A. (2012).
Third party motor liability ratemaking with r.
http://www.casact.org/research/wp/papers/working-paper-spedicato-%202012-06.pdf.
Casualty Actuarial Society Working Paper.
Spedicato, G. A. (2013).
Lifecontingencies: an R package to perform life contingencies actuarial mathematics.
R package version 0.9.7.
Spedicato G.A.
Pricing Insurance Contracts with R
Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c
Reference III
The MathWorks Inc. (2010).
MATLAB Version 7.10.0 (R2010a).
The MathWorks Inc., Natick, Massachusetts.
Zhang, W. (2012).
cplm: Compound Poisson linear models.
R package version 0.6-4.
Spedicato G.A.
Pricing Insurance Contracts with R

More Related Content

What's hot

Ch 4 underwriting policy and practice
Ch 4 underwriting policy and practiceCh 4 underwriting policy and practice
Ch 4 underwriting policy and practiceDanish Shahid
Ā 
Chapter 6: FINANCIAL OPERATIONS OF I NSURERS
Chapter 6: FINANCIAL OPERATIONS OF I NSURERSChapter 6: FINANCIAL OPERATIONS OF I NSURERS
Chapter 6: FINANCIAL OPERATIONS OF I NSURERSMarya Sholevar
Ā 
Chapter 1: Introduction to Insurance
Chapter 1: Introduction to InsuranceChapter 1: Introduction to Insurance
Chapter 1: Introduction to InsuranceMarya Sholevar
Ā 
Credit Insurance -Detailed presentation.pptx
Credit Insurance -Detailed presentation.pptxCredit Insurance -Detailed presentation.pptx
Credit Insurance -Detailed presentation.pptxbalagangadharan4
Ā 
Effective rate of interest
Effective rate of interestEffective rate of interest
Effective rate of interestNadeem Uddin
Ā 
Seguro de Vida y Accidente
Seguro de Vida y AccidenteSeguro de Vida y Accidente
Seguro de Vida y AccidenteSiempre Bellas
Ā 
Business Interruption Presentation
Business Interruption PresentationBusiness Interruption Presentation
Business Interruption PresentationLeeEpstein
Ā 
Types of insurance_power_point_presentation_1.10.1.g1
Types of insurance_power_point_presentation_1.10.1.g1Types of insurance_power_point_presentation_1.10.1.g1
Types of insurance_power_point_presentation_1.10.1.g1b34farmer
Ā 
Types of insurance
Types of insuranceTypes of insurance
Types of insuranceTHEPOLICYKART
Ā 
Insurance - Classification
Insurance - ClassificationInsurance - Classification
Insurance - ClassificationNeenu Pappachan
Ā 
Fire insurance
Fire insuranceFire insurance
Fire insuranceSaeed Naseri
Ā 
Motor insurance 030515 final
Motor insurance 030515 finalMotor insurance 030515 final
Motor insurance 030515 finalAnand Chatterjee
Ā 
Risk financing
Risk financingRisk financing
Risk financingRione Drevale
Ā 
Concept and principle of insurance and its revelent in developing country and...
Concept and principle of insurance and its revelent in developing country and...Concept and principle of insurance and its revelent in developing country and...
Concept and principle of insurance and its revelent in developing country and...Ravi kumar
Ā 

What's hot (20)

Ch 4 underwriting policy and practice
Ch 4 underwriting policy and practiceCh 4 underwriting policy and practice
Ch 4 underwriting policy and practice
Ā 
Chapter 6: FINANCIAL OPERATIONS OF I NSURERS
Chapter 6: FINANCIAL OPERATIONS OF I NSURERSChapter 6: FINANCIAL OPERATIONS OF I NSURERS
Chapter 6: FINANCIAL OPERATIONS OF I NSURERS
Ā 
Introduction to reinsurance
Introduction to reinsuranceIntroduction to reinsurance
Introduction to reinsurance
Ā 
Chapter 1: Introduction to Insurance
Chapter 1: Introduction to InsuranceChapter 1: Introduction to Insurance
Chapter 1: Introduction to Insurance
Ā 
Credit Insurance -Detailed presentation.pptx
Credit Insurance -Detailed presentation.pptxCredit Insurance -Detailed presentation.pptx
Credit Insurance -Detailed presentation.pptx
Ā 
Effective rate of interest
Effective rate of interestEffective rate of interest
Effective rate of interest
Ā 
Introduction of general insurance
Introduction of general insuranceIntroduction of general insurance
Introduction of general insurance
Ā 
Seguro de Vida y Accidente
Seguro de Vida y AccidenteSeguro de Vida y Accidente
Seguro de Vida y Accidente
Ā 
Business Interruption Presentation
Business Interruption PresentationBusiness Interruption Presentation
Business Interruption Presentation
Ā 
Fire insurance
Fire insuranceFire insurance
Fire insurance
Ā 
Types of insurance_power_point_presentation_1.10.1.g1
Types of insurance_power_point_presentation_1.10.1.g1Types of insurance_power_point_presentation_1.10.1.g1
Types of insurance_power_point_presentation_1.10.1.g1
Ā 
Types of-risk
Types of-riskTypes of-risk
Types of-risk
Ā 
Types of insurance
Types of insuranceTypes of insurance
Types of insurance
Ā 
Insurance - Classification
Insurance - ClassificationInsurance - Classification
Insurance - Classification
Ā 
Fire insurance
Fire insuranceFire insurance
Fire insurance
Ā 
Motor insurance 030515 final
Motor insurance 030515 finalMotor insurance 030515 final
Motor insurance 030515 final
Ā 
Risk financing
Risk financingRisk financing
Risk financing
Ā 
underwriting
underwritingunderwriting
underwriting
Ā 
Concept and principle of insurance and its revelent in developing country and...
Concept and principle of insurance and its revelent in developing country and...Concept and principle of insurance and its revelent in developing country and...
Concept and principle of insurance and its revelent in developing country and...
Ā 
Principles of insurance
Principles of insurancePrinciples of insurance
Principles of insurance
Ā 

Similar to Princing insurance contracts with R

Ch gra wp_cat_bonds_2017
Ch gra wp_cat_bonds_2017Ch gra wp_cat_bonds_2017
Ch gra wp_cat_bonds_2017Genest Benoit
Ā 
Cat bonds & Artificial Neural Networks | An example of reinsurance productsā€™ ...
Cat bonds & Artificial Neural Networks | An example of reinsurance productsā€™ ...Cat bonds & Artificial Neural Networks | An example of reinsurance productsā€™ ...
Cat bonds & Artificial Neural Networks | An example of reinsurance productsā€™ ...GRATeam
Ā 
Health insurance reform
Health insurance reformHealth insurance reform
Health insurance reformHenry Buist
Ā 
Insurance fraud through collusion - Pierre Picard
Insurance fraud through collusion - Pierre PicardInsurance fraud through collusion - Pierre Picard
Insurance fraud through collusion - Pierre PicardKezhan SHI
Ā 
Risk Exposure and Hedging
Risk Exposure and Hedging Risk Exposure and Hedging
Risk Exposure and Hedging Harsh Chitroda
Ā 
MM Tingkatan 5, 3.1.3 masalah melibatkan insurans
MM Tingkatan 5, 3.1.3 masalah melibatkan insuransMM Tingkatan 5, 3.1.3 masalah melibatkan insurans
MM Tingkatan 5, 3.1.3 masalah melibatkan insuransNoor Syamila Mohd
Ā 
Risk management introduction fall 2013
Risk management introduction fall 2013Risk management introduction fall 2013
Risk management introduction fall 2013Suganthan Dboss
Ā 
AJ Buono Project 2 Risk Analysis Risk Treatment
AJ Buono Project 2 Risk Analysis Risk TreatmentAJ Buono Project 2 Risk Analysis Risk Treatment
AJ Buono Project 2 Risk Analysis Risk TreatmentAlexander J. Buono
Ā 
1 mon 17.00_life_christiansen_products_presentation
1 mon 17.00_life_christiansen_products_presentation1 mon 17.00_life_christiansen_products_presentation
1 mon 17.00_life_christiansen_products_presentationAkshay Gaikwad
Ā 
Generic valuation framework for insurance liabilities - November 2018 edition
Generic valuation framework for insurance liabilities - November 2018 editionGeneric valuation framework for insurance liabilities - November 2018 edition
Generic valuation framework for insurance liabilities - November 2018 editionNick Kinrade
Ā 
Commercial Risk Europe p1 & p16
Commercial Risk Europe p1 & p16Commercial Risk Europe p1 & p16
Commercial Risk Europe p1 & p16David Benning
Ā 
Generic valuation framework for insurance liabilities - August 2017 edition
Generic valuation framework for insurance liabilities - August 2017 editionGeneric valuation framework for insurance liabilities - August 2017 edition
Generic valuation framework for insurance liabilities - August 2017 editionNick Kinrade
Ā 
Scaling-up Microfinance Products for Weather Risk Management: Three Proposals...
Scaling-up Microfinance Products for Weather Risk Management: Three Proposals...Scaling-up Microfinance Products for Weather Risk Management: Three Proposals...
Scaling-up Microfinance Products for Weather Risk Management: Three Proposals...BASIS AMA Innovation Lab
Ā 
The Cost of Capital, Corporation Finance and The Theory of Investment
The Cost of Capital, Corporation Finance and The Theory of InvestmentThe Cost of Capital, Corporation Finance and The Theory of Investment
The Cost of Capital, Corporation Finance and The Theory of InvestmentRaju Basnet Chhetri
Ā 
9 - Is longevity an insurable risk? (2015) (ENG)
9 - Is longevity an insurable risk? (2015) (ENG)9 - Is longevity an insurable risk? (2015) (ENG)
9 - Is longevity an insurable risk? (2015) (ENG)InstitutoBBVAdePensiones
Ā 
Charles Hachemeiter 1995-96 PrizeCasualty Actuarial Society USA-IPL
Charles Hachemeiter 1995-96 PrizeCasualty Actuarial Society USA-IPLCharles Hachemeiter 1995-96 PrizeCasualty Actuarial Society USA-IPL
Charles Hachemeiter 1995-96 PrizeCasualty Actuarial Society USA-IPLIsabelle Praud-Lion
Ā 

Similar to Princing insurance contracts with R (20)

AVII.pdf
AVII.pdfAVII.pdf
AVII.pdf
Ā 
Ch gra wp_cat_bonds_2017
Ch gra wp_cat_bonds_2017Ch gra wp_cat_bonds_2017
Ch gra wp_cat_bonds_2017
Ā 
Cat bonds & Artificial Neural Networks | An example of reinsurance productsā€™ ...
Cat bonds & Artificial Neural Networks | An example of reinsurance productsā€™ ...Cat bonds & Artificial Neural Networks | An example of reinsurance productsā€™ ...
Cat bonds & Artificial Neural Networks | An example of reinsurance productsā€™ ...
Ā 
Health insurance reform
Health insurance reformHealth insurance reform
Health insurance reform
Ā 
Insurance fraud through collusion - Pierre Picard
Insurance fraud through collusion - Pierre PicardInsurance fraud through collusion - Pierre Picard
Insurance fraud through collusion - Pierre Picard
Ā 
Ga2000 gp25(3) enz
Ga2000 gp25(3) enzGa2000 gp25(3) enz
Ga2000 gp25(3) enz
Ā 
Ga2000 gp25(3) enz
Ga2000 gp25(3) enzGa2000 gp25(3) enz
Ga2000 gp25(3) enz
Ā 
Cat Bond and Traditional Insurance
Cat Bond and Traditional InsuranceCat Bond and Traditional Insurance
Cat Bond and Traditional Insurance
Ā 
Risk Exposure and Hedging
Risk Exposure and Hedging Risk Exposure and Hedging
Risk Exposure and Hedging
Ā 
MM Tingkatan 5, 3.1.3 masalah melibatkan insurans
MM Tingkatan 5, 3.1.3 masalah melibatkan insuransMM Tingkatan 5, 3.1.3 masalah melibatkan insurans
MM Tingkatan 5, 3.1.3 masalah melibatkan insurans
Ā 
Risk management introduction fall 2013
Risk management introduction fall 2013Risk management introduction fall 2013
Risk management introduction fall 2013
Ā 
AJ Buono Project 2 Risk Analysis Risk Treatment
AJ Buono Project 2 Risk Analysis Risk TreatmentAJ Buono Project 2 Risk Analysis Risk Treatment
AJ Buono Project 2 Risk Analysis Risk Treatment
Ā 
1 mon 17.00_life_christiansen_products_presentation
1 mon 17.00_life_christiansen_products_presentation1 mon 17.00_life_christiansen_products_presentation
1 mon 17.00_life_christiansen_products_presentation
Ā 
Generic valuation framework for insurance liabilities - November 2018 edition
Generic valuation framework for insurance liabilities - November 2018 editionGeneric valuation framework for insurance liabilities - November 2018 edition
Generic valuation framework for insurance liabilities - November 2018 edition
Ā 
Commercial Risk Europe p1 & p16
Commercial Risk Europe p1 & p16Commercial Risk Europe p1 & p16
Commercial Risk Europe p1 & p16
Ā 
Generic valuation framework for insurance liabilities - August 2017 edition
Generic valuation framework for insurance liabilities - August 2017 editionGeneric valuation framework for insurance liabilities - August 2017 edition
Generic valuation framework for insurance liabilities - August 2017 edition
Ā 
Scaling-up Microfinance Products for Weather Risk Management: Three Proposals...
Scaling-up Microfinance Products for Weather Risk Management: Three Proposals...Scaling-up Microfinance Products for Weather Risk Management: Three Proposals...
Scaling-up Microfinance Products for Weather Risk Management: Three Proposals...
Ā 
The Cost of Capital, Corporation Finance and The Theory of Investment
The Cost of Capital, Corporation Finance and The Theory of InvestmentThe Cost of Capital, Corporation Finance and The Theory of Investment
The Cost of Capital, Corporation Finance and The Theory of Investment
Ā 
9 - Is longevity an insurable risk? (2015) (ENG)
9 - Is longevity an insurable risk? (2015) (ENG)9 - Is longevity an insurable risk? (2015) (ENG)
9 - Is longevity an insurable risk? (2015) (ENG)
Ā 
Charles Hachemeiter 1995-96 PrizeCasualty Actuarial Society USA-IPL
Charles Hachemeiter 1995-96 PrizeCasualty Actuarial Society USA-IPLCharles Hachemeiter 1995-96 PrizeCasualty Actuarial Society USA-IPL
Charles Hachemeiter 1995-96 PrizeCasualty Actuarial Society USA-IPL
Ā 

More from Giorgio Alfredo Spedicato

Machine Learning - Supervised Learning
Machine Learning - Supervised LearningMachine Learning - Supervised Learning
Machine Learning - Supervised LearningGiorgio Alfredo Spedicato
Ā 
Machine Learning - Unsupervised Learning
Machine Learning - Unsupervised LearningMachine Learning - Unsupervised Learning
Machine Learning - Unsupervised LearningGiorgio Alfredo Spedicato
Ā 
Long term care insurance with markovchain package
Long term care insurance with markovchain packageLong term care insurance with markovchain package
Long term care insurance with markovchain packageGiorgio Alfredo Spedicato
Ā 
Introduction to lifecontingencies R package
Introduction to lifecontingencies R packageIntroduction to lifecontingencies R package
Introduction to lifecontingencies R packageGiorgio Alfredo Spedicato
Ā 
Pricing and modelling under the Italian Direct Compensation Card Scheme
Pricing and modelling under the Italian Direct Compensation Card SchemePricing and modelling under the Italian Direct Compensation Card Scheme
Pricing and modelling under the Italian Direct Compensation Card SchemeGiorgio Alfredo Spedicato
Ā 
Actuarial modeling of general practictioners' drug prescriptions costs
Actuarial modeling of general practictioners' drug prescriptions costsActuarial modeling of general practictioners' drug prescriptions costs
Actuarial modeling of general practictioners' drug prescriptions costsGiorgio Alfredo Spedicato
Ā 

More from Giorgio Alfredo Spedicato (16)

Machine Learning - Supervised Learning
Machine Learning - Supervised LearningMachine Learning - Supervised Learning
Machine Learning - Supervised Learning
Ā 
Machine Learning - Unsupervised Learning
Machine Learning - Unsupervised LearningMachine Learning - Unsupervised Learning
Machine Learning - Unsupervised Learning
Ā 
Machine Learning - Principles
Machine Learning - PrinciplesMachine Learning - Principles
Machine Learning - Principles
Ā 
Machine Learning - Intro
Machine Learning - IntroMachine Learning - Intro
Machine Learning - Intro
Ā 
Meta analysis essentials
Meta analysis essentialsMeta analysis essentials
Meta analysis essentials
Ā 
Long term care insurance with markovchain package
Long term care insurance with markovchain packageLong term care insurance with markovchain package
Long term care insurance with markovchain package
Ā 
The markovchain package use r2016
The markovchain package use r2016The markovchain package use r2016
The markovchain package use r2016
Ā 
It skills for actuaries
It skills for actuariesIt skills for actuaries
It skills for actuaries
Ā 
Statistics in insurance business
Statistics in insurance businessStatistics in insurance business
Statistics in insurance business
Ā 
Spedicato r ininsurance2015
Spedicato r ininsurance2015Spedicato r ininsurance2015
Spedicato r ininsurance2015
Ā 
R in Insurance 2014
R in Insurance 2014R in Insurance 2014
R in Insurance 2014
Ā 
Introduction to lifecontingencies R package
Introduction to lifecontingencies R packageIntroduction to lifecontingencies R package
Introduction to lifecontingencies R package
Ā 
L'assicurazione rca gs
L'assicurazione rca   gsL'assicurazione rca   gs
L'assicurazione rca gs
Ā 
P & C Reserving Using GAMLSS
P & C Reserving Using GAMLSSP & C Reserving Using GAMLSS
P & C Reserving Using GAMLSS
Ā 
Pricing and modelling under the Italian Direct Compensation Card Scheme
Pricing and modelling under the Italian Direct Compensation Card SchemePricing and modelling under the Italian Direct Compensation Card Scheme
Pricing and modelling under the Italian Direct Compensation Card Scheme
Ā 
Actuarial modeling of general practictioners' drug prescriptions costs
Actuarial modeling of general practictioners' drug prescriptions costsActuarial modeling of general practictioners' drug prescriptions costs
Actuarial modeling of general practictioners' drug prescriptions costs
Ā 

Recently uploaded

Dharavi Russian callg Girls, { 09892124323 } || Call Girl In Mumbai ...
Dharavi Russian callg Girls, { 09892124323 } || Call Girl In Mumbai ...Dharavi Russian callg Girls, { 09892124323 } || Call Girl In Mumbai ...
Dharavi Russian callg Girls, { 09892124323 } || Call Girl In Mumbai ...Pooja Nehwal
Ā 
Stock Market Brief Deck (Under Pressure).pdf
Stock Market Brief Deck (Under Pressure).pdfStock Market Brief Deck (Under Pressure).pdf
Stock Market Brief Deck (Under Pressure).pdfMichael Silva
Ā 
VIP Call Girl Service Andheri West āš” 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West āš” 9920725232 What It Takes To Be The Best ...VIP Call Girl Service Andheri West āš” 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West āš” 9920725232 What It Takes To Be The Best ...dipikadinghjn ( Why You Choose Us? ) Escorts
Ā 
The Economic History of the U.S. Lecture 23.pdf
The Economic History of the U.S. Lecture 23.pdfThe Economic History of the U.S. Lecture 23.pdf
The Economic History of the U.S. Lecture 23.pdfGale Pooley
Ā 
The Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdfThe Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdfGale Pooley
Ā 
The Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdfThe Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdfGale Pooley
Ā 
VIP Independent Call Girls in Bandra West šŸŒ¹ 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West šŸŒ¹ 9920725232 ( Call Me ) Mumbai Esc...VIP Independent Call Girls in Bandra West šŸŒ¹ 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West šŸŒ¹ 9920725232 ( Call Me ) Mumbai Esc...dipikadinghjn ( Why You Choose Us? ) Escorts
Ā 
Vip Call US šŸ“ž 7738631006 āœ…Call Girls In Sakinaka ( Mumbai )
Vip Call US šŸ“ž 7738631006 āœ…Call Girls In Sakinaka ( Mumbai )Vip Call US šŸ“ž 7738631006 āœ…Call Girls In Sakinaka ( Mumbai )
Vip Call US šŸ“ž 7738631006 āœ…Call Girls In Sakinaka ( Mumbai )Pooja Nehwal
Ā 
Indore Real Estate Market Trends Report.pdf
Indore Real Estate Market Trends Report.pdfIndore Real Estate Market Trends Report.pdf
Indore Real Estate Market Trends Report.pdfSaviRakhecha1
Ā 
Independent Call Girl Number in Kurla MumbaišŸ“² Pooja Nehwal 9892124323 šŸ’ž Full ...
Independent Call Girl Number in Kurla MumbaišŸ“² Pooja Nehwal 9892124323 šŸ’ž Full ...Independent Call Girl Number in Kurla MumbaišŸ“² Pooja Nehwal 9892124323 šŸ’ž Full ...
Independent Call Girl Number in Kurla MumbaišŸ“² Pooja Nehwal 9892124323 šŸ’ž Full ...Pooja Nehwal
Ā 
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdfFinTech Belgium
Ā 
The Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdfThe Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdfGale Pooley
Ā 
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...ssifa0344
Ā 
Gurley shaw Theory of Monetary Economics.
Gurley shaw Theory of Monetary Economics.Gurley shaw Theory of Monetary Economics.
Gurley shaw Theory of Monetary Economics.Vinodha Devi
Ā 
The Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdfThe Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdfGale Pooley
Ā 
VIP Call Girl in Mira Road šŸ’§ 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road šŸ’§ 9920725232 ( Call Me ) Get A New Crush Everyday ...VIP Call Girl in Mira Road šŸ’§ 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road šŸ’§ 9920725232 ( Call Me ) Get A New Crush Everyday ...dipikadinghjn ( Why You Choose Us? ) Escorts
Ā 
The Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdfThe Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdfGale Pooley
Ā 

Recently uploaded (20)

Dharavi Russian callg Girls, { 09892124323 } || Call Girl In Mumbai ...
Dharavi Russian callg Girls, { 09892124323 } || Call Girl In Mumbai ...Dharavi Russian callg Girls, { 09892124323 } || Call Girl In Mumbai ...
Dharavi Russian callg Girls, { 09892124323 } || Call Girl In Mumbai ...
Ā 
Stock Market Brief Deck (Under Pressure).pdf
Stock Market Brief Deck (Under Pressure).pdfStock Market Brief Deck (Under Pressure).pdf
Stock Market Brief Deck (Under Pressure).pdf
Ā 
VIP Call Girl Service Andheri West āš” 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West āš” 9920725232 What It Takes To Be The Best ...VIP Call Girl Service Andheri West āš” 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West āš” 9920725232 What It Takes To Be The Best ...
Ā 
The Economic History of the U.S. Lecture 23.pdf
The Economic History of the U.S. Lecture 23.pdfThe Economic History of the U.S. Lecture 23.pdf
The Economic History of the U.S. Lecture 23.pdf
Ā 
The Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdfThe Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdf
Ā 
The Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdfThe Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdf
Ā 
Veritas Interim Report 1 Januaryā€“31 March 2024
Veritas Interim Report 1 Januaryā€“31 March 2024Veritas Interim Report 1 Januaryā€“31 March 2024
Veritas Interim Report 1 Januaryā€“31 March 2024
Ā 
VIP Independent Call Girls in Bandra West šŸŒ¹ 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West šŸŒ¹ 9920725232 ( Call Me ) Mumbai Esc...VIP Independent Call Girls in Bandra West šŸŒ¹ 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West šŸŒ¹ 9920725232 ( Call Me ) Mumbai Esc...
Ā 
Vip Call US šŸ“ž 7738631006 āœ…Call Girls In Sakinaka ( Mumbai )
Vip Call US šŸ“ž 7738631006 āœ…Call Girls In Sakinaka ( Mumbai )Vip Call US šŸ“ž 7738631006 āœ…Call Girls In Sakinaka ( Mumbai )
Vip Call US šŸ“ž 7738631006 āœ…Call Girls In Sakinaka ( Mumbai )
Ā 
Indore Real Estate Market Trends Report.pdf
Indore Real Estate Market Trends Report.pdfIndore Real Estate Market Trends Report.pdf
Indore Real Estate Market Trends Report.pdf
Ā 
Independent Call Girl Number in Kurla MumbaišŸ“² Pooja Nehwal 9892124323 šŸ’ž Full ...
Independent Call Girl Number in Kurla MumbaišŸ“² Pooja Nehwal 9892124323 šŸ’ž Full ...Independent Call Girl Number in Kurla MumbaišŸ“² Pooja Nehwal 9892124323 šŸ’ž Full ...
Independent Call Girl Number in Kurla MumbaišŸ“² Pooja Nehwal 9892124323 šŸ’ž Full ...
Ā 
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf
Ā 
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
Ā 
(Vedika) Low Rate Call Girls in Pune Call Now 8250077686 Pune Escorts 24x7
(Vedika) Low Rate Call Girls in Pune Call Now 8250077686 Pune Escorts 24x7(Vedika) Low Rate Call Girls in Pune Call Now 8250077686 Pune Escorts 24x7
(Vedika) Low Rate Call Girls in Pune Call Now 8250077686 Pune Escorts 24x7
Ā 
The Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdfThe Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdf
Ā 
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Ā 
Gurley shaw Theory of Monetary Economics.
Gurley shaw Theory of Monetary Economics.Gurley shaw Theory of Monetary Economics.
Gurley shaw Theory of Monetary Economics.
Ā 
The Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdfThe Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdf
Ā 
VIP Call Girl in Mira Road šŸ’§ 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road šŸ’§ 9920725232 ( Call Me ) Get A New Crush Everyday ...VIP Call Girl in Mira Road šŸ’§ 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road šŸ’§ 9920725232 ( Call Me ) Get A New Crush Everyday ...
Ā 
The Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdfThe Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdf
Ā 

Princing insurance contracts with R

  • 1. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Pricing Insurance Contracts with R R in Insurance conference CASS Business School London 15th 2013 Giorgio Alfredo Spedicato Ph.D C.Stat ACAS 15th July 2013 Spedicato G.A. Pricing Insurance Contracts with R
  • 2. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Table of contents 1 Introduction 2 Pricing life contingency insurances 3 Personal lines pricing with R 4 XL reinsurance contracts pricing with R 5 Appendix: code Spedicato G.A. Pricing Insurance Contracts with R
  • 3. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Outline 1 Introduction 2 Pricing life contingency insurances 3 Personal lines pricing with R 4 XL reinsurance contracts pricing with R 5 Appendix: code Spedicato G.A. Pricing Insurance Contracts with R
  • 4. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c R for insurance applications R statistical system, [R Development Core Team, 2012], is becoming the leading software for performing statistical analysis in Academics. Also, in business application it is now a reliable competitor to aļ¬ƒrmed data analysis software like SAS [SAS Institute Inc., 2011], SPSS [IBM Corp, 2012] and Matlab [The MathWorks Inc., 2010]. Packages speciļ¬cally devoted to actuarial applications have been available for some years especially for non - life business applications. This presentation will show how R can be successfully applied to price insurance contracts. Life insurances, general insurances personal lines and XL reinsurance treaty rate making will be shown. Spedicato G.A. Pricing Insurance Contracts with R
  • 5. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c What does pricing mean? Insurance pricing means setting the cost of the future uncertain beneļ¬ts the insurer would provide to its policyholders. An insurance rate, P, is an estimate of the expected value of future costs, that provides for all costs associated with the transfer of risk, according to CAS ratemaking principles [Casualty Actuarial Society, 1988]. PV (P) = PV ĖœL + ĖœE + Q (1) Spedicato G.A. Pricing Insurance Contracts with R
  • 6. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c What this presentation shows Costs associated with the transfer of risk that premium ĖœP allows for are: the future claims cost ĖœL, allocated expenses E as well as proļ¬t and contingency loads Q as Equation 1 expresses. In the examples that follow, in addition to future losses / insurance beneļ¬ts ĖœL, the premium will have a provision for 5% of variable expenses. Only for life insurances future insurance beneļ¬t will be discounted by 2.5% (PV). The proļ¬t load percentage will be calculated in order the insurer to earn 15% on allocated capital. Allocated capital will be calculated using a VaR approach: Ct = ĖœL.99 āˆ’ E ĖœL , being ĖœL the portfolio beneļ¬t distribution and allowed within the proļ¬t and contingency load ĖœL as Equation 2 displays. CoCper contract = 0.15 āˆ— ĖœL.99 āˆ’ E ĖœL Exposures (2) Spedicato G.A. Pricing Insurance Contracts with R
  • 7. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c What this presentation shows All examples will show that R tools can be used to model not only the cost component, ĖœL, but also to appreciate the underlying cost of capital above deļ¬ned on which the proļ¬t and contingency load will be calculated. Full code for the three example will be shown in the Appendix. Spedicato G.A. Pricing Insurance Contracts with R
  • 8. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Outline 1 Introduction 2 Pricing life contingency insurances 3 Personal lines pricing with R 4 XL reinsurance contracts pricing with R 5 Appendix: code Spedicato G.A. Pricing Insurance Contracts with R
  • 9. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Life insurance pricing Pricing life insurance contracts requires demographical assumptions to be set out since future cash ļ¬‚ows are contingent on policyholders life status (life contingencies). Similarly, ļ¬nancial assumptions are required as well since the long duration of life contracts allows the insurer to invest premiums and reserves proceeds. The example that follows is worked out with R package lifecontingencies, [Spedicato, 2013]. It provides a full set of functions that life actuaries could use in their professional activity. Spedicato G.A. Pricing Insurance Contracts with R
  • 10. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Life insurance example A term life insurance is to be sold to 1,000 individuals each aged 25, term is 40 years. Face value is 100,000, single premium. Assume SoA illustrative life table to hold, interest rate 2.5% Acquisition and handling expenses are: 3% of premium. Proļ¬t load is 15% of the portfolio beneļ¬t distribution. Spedicato G.A. Pricing Insurance Contracts with R
  • 11. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Life insurance example lifecontingencies package [Spedicato, 2013] allows the actuary to model the full distribution of underlying life contingency random variable, ĖœL, not only its classical actuarial present value 100000 āˆ— A 1 25:40 . This allows to straightly incorporate capital consideration in life insurance pricing. Figure 1 shows the distribution of the beneļ¬ts associated to a single policy. Table 1 displays key ļ¬gures for the life insurance pricing exercise exempliļ¬ed. Spedicato G.A. Pricing Insurance Contracts with R
  • 12. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Life insurance example Spedicato G.A. Pricing Insurance Contracts with R
  • 13. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Life insurance example size 1000.00 capital 100000.00 duration 40.00 age 25.00 expense ratio 0.03 ļ¬nal premium 9994.42 Table : Life insurance example key ļ¬gures Spedicato G.A. Pricing Insurance Contracts with R
  • 14. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Outline 1 Introduction 2 Pricing life contingency insurances 3 Personal lines pricing with R 4 XL reinsurance contracts pricing with R 5 Appendix: code Spedicato G.A. Pricing Insurance Contracts with R
  • 15. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Introduction Personal lines data bases contain millions of record regarding policyholdersā€™ contracts and associated claims. It is customary to buld predictive models on the frequency, severity and (or directly) the risk premium of the coverages. Currently, log-linear GLMs are the most used models. Often ļ¬nal relativities diverge from modelled ones allowing for regulatory and / or marketing constraints. Spedicato G.A. Pricing Insurance Contracts with R
  • 16. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Introduction Standard GLM can be ļ¬t using glm function within base R. Tweedie GLM used to ļ¬t directly risk premium is implemented in cplm package, [Zhang, 2012]. In case needed, R parallel package can reduce the time to simulate the portfolio aggregated total loss Spedicato G.A. Pricing Insurance Contracts with R
  • 17. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c The MTPL example The data comes from faraway package [Faraway, 2011]. A worked actuarial example on this dataset can be found in [Spedicato, 2012]. It contains aggregate exposures, number and total MTPL losses by level of classiļ¬cation variable of the Swedish MTPL insurance bureau (70s data). While very old, it is however very didactical. Models on the frequency and the severity of losses will be ļ¬t. Similarly, the distribution of insured beneļ¬ts will be modelled in order to incorporate cost of capital consideration in the ļ¬nal rate. Spedicato G.A. Pricing Insurance Contracts with R
  • 18. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Frequency modelling Frequency is modelled by an overdispersed Poisson model using ln Insured as oļ¬€set term. Figure 2 shows the coeļ¬ƒcient plot as given by coefplot [Lander, 2013] package. The interpretation is quite natural for some coeļ¬ƒcients. For example, frequency decreases by Bonus level and increases by Average Mileage. Vehicle make and territory relativities are also displayed. Spedicato G.A. Pricing Insurance Contracts with R
  • 19. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Frequency modelling Spedicato G.A. Pricing Insurance Contracts with R
  • 20. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Severity model Claim cost is modelled by a Gamma log-linar model The severity is used as dependent variable and number of claims is used as weight. Spedicato G.A. Pricing Insurance Contracts with R
  • 21. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Severity modelling Spedicato G.A. Pricing Insurance Contracts with R
  • 22. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Pure premium modelling Fitted frequency and severity are saved for each row in order the pure premium to be calculated. Two Gamma GLM models will be ļ¬t on such calculated value: one unconstrained and one constrained (that takes into account pre - set values of Bonus coeļ¬ƒcients). Table 2 compare ļ¬nal coeļ¬ƒcients of both models. They have been exponentiate in order to represent relativities with respect to a base premium. The intercept of the constrained model, multiplied by a balancing value to totalized the expected claim cost, is the base premium that the reference insured (living in Zone 4, having bonus 0, less than 1000Km, driving a Make 9 car) will pay. Spedicato G.A. Pricing Insurance Contracts with R
  • 23. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Rate relativities coeļ¬ƒcients levels free restricted (Intercept) 445.69 435.68 Kilometres2: 1001-15000 1.24 1.23 Kilometres3: 15001-20000 1.38 1.38 Kilometres4: 20000-25 000 1.51 1.52 Kilometres5: 25001+ 1.79 1.80 Make1 1.14 1.16 Make2 1.21 1.24 Make3 1.01 1.04 Make4 0.49 0.47 Make5 1.22 1.24 Make6 0.78 0.78 Make7 0.97 0.99 Make8 1.42 1.46 Zone1: Stockholm, Goteborg, Malmo 1.56 1.54 Zone2: Other large cities 1.26 1.25 Zone3: Smaller cities southern Sweden 1.12 1.11 Zone5: Smaller cities northern Sweden 1.20 1.19 Zone6: Rural areas northern Sweden 1.08 1.08 Zone7: Gotland 0.84 0.84 Table : MTPL tariļ¬€ relativities Spedicato G.A. Pricing Insurance Contracts with R
  • 24. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Capital consideration It is possible to generate the distribution of portfolio total losses as sum of each row simulated total losses. Each row total loss is the convolution of Poisson distributed claim with ĖœĪ» equal to ļ¬tted frequency. Each claim is assumed to follow a Gamma distribution whose parameters can be calculated backward thanks to GLM theory assumptions (Equation 3). E [Ėœc] = Āµi var [Ėœc] = Ļ†Āµ2 i (3) Spedicato G.A. Pricing Insurance Contracts with R
  • 25. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Capital consideration Spedicato G.A. Pricing Insurance Contracts with R
  • 26. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Finalizing the tariļ¬€ Each row total losses are simulated many times and the distribution of Portfolio total losses, ĖœL is therefore derived, as Figure 4 shows. Keeping the assumption the portfolio not to change in terms of size and underwriting mix, it can be derived an average cost of capital per unit of exposures. Table 3 summarizes key ļ¬gures regarding the MTPL pricing exercise. Spedicato G.A. Pricing Insurance Contracts with R
  • 27. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Finalizing the tariļ¬€ exposures 2379212.08 frequency 0.05 severity 4955.25 average premium 243.48 Table : Personal Lines Example Key Figures Spedicato G.A. Pricing Insurance Contracts with R
  • 28. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Outline 1 Introduction 2 Pricing life contingency insurances 3 Personal lines pricing with R 4 XL reinsurance contracts pricing with R 5 Appendix: code Spedicato G.A. Pricing Insurance Contracts with R
  • 29. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Introduction XL reinsurance contracts cover primary insurer for large losses. They are used to stabilize portfoliosā€™ loss experience and to reduce their volatility. Clarkā€™s paper [Clark, 1996] provides a very good introduction about pricing reisurance contracts. Typical tools used for reinsurance pricing are: loss distribution modelling, extreme value theory and convolution theory. Spedicato G.A. Pricing Insurance Contracts with R
  • 30. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c The XL example A primary insurer seeks coverage for an MTPL portfolio. Estimated exposures are 500K and the subject premium (GWP) is 250Mln. It asks a quote for 10xs2 Mln. It has provided historical ground up losses over 500K that have been trended and developed to ultimate for the analysis. Spedicato G.A. Pricing Insurance Contracts with R
  • 31. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c The pricing methodology Model the cost, ĖœX, and the frequency, ĖœN, of gross claims using distribution ļ¬tting Apply convolution theory to determine the total gross ĖœLgross and ceded, ĖœLceded, losses. Apply loads (expenses and proļ¬t contingency) and quote the price as a percentage of subject premium. Spedicato G.A. Pricing Insurance Contracts with R
  • 32. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Cost modelling The distribution of large losses should be carefully assessed. actuar package, [Dutang et al., 2008], package provide a wide set of loss distribution densities and utility functions. R packages ļ¬tdistrplus, [Delignette-Muller et al., 2012], for distribution ļ¬tting, and ADGofTestR, [Bellosta, 2011], for AD test of goodness of ļ¬t help for it. The analysis on individual large losses data shows that Weibull distribution provides the better ļ¬t, as Figure 5 shows. This is well conļ¬rmed also by Anderson Darling test. Spedicato G.A. Pricing Insurance Contracts with R
  • 33. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Cost Modelling Spedicato G.A. Pricing Insurance Contracts with R
  • 34. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Frequency modelling Historical portfolio analysis (omitted) leads to set the frequency of losses in exess of 1Mln to 0.00001. The is need to simulate gross and ceded total losses. Convolution theory is used for this purpose. Spedicato G.A. Pricing Insurance Contracts with R
  • 35. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Ceded loss distribution Gross total losses will be modelled by convolution as well as ceded ones. We assume the number of claim to follow a Poisson law of parameter Ī» = E āˆ— 0.00001. Each gross loss, ĖœXgross, will follow Weibull distribution using parameters ļ¬tted in previous step, for the exceeding 1Mln portion. Ceded claims will be ĖœXceded = min(L, max(0, ĖœX āˆ’ P)), being L = 10Mln and P = 2Mln. Their distribution is shown in Figure 6. ĖœL = i=0...ĖœN Xi (4) Spedicato G.A. Pricing Insurance Contracts with R
  • 36. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Ceded loss distribution Spedicato G.A. Pricing Insurance Contracts with R
  • 37. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Final XL quote subject premium (SP) 250.00 expected ceded losses 0.71 rate (percent of SP) 0.55 Table : XL Reinsurance example key ļ¬gures Spedicato G.A. Pricing Insurance Contracts with R
  • 38. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Outline 1 Introduction 2 Pricing life contingency insurances 3 Personal lines pricing with R 4 XL reinsurance contracts pricing with R 5 Appendix: code Spedicato G.A. Pricing Insurance Contracts with R
  • 39. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Life insurance code I > source("lifeInsurance.R",echo=TRUE) > library(lifecontingencies) #load the library > data(soaLt) #load the data frame containing x and lx > portfolioSize=1000 #define the size of the portfolio > #price the contract > > actuarialtable4Example=new("actuarialtable", x=soaLt$x, lx=soaLt$Ix, interest= > oneContractDistribution=100000*rLifeContingencies(n=50000,lifecontingency="Axn > meanValue=portfolioSize*100000*Axn(actuarialtable4Example,25,40) #mean value o > allocatedCapital=qnorm(p=0.99,mean=meanValue, sd=sd(oneContractDistribution)*s > profitLoadPerContract=0.15*allocatedCapital/portfolioSize #allocate profit to Spedicato G.A. Pricing Insurance Contracts with R
  • 40. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Life insurance code II > #final premium > PStochastic=(100000*Axn(actuarialtable4Example,25,40)+profitLoadPerContract)/( > #save results > png("./figures/lifeIns.png") > hist(oneContractDistribution, col="steelblue", + main="Life insurance contracts benefit present value distribution") > abline(v=mean(oneContractDistribution), col="red",lwd=3) > abline(v=quantile(oneContractDistribution, p=0.99), col="orange",lwd=3) > dev.off() null device 1 > infos=c("size", "capital", "duration", "age", "expense ratio", "final premium" > value=c(1000, 100000, 40, 25, 0.03, PStochastic) #save data Spedicato G.A. Pricing Insurance Contracts with R
  • 41. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Life insurance code III > dfInfoLife=data.frame(infos, value) > #out to latex > > print(xtable(dfInfoLife, caption="Life insurance example key figures", + label="tab:lifeIns"), include.row=FALSE, i .... [TRUNCATED] Spedicato G.A. Pricing Insurance Contracts with R
  • 42. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c MTPL pricing code I > source("personalLines.R",echo=TRUE) > #load data > data(motorins,package="faraway") > #data preparation using descriptions in motorins > dataset<-transform(motorins, + Kilometres=factor(Kilometres, levels=c(1:5), + .... [TRUNCATED] > #set the reference level the one with most exposure > dataset$Zone=relevel(dataset$Zone, ref="4: Rural areas southern Sweden") > dataset$Make=relevel(dataset$Make, ref="9") > #define the bonus malus scale > bonusCoefficient<-function(varBonus) + { + out=NULL + if(varBonus==1) out=1 else Spedicato G.A. Pricing Insurance Contracts with R
  • 43. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c MTPL pricing code II + if(varBonus==2 .... [TRUNCATED] > attach(dataset) The following object(s) are masked from 'dataset (position 3)': Bonus, BonusNum, Claims, Insured, Kilometres, Make, Payment, perd, Zone The following object(s) are masked from 'dataset (position 4)': Bonus, BonusNum, Claims, Insured, Kilometres, Make, Payment, perd, Zone The following object(s) are masked from 'dataset (position 5)': Bonus, BonusNum, Claims, Insured, Kilometres, Make, Payment, perd, Zone The following object(s) are masked from 'dataset (position 6)': Bonus, BonusNum, Claims, Insured, Kilometres, Make, Payment, perd, Zone The following object(s) are masked from 'dataset (position 7)': Bonus, BonusNum, Claims, Insured, Kilometres, Make, Payment, perd, Zone The following object(s) are masked from 'dataset (position 8)': Spedicato G.A. Pricing Insurance Contracts with R
  • 44. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c MTPL pricing code III Bonus, BonusNum, Claims, Insured, Kilometres, Make, Payment, perd, Zone The following object(s) are masked from 'temp (position 9)': Bonus, BonusNum, Claims, Insured, Kilometres, Make, Payment, perd, Zone The following object(s) are masked from 'temp (position 10)': Bonus, BonusNum, Claims, Insured, Kilometres, Make, Payment, perd, Zone The following object(s) are masked from 'temp (position 11)': Bonus, BonusNum, Claims, Insured, Kilometres, Make, Payment, perd, Zone The following object(s) are masked from 'dataset (position 12)': Bonus, BonusNum, Claims, Insured, Kilometres, Make, Payment, perd, Zone > ncdCoeff=sapply(as.numeric(Bonus),bonusCoefficient) > detach(dataset) > dataset$ncdCoeff=ncdCoeff Spedicato G.A. Pricing Insurance Contracts with R
  • 45. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c MTPL pricing code IV > freqModel<-glm(Claims~Kilometres+Zone+Bonus+ + Make,offset=log(Insured), data=dataset,family="poisson") > library(coefplot) > png("./figures/modelFreq.png") > coefplot(model=freqModel, intercept=FALSE, title="Frequency model coef plot", > dev.off() null device 1 > #severity modelling > > dataset$averageCost=with(dataset, Payment/Claims) > #Gamma GLM on severity > sevModel<-glm(averageCost~Zone+Make+Bonus+Kilometres, + weights=Claims, data=dataset, family=Gamma(link="log ..." ... [T Spedicato G.A. Pricing Insurance Contracts with R
  • 46. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c MTPL pricing code V > anova(sevModel, test="Chisq") #test III Analysis of Deviance Table Model: Gamma, link: log Response: averageCost Terms added sequentially (first to last) Df Deviance Resid. Df Resid. Dev Pr(>Chi) NULL 1796 5417.7 Zone 6 402.23 1790 5015.5 < 2.2e-16 *** Make 8 242.34 1782 4773.2 1.809e-14 *** Bonus 6 225.86 1776 4547.3 1.834e-14 *** Kilometres 4 20.73 1772 4526.6 0.1345 --- Signif. codes: 0 ā€˜***ā€™ 0.001 ā€˜**ā€™ 0.01 ā€˜*ā€™ 0.05 ā€˜.ā€™ 0.1 ā€˜ ā€™ 1 Spedicato G.A. Pricing Insurance Contracts with R
  • 47. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c MTPL pricing code VI > #Kilometres factor not significant > sevModel<-update(sevModel, ~.-Kilometres) > anova(sevModel, test="Chisq") #test III Analysis of Deviance Table Model: Gamma, link: log Response: averageCost Terms added sequentially (first to last) Df Deviance Resid. Df Resid. Dev Pr(>Chi) NULL 1796 5417.7 Zone 6 402.23 1790 5015.5 < 2.2e-16 *** Make 8 242.34 1782 4773.2 2.619e-14 *** Bonus 6 225.86 1776 4547.3 2.610e-14 *** --- Signif. codes: 0 ā€˜***ā€™ 0.001 ā€˜**ā€™ 0.01 ā€˜*ā€™ 0.05 ā€˜.ā€™ 0.1 ā€˜ ā€™ 1 Spedicato G.A. Pricing Insurance Contracts with R
  • 48. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c MTPL pricing code VII > #we decide to remove also Bonus even if statistically significant, as > #coefficients profile seem judgmentally randomic > sevModel<-update(sevMode .... [TRUNCATED] > png("./figures/sevModel.png") > coefplot(model=sevModel, intercept=FALSE, title="Severity model coef plot", yl > dev.off() null device 1 > #calculate fitted frequency and fitted severity > fittedFrequency=predict(object=freqModel, newdata=dataset,type="response") > fittedSeverity=predict(object=sevModel, newdata=dataset,type="response") > #add those columns on main dataset for convenience > dataset<-transform(dataset, Spedicato G.A. Pricing Insurance Contracts with R
  • 49. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c MTPL pricing code VIII + fittedFrequency=fittedFrequency, + .... [TRUNCATED] > #check overall balance > with(dataset, sum(purePremium*Insured)) [1] 560787950 > with(dataset, sum(Payment)) [1] 560790681 > #the difference between actual losses and losse amount is not material > #add bonus malus coefficient > dataset<-transform(dataset, + .... [TRUNCATED] > burnCostFreeModel<-glm(purePremium~Zone+Bonus+Make+Kilometres, + weights=Insured, data=dataset, family=Gamma(link="log") > ######################################## > #model free and constrained pure premiums Spedicato G.A. Pricing Insurance Contracts with R
  • 50. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c MTPL pricing code IX > ######################################## > burnCostFreeModel< .... [TRUNCATED] > #this is the burning cost model with bonus malus coefficients constrained > burnCostConstrModel<-glm(purePremium~Zone+Make+Kilometres, + .... [TRUNCATED] > #add the risk premium to the dataset > dataset$risk_premium=predict(burnCostConstrModel, + newdata=dataset, type="resp ..." ... [TRUNCATED] > #check the balance > #actual total losses > balancingValue<-with(dataset, sum(Payment)/sum(Insured*risk_premium)) > #5% delta > > ################################################### > ### coefficient comparisons > ################################################# .... [TRUNCATED] Spedicato G.A. Pricing Insurance Contracts with R
  • 51. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c MTPL pricing code X > coefConstr<-coef(burnCostConstrModel) > #create a pretty table and exponentiate coefficients > tableCoefFree<-data.frame(levels=names(coefFree), + coefficientsFr .... [TRUNCATED] > tableCoefConstr<-data.frame(levels=names(coefConstr), + coefficientRestricted=exp(as.numeric(coefConstr))) > tableCoeff<-merge(x=tableCoefFree,y=tableCoefConstr) > names(tableCoeff)[2:3]<-c("free","restricted") > print(xtable(tableCoeff, caption="MTPL tariff relativities", label="tab:MTPLRe + include.row=FALSE, include.col=TRUE, size="scriptsize", .... [TRUNCATED] > #calculate the variance > temp<-dataset Spedicato G.A. Pricing Insurance Contracts with R
  • 52. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c MTPL pricing code XI > temp$costDisp=2.983458 #fDisprom Severity Model > temp$costVar=with(temp, averageCost^2*costDisp) #calculate the cost conditiona > temp$scaleCost=with(temp, costVar/averageCost) #calculate the scale > temp$shapeCost=with(temp, averageCost/scaleCost) > dataset<-temp > # > #nsim=1000 > #simMatrix<-matrix(0, nrow=nrow(dataset),ncol=nsim) > # .convolve<-function(num, shape, scale) > # { > # out=numeric(1) > # ou .... [TRUNCATED] > #finalizing the tariff Spedicato G.A. Pricing Insurance Contracts with R
  • 53. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c MTPL pricing code XII > > #cost of capital > > MTPLCoC=0.15*(quantile(portfolioLosses,.99)-mean(portfolioLosses)) > MTPLCoCxInsured=MTPLCoC/sum(dataset$Insured) > dataset$FinalCommercialPremium=(MTPLCoCxInsured+balancingValue*dataset$risk_pr > png("./figures/mtplPTFdist.png") > hist(portfolioLosses, main="MTPL portfolio Total Loss Distribution", xlab="tot > abline(v=mean(portfolioLosses), col="red",lwd=3) > abline(v=quantile(portfolioLosses, p=0.99),col="orange",lwd=3) > dev.off() null device 1 Spedicato G.A. Pricing Insurance Contracts with R
  • 54. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c MTPL pricing code XIII > #summarize > attach(dataset) The following object(s) are masked _by_ '.GlobalEnv': fittedFrequency, fittedSeverity, ncdCoeff The following object(s) are masked from 'dataset (position 3)': averageCost, Bonus, BonusNum, Claims, costDisp, costVar, FinalCommercialPremium, fittedFrequency, fittedSeverity, Insured, Kilometres, Make, ncdCoeff, Payment, perd, purePremium, risk_premium, scaleCost, shapeCost, Zone The following object(s) are masked from 'dataset (position 4)': averageCost, Bonus, BonusNum, Claims, costDisp, costVar, FinalCommercialPremium, fittedFrequency, fittedSeverity, Insured, Kilometres, Make, ncdCoeff, Payment, perd, purePremium, risk_premium, scaleCost, shapeCost, Zone The following object(s) are masked from 'dataset (position 5)': Spedicato G.A. Pricing Insurance Contracts with R
  • 55. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c MTPL pricing code XIV averageCost, Bonus, BonusNum, Claims, costDisp, costVar, FinalCommercialPremium, fittedFrequency, fittedSeverity, Insured, Kilometres, Make, ncdCoeff, Payment, perd, purePremium, risk_premium, scaleCost, shapeCost, Zone The following object(s) are masked from 'dataset (position 6)': averageCost, Bonus, BonusNum, Claims, costDisp, costVar, FinalCommercialPremium, fittedFrequency, fittedSeverity, Insured, Kilometres, Make, ncdCoeff, Payment, perd, purePremium, risk_premium, scaleCost, shapeCost, Zone The following object(s) are masked from 'dataset (position 7)': averageCost, Bonus, BonusNum, Claims, costDisp, costVar, FinalCommercialPremium, fittedFrequency, fittedSeverity, Insured, Kilometres, Make, ncdCoeff, Payment, perd, purePremium, risk_premium, scaleCost, shapeCost, Zone The following object(s) are masked from 'dataset (position 8)': averageCost, Bonus, BonusNum, Claims, costDisp, costVar, FinalCommercialPremium, fittedFrequency, fittedSeverity, Insured, Spedicato G.A. Pricing Insurance Contracts with R
  • 56. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c MTPL pricing code XV Kilometres, Make, ncdCoeff, Payment, perd, purePremium, risk_premium, scaleCost, shapeCost, Zone The following object(s) are masked from 'temp (position 9)': averageCost, Bonus, BonusNum, Claims, costDisp, costVar, fittedFrequency, fittedSeverity, Insured, Kilometres, Make, ncdCoeff, Payment, perd, purePremium, risk_premium, scaleCost, shapeCost, Zone The following object(s) are masked from 'temp (position 10)': averageCost, Bonus, BonusNum, Claims, costDisp, costVar, fittedFrequency, fittedSeverity, Insured, Kilometres, Make, ncdCoeff, Payment, perd, purePremium, risk_premium, scaleCost, shapeCost, Zone The following object(s) are masked from 'temp (position 11)': averageCost, Bonus, BonusNum, Claims, costDisp, costVar, fittedFrequency, fittedSeverity, Insured, Kilometres, Make, ncdCoeff, Payment, perd, purePremium, risk_premium, scaleCost, shapeCost, Zone The following object(s) are masked from 'dataset (position 12)': averageCost, Bonus, BonusNum, Claims, costDisp, costVar, Spedicato G.A. Pricing Insurance Contracts with R
  • 57. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c MTPL pricing code XVI FinalCommercialPremium, fittedFrequency, fittedSeverity, Insured, Kilometres, Make, ncdCoeff, Payment, perd, purePremium, risk_premium, scaleCost, shapeCost, Zone > infos=c("exposures", "frequency", "severity", "average premium") > values=c(sum(Insured), sum(Claims)/sum(Insured), sum(Payment)/sum(Claims), + sum(FinalCommercialPremium*Insured)/sum(Insured)) > dfInfoMTPL=data.frame(infos, values) > print(xtable(dfInfoMTPL, caption="Personal Lines Example Key Figures", + label="tab:personalLinesSummary"), + include.row=FALSE .... [TRUNCATED] Spedicato G.A. Pricing Insurance Contracts with R
  • 58. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c XL Code I > source("xlpricing.R",echo=TRUE) > #pricing xl contracts with R > > #severity fitting > > library(fitdistrplus) #load fitdistrplus package > library(actuar) #load package for distributions > library(ADGofTest) #load package to fit anderson darling > load(file="xlClaims.RData") > claims2analyze=mtplLargeClaims$ultimate_cost[mtplLargeClaims$ultimate_cost>10^ > #try various function > fitGamma<-fitdist(data=claims2analyze, distr="gamma", method="mme") #gamma wit > fitWeibull<-fitdist(data=claims2analyze, distr="weibull", method="mle") #Weibu Spedicato G.A. Pricing Insurance Contracts with R
  • 59. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c XL Code II > #lognormal > fitLognormal<-fitdist(data=claims2analyze, distr="lnorm", method="mge",gof="AD > #fitĀøcLogistic<-fitdist(data=claims2analyze, distr="logis", method="mle") > > #check wich bet > > #check which distribution is better > ad.test(cla .... [TRUNCATED] Anderson-Darling GoF Test data: claims2analyze and pgamma AD = 0.4421, p-value = 0.806 alternative hypothesis: NA > ad.test(claims2analyze, pweibull, fitWeibull$estimate[1],fitWeibull$estimate[2 Spedicato G.A. Pricing Insurance Contracts with R
  • 60. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c XL Code III Anderson-Darling GoF Test data: claims2analyze and pweibull AD = 0.2758, p-value = 0.9551 alternative hypothesis: NA > ad.test(claims2analyze, plnorm, fitLognormal$estimate[1],fitLognormal$estimate Anderson-Darling GoF Test data: claims2analyze and plnorm AD = 4.2878, p-value = 0.006332 alternative hypothesis: NA > png("./figures/weibullFit.png") > plot(fitWeibull) Spedicato G.A. Pricing Insurance Contracts with R
  • 61. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c XL Code IV > dev.off() null device 1 > #apply convolution to find the ceded total loss distribution > > E=500000 > freq=1*10^-5 > lambda=E*freq > nsim=10000 > grossLosses=numeric(nsim) > cededLosses=numeric(nsim) > netLosses=numeric(nsim) Spedicato G.A. Pricing Insurance Contracts with R
  • 62. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c XL Code V > #function to get ceded losses > .getCeded<-function(grossLoss, priority, limit) + { + out=numeric(1) + out=min(limit, max(0, grossLoss-priority) .... [TRUNCATED] > #convolution modelling > > for(i in 1:nsim) + { + num=rpois(1, lambda) #simulate the number of claims + if(num==0) { + grossLosses[i]=0 + .... [TRUNCATED] > #price the contract > > expRatio=0.05 > SubjectPremium=250*10^6 Spedicato G.A. Pricing Insurance Contracts with R
  • 63. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c XL Code VI > allocatedCapital=quantile(cededLosses,.99)-mean(cededLosses) > burningCost=(mean(cededLosses)+0.15*allocatedCapital)/(1-expRatio) > rate=(burningCost)/SubjectPremium > infos=c("subject premium (SP)", "expected ceded losses", "rate (percent of SP) > value=c(SubjectPremium/10^6, mean(cededLosses)*10^-6, rate*100 ) #save data > dfInfoXL=data.frame(infos, value) > #out to latex > png("./figures/xlCededDistr.png") > hist(cededLosses, breaks=50, col="steelblue", main="Ceded losses distribution" > dev.off() null device Spedicato G.A. Pricing Insurance Contracts with R
  • 64. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c XL Code VII 1 > print(xtable(dfInfoXL, caption="XL Reinsurance example key figures", digit=2, + label="tab:xlReinsurance"), include.row=FALSE, include. .... [TRU Spedicato G.A. Pricing Insurance Contracts with R
  • 65. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Reference I Bellosta, C. J. G. (2011). ADGofTest: Anderson-Darling GoF test. R package version 0.3. Casualty Actuarial Society (1988). Statement of principles regarding property and casualty insurance ratemaking. http://www.casact.org/professionalism/standards/princip/sppcrate.pdf. Online; accessed 25-05-2013. Clark, D. R. (1996). Basics of reinsurance pricing. CAS Study Note, pages 41ā€“43. Delignette-Muller, M. L., Pouillot, R., Denis, J.-B., and Dutang, C. (2012). ļ¬tdistrplus: help to ļ¬t of a parametric distribution to non-censored or censored data. R package version 1.0-0. Dutang, C., Goulet, V., and Pigeon, M. (2008). actuar: An r package for actuarial science. Journal of Statistical Software, 25(7):38. Faraway, J. (2011). faraway: Functions and datasets for books by Julian Faraway. R package version 1.0.5. Spedicato G.A. Pricing Insurance Contracts with R
  • 66. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Reference II IBM Corp (2012). SPSS, Release 21.0 Advanced Statistical Procedures Companion. IBM Corp., Armonk, NY. Lander, J. P. (2013). coefplot: Plots Coeļ¬ƒcients from Fitted Models. R package version 1.2.0. R Development Core Team (2012). R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. ISBN 3-900051-07-0. SAS Institute Inc. (2011). SAS/STAT Software, Version9.3. Cary, NC. Spedicato, G. A. (2012). Third party motor liability ratemaking with r. http://www.casact.org/research/wp/papers/working-paper-spedicato-%202012-06.pdf. Casualty Actuarial Society Working Paper. Spedicato, G. A. (2013). Lifecontingencies: an R package to perform life contingencies actuarial mathematics. R package version 0.9.7. Spedicato G.A. Pricing Insurance Contracts with R
  • 67. Introduction Pricing life contingency insurances Personal lines pricing with R XL reinsurance contracts pricing with R Appendix: c Reference III The MathWorks Inc. (2010). MATLAB Version 7.10.0 (R2010a). The MathWorks Inc., Natick, Massachusetts. Zhang, W. (2012). cplm: Compound Poisson linear models. R package version 0.6-4. Spedicato G.A. Pricing Insurance Contracts with R