Skip to contents

Simulated future increments at the base level of an indexation(), taken to the money of their payment periods simulation by simulation: reinflate() applied to every simulation of a predictive_distribution of future cells (design note docs/design/reserving-inflation.md, decision 11). Python's Indexation.reinflate_draws.

Usage

reinflate_draws(x, draws, paths = NULL)

Arguments

x

An indexation().

draws

A predictive_distribution of future increments at the base level, one component per cell.

paths

NULL (the default) for the index's future rate, or an index_paths() with one row per simulation of draws.

Value

A predictive_distribution with the same dimensions, keys (in the same order) and simulations, the cells re-inflated, and the provenance of draws with a reinflated parameter. aggregate(out, "origin") gives the re-inflated reserves by origin.

Details

draws holds one component per future cell. Its dimensions must include origin (each key an origin period: a label such as "2021" or "2021Q3", or a whole year) and exactly one of development or age (each key the age in months at the end of the cell's development period). The cell is paid in the month age - 1 months after the origin's first month. Other dimensions (a line of business) pass through untouched.

  • With paths = NULL, each cell of every simulation is multiplied by the indexation_factor() of its payment month: the index's future rate where it has one, an error where a payment period needs it and the index has none.

  • With paths, simulation i of draws takes row i of the paths. The paths replace the future rate: a payment period inside the given index takes its given value, one from the paths' first period on takes that simulation's level, and one past the paths' last period is an error. The paths must start in the period right after the index's last given one, at the index's grain, and have one row per simulation of draws. The base must be one of the given periods, so that the base level is the same in every simulation.

Which draws can be passed: predict_distribution() of an odp_glm_fit gives future increments with the dimensions origin and development, and so does the cells property of an odp_bootstrap() or mack_bootstrap() fit made with cells = TRUE (with the triangle's keys in front). The bootstraps' reserves are by origin only and are refused for their missing age. A compartmental_fit's paid draws (dimensions origin and age) are cumulative paid, so they pass the checks but would be re-inflated wrongly: difference them by origin first (the first future cell less the origin's latest paid).

Examples

# Origin 2022's cells at ages 24 and 36, paid in 2023 and 2024, at the
# 2022 level, in two simulations.
draws <- predictive_distribution(
  rbind(c(100, 50), c(120, 40)),
  data.frame(origin = "2022", development = c(24, 36))
)
at_2022 <- indexation(calendar_index("2021", c(1, 1.1)), "2022-01")
paths <- index_paths("2023", rbind(c(1.21, 1.331), c(1.155, 1.21)))
out <- reinflate_draws(at_2022, draws, paths)
draw_matrix(out)
#>      [,1] [,2]
#> [1,]  110 60.5
#> [2,]  126 44.0
mean(aggregate(out, "origin"))
#> [1] 170.25