Skip to contents

From run_projection(). projection_values() gives a line (one of projection_lines(), as "surplus") by path and year. ruin_probability() is the probability that the surplus before capital falls below zero at a year end within horizon years, with its standard error. capital_breach() is the probability that it falls below the required capital: a fixed amount, amounts by year, or a ratio of the premium or the reserves when basis is given, with shortfall, the mean largest shortfall on the paths that breach (NA when none do).

Usage

projection_paths(ptr)

projection_lines()

projection_values(x, line)

ruin_probability(x, horizon)

capital_breach(x, horizon, capital, basis = NULL)

Arguments

ptr

Internal.

x

A projection_paths.

line

A line's name.

horizon

The years to look over.

capital

An amount, amounts by year, or with basis a ratio.

basis

NULL, "premium" or "reserves".

Value

A projection_paths has properties n_sims, years and opening_surplus (assets less the opening reserves). projection_values(): a matrix. ruin_probability(): a list of probability and standard_error; capital_breach() adds shortfall.

Examples

p <- dfa_projection(rbind(c(60, 70, 80), c(50, 120, 40)), 200,
                    premiums = rep(100, 3), expense_ratio = 0.3, payout = c(0.5, 0.5))
paths <- run_projection(p)
projection_lines()
#>  [1] "premium"                "expenses"               "incurred_losses"       
#>  [4] "reserve_development"    "investment_income"      "result"                
#>  [7] "paid"                   "assets"                 "reserves"              
#> [10] "surplus"                "tax"                    "dividends"             
#> [13] "injections"             "surplus_before_capital"
ruin_probability(paths, 3)
#> $probability
#> [1] 0
#> 
#> $standard_error
#> [1] 0
#> 
capital_breach(paths, 3, 1.5, basis = "premium")
#> $probability
#> [1] 0
#> 
#> $standard_error
#> [1] 0
#> 
#> $shortfall
#> [1] NA
#>