Split simulated years into a contract term
term_years.RdThe simulations in n_years consecutive blocks, for
apply_tower_term(): year t holds simulations (t - 1) * n + 1 to
t * n, with n = x@n_sims / n_years, so path j's year t is
simulation (t - 1) * n + j. Sums insured and times go with their losses.
Arguments
- x
An event_set.
- n_years
The number of years in the term; must divide
x@n_sims.
Value
A list of n_years event_sets.
Examples
ev <- simulate_events(poisson_count(2), lognormal(0, 1), 30, seed = 1)
length(term_years(ev, 3))
#> [1] 3