Reinsurance tower on a timeline
with_cover_basis.Rdwith_cover_basis() sets the tower's cover basis, which
apply_tower_timeline() needs. A tower is one programme, so the basis is
one for all its layers. apply_tower_timeline() splits a timeline()
into contract years under that basis (timeline_years()) and applies the
tower to them as apply_tower_term() does.
Arguments
- tower
- basis
"losses_occurring"(contract years by accident period) or"risks_attaching"(by underwriting period).- timeline
A
timeline().- exposure
A matrix of shares, one row per underwriting year and one column per accident month (
uniform_exposure()); under losses occurring only its number of rows is used.
Value
with_cover_basis() the reinsurance_tower with the basis (its
cover_basis property, NULL until set); apply_tower_timeline() a
predictive_distribution as apply_tower_term() gives.
Examples
ev <- events_from_years(list(100), times = list(13.5 / 24))
shares <- matrix(0, 2, 24)
shares[1, 14] <- 0.25
shares[2, 14] <- 0.75
tw <- with_cover_basis(reinsurance_tower(list(xol_layer("XL", 50, 20))), "risks_attaching")
rad <- apply_tower_timeline(tw, timeline(ev, 24), shares)
draw_matrix(select_components(rad, "kind", "ceded"))
#> [,1] [,2]
#> [1,] 5 50