Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Pricing Mortality Swaps Using R
R in Insurance 2015
Mick Cooney
michael.cooney@applied.ai
29 June 2015
Mick Cooney michael...
Before I Begin...
https://xkcd.com/793/
Mick Cooney michael.cooney@applied.ai Applied AI Ltd
Pricing Mortality Swaps Using...
What is a Mortality Swap?
Seller provides protection against mortality risk
Portfolio of Life-Contingent Annuities
Convert...
Swap Annuity Portfolio
Random portfolio of annuities:
## customerid age MUR amount
## 1: C97326460 39 350 $100,000
## 2: C...
Interest Rate Swaps
Mick Cooney michael.cooney@applied.ai Applied AI Ltd
Pricing Mortality Swaps Using R
Assumptions
Starting point — some generalisable for flexibility
1 No consideration of credit risk
2 Swap has fixed lifetime
...
Calculating the MUR multiplier
lifetable.dt <- fread("lifetable.csv");
A <- 100000;
qx <- lifetable.dt[age >= 30][age < 50...
Calculating the MUR multiplier
0.0
2.5
5.0
7.5
10.0
0.0 2.5 5.0 7.5 10.0
MUR
Multiplier
Mick Cooney michael.cooney@applied...
MonteCarlo Methods
Calculating the NAV of a fund of correlated assets with a yearly
drawdown:
Mick Cooney michael.cooney@a...
Simulation Approach
Simulation example: 10 simulations of 5 years
1 – annuitant still alive
0 – annuitant has deceased
## ...
Running the Simulation
Run the calculation:
mortport.dt <- fread("mortswap_portfolio.csv");
lifetable.dt <- fread("lifetab...
Viewing the Output
Simulated cashflows
(excludes initial premium):
$−2,000,000
$0
$2,000,000
$4,000,000
$6,000,000
0.00 0.2...
Viewing the Output
Simulated cashflows
(excludes initial premium):
$−2,000,000
$0
$2,000,000
$4,000,000
$6,000,000
0.00 0.2...
Pricing Tail Risk
How to price the tail risk?
Michael Lewis “In Nature’s Casino” – NYT Aug 2007
http://www.nytimes.com/200...
Pricing Tail Risk
$0
$1,000,000
$2,000,000
$3,000,000
$4,000,000
$5,000,000
75 80 85 90 95 100
Tail Percentile
MeanLossAmo...
Pricing Tail Risk
Ensemble of 1,000 valuations of 10,000 iterations:
90% 95%
99% 99.5%
0e+00
2e−06
4e−06
6e−06
8e−06
0e+00...
Time-in-Force Dependency
Scaling of 95% mean with time-in-force of swap:
$0
$1,000,000
$2,000,000
$3,000,000
5 10 15 20
Sw...
Time-in-Force Dependency (Ensemble)
times.in.force <- 1:20;
n.sim <- 1000;
n.ens <- 10;
calculate.tif <- function(tif) {
m...
Time-in-Force Dependency (Ensemble)
$0
$1,000,000
$2,000,000
$3,000,000
5 10 15 20
Year
MeanLossAverage
Mick Cooney michae...
Summary
R package: mcmortswap
https://bitbucket.org/appliedai/mcmortswap
Email: michael.cooney@applied.ai
Slides available...
Upcoming SlideShare
Loading in …5
×

Pricing Mortality Swaps Using R

1,731 views

Published on

  • Be the first to comment

Pricing Mortality Swaps Using R

  1. 1. Pricing Mortality Swaps Using R R in Insurance 2015 Mick Cooney michael.cooney@applied.ai 29 June 2015 Mick Cooney michael.cooney@applied.ai Applied AI Ltd Pricing Mortality Swaps Using R
  2. 2. Before I Begin... https://xkcd.com/793/ Mick Cooney michael.cooney@applied.ai Applied AI Ltd Pricing Mortality Swaps Using R
  3. 3. What is a Mortality Swap? Seller provides protection against mortality risk Portfolio of Life-Contingent Annuities Converts the portfolio to Guaranteed Annuities Only guaranteeing mortality-adjusted cashflows Mick Cooney michael.cooney@applied.ai Applied AI Ltd Pricing Mortality Swaps Using R
  4. 4. Swap Annuity Portfolio Random portfolio of annuities: ## customerid age MUR amount ## 1: C97326460 39 350 $100,000 ## 2: C99971880 30 175 $80,000 ## 3: C65134119 34 225 $50,000 ## 4: C35313144 33 200 $90,000 ## 5: C17550793 45 200 $30,000 ## --- ## 196: C37440555 40 200 $50,000 ## 197: C60347677 42 200 $60,000 ## 198: C93383952 45 200 $70,000 ## 199: C08447895 35 150 $60,000 ## 200: C64003360 41 325 $90,000 Mick Cooney michael.cooney@applied.ai Applied AI Ltd Pricing Mortality Swaps Using R
  5. 5. Interest Rate Swaps Mick Cooney michael.cooney@applied.ai Applied AI Ltd Pricing Mortality Swaps Using R
  6. 6. Assumptions Starting point — some generalisable for flexibility 1 No consideration of credit risk 2 Swap has fixed lifetime 3 All annuities have annual payments received at same time 4 Fixed cost of capital over lifetime 5 All annuitants have undergone underwriting evaluation 6 APV calculations require a specific lifetable 7 All annuities have a lifetime at least as long as the swap lifetime Mick Cooney michael.cooney@applied.ai Applied AI Ltd Pricing Mortality Swaps Using R
  7. 7. Calculating the MUR multiplier lifetable.dt <- fread("lifetable.csv"); A <- 100000; qx <- lifetable.dt[age >= 30][age < 50]$qx; r <- 0.05; calculate.MUR.multiple.diff <- function(MUR, mult) { MUR * price.term.assurance(qx, A = A, r = r, P = 0) - price.term.assurance(mult * qx, A = A, r = r, P = 0); } MUR.values <- seq(0, 10, by = 0.25); ### Determine mortality multiplier that best matches the premium multiplier MUR.mult <- sapply(MUR.values, function(MUR) { optimize(function(mult) abs(calculate.MUR.multiple.diff(MUR, mult)), c(0, 20))$minimum; }); Mick Cooney michael.cooney@applied.ai Applied AI Ltd Pricing Mortality Swaps Using R
  8. 8. Calculating the MUR multiplier 0.0 2.5 5.0 7.5 10.0 0.0 2.5 5.0 7.5 10.0 MUR Multiplier Mick Cooney michael.cooney@applied.ai Applied AI Ltd Pricing Mortality Swaps Using R
  9. 9. MonteCarlo Methods Calculating the NAV of a fund of correlated assets with a yearly drawdown: Mick Cooney michael.cooney@applied.ai Applied AI Ltd Pricing Mortality Swaps Using R
  10. 10. Simulation Approach Simulation example: 10 simulations of 5 years 1 – annuitant still alive 0 – annuitant has deceased ## sim1 sim2 sim3 sim4 sim5 sim6 sim7 sim8 sim9 sim10 ## year1 1 1 1 1 1 1 1 1 1 1 ## year2 1 1 0 1 1 1 1 1 1 1 ## year3 1 1 0 1 1 1 1 1 0 1 ## year4 1 1 0 1 0 1 1 1 0 1 ## year5 1 1 0 1 0 1 1 1 0 1 Mick Cooney michael.cooney@applied.ai Applied AI Ltd Pricing Mortality Swaps Using R
  11. 11. Running the Simulation Run the calculation: mortport.dt <- fread("mortswap_portfolio.csv"); lifetable.dt <- fread("lifetable.csv"); n.sim <- 1000; mortswap.value.sim <- calculate.mortality.swap.price(mortport.dt, lifetable = lifetable.dt, hedge.apv.cashflows = TRUE, interest.rate = 0.05, years.in.force = 20, n.sim = n.sim, return.all.data = FALSE); print(dollar_format(largest_with_cents = 1e8)(mortswap.value.sim[1:20])); ## [1] "$748,064.31" "$461,186.76" "$2,274,787.66" "$-1,251,047.55" ## [5] "$1,954,488.45" "$-1,251,047.55" "$-2,237,366.32" "$1,733,535.87" ## [9] "$1,707,822.63" "$-1,299,952.30" "$2,139,507.05" "$-757,888.16" ## [13] "$-309,255.02" "$-717,420.20" "$1,927,893.22" "$1,417,572.90" ## [17] "$1,571,751.87" "$-739,440.89" "$-1,990,786.63" "$475,010.30" Mick Cooney michael.cooney@applied.ai Applied AI Ltd Pricing Mortality Swaps Using R
  12. 12. Viewing the Output Simulated cashflows (excludes initial premium): $−2,000,000 $0 $2,000,000 $4,000,000 $6,000,000 0.00 0.25 0.50 0.75 1.00 Percentile NetCashflow/Loss Mick Cooney michael.cooney@applied.ai Applied AI Ltd Pricing Mortality Swaps Using R
  13. 13. Viewing the Output Simulated cashflows (excludes initial premium): $−2,000,000 $0 $2,000,000 $4,000,000 $6,000,000 0.00 0.25 0.50 0.75 1.00 Percentile NetCashflow/Loss Mick Cooney michael.cooney@applied.ai Applied AI Ltd Pricing Mortality Swaps Using R
  14. 14. Pricing Tail Risk How to price the tail risk? Michael Lewis “In Nature’s Casino” – NYT Aug 2007 http://www.nytimes.com/2007/08/26/magazine/ 26neworleans-t.html?pagewanted=all Consensus around 4× expected loss Need to calculate tail averages Mick Cooney michael.cooney@applied.ai Applied AI Ltd Pricing Mortality Swaps Using R
  15. 15. Pricing Tail Risk $0 $1,000,000 $2,000,000 $3,000,000 $4,000,000 $5,000,000 75 80 85 90 95 100 Tail Percentile MeanLossAmount Mick Cooney michael.cooney@applied.ai Applied AI Ltd Pricing Mortality Swaps Using R
  16. 16. Pricing Tail Risk Ensemble of 1,000 valuations of 10,000 iterations: 90% 95% 99% 99.5% 0e+00 2e−06 4e−06 6e−06 8e−06 0e+00 2e−06 4e−06 6e−06 0e+00 1e−06 2e−06 3e−06 0.0e+00 5.0e−07 1.0e−06 1.5e−06 2.0e−06 $3,500,000 $3,600,000 $3,700,000 $4,200,000 $4,300,000 $4,400,000 $4,500,000 $5,600,000 $5,800,000 $6,000,000 $6,200,000 $6,000,000 $6,250,000 $6,500,000 $6,750,000 $7,000,000 Mean Loss Amount ProbabilityDensity Mick Cooney michael.cooney@applied.ai Applied AI Ltd Pricing Mortality Swaps Using R
  17. 17. Time-in-Force Dependency Scaling of 95% mean with time-in-force of swap: $0 $1,000,000 $2,000,000 $3,000,000 5 10 15 20 Swap Time−in−Force (years) 95%MeanLossValue Mick Cooney michael.cooney@applied.ai Applied AI Ltd Pricing Mortality Swaps Using R
  18. 18. Time-in-Force Dependency (Ensemble) times.in.force <- 1:20; n.sim <- 1000; n.ens <- 10; calculate.tif <- function(tif) { mortswap.value.sim <- calculate.mortality.swap.price(mortport.dt, lifetable = lifetable.dt, hedge.apv.cashflows = TRUE, interest.rate = 0.05, years.in.force = tif, n.sim = n.sim, return.all.data = FALSE); iterval <- calculate.quantile.averages(mortswap.value.sim, 0.95); } tif.ensemble <- sapply(times.in.force, function(iter.tif) { replicate(n.ens, calculate.tif(iter.tif)) }); Mick Cooney michael.cooney@applied.ai Applied AI Ltd Pricing Mortality Swaps Using R
  19. 19. Time-in-Force Dependency (Ensemble) $0 $1,000,000 $2,000,000 $3,000,000 5 10 15 20 Year MeanLossAverage Mick Cooney michael.cooney@applied.ai Applied AI Ltd Pricing Mortality Swaps Using R
  20. 20. Summary R package: mcmortswap https://bitbucket.org/appliedai/mcmortswap Email: michael.cooney@applied.ai Slides available on bitbucket: https://bitbucket.org/appliedai/r_in_insurance_2015 Mick Cooney michael.cooney@applied.ai Applied AI Ltd Pricing Mortality Swaps Using R

×