Home > other >  Plotting ruin in R
Plotting ruin in R

Time:04-07

I'm trying to recreate something similar to an image in modern actuarial risk theory using R: enter image description here

And again for a different simulation

simulate_ruin()

enter image description here

And table the results of 10,000 simulations to find the rate of ruin, which turns out to be around 3%

table(sapply(1:10000, function(x) simulate_ruin(draw = FALSE)))
#> 
#> ruin safe 
#>  305 9695

Created on 2022-04-06 by the reprex package (v2.0.1)

  • Related