The loss ratio of a new underwriting year
bayes_new_year.RdThe posterior predictive of an underwriting year that is not yet in the
triangle, the origin after its newest, for pricing a year not yet
written (docs/design/reserving-bayes.md, decision 28). Each simulation
takes a posterior draw of fit and from it the new origin's ultimate,
parameter and process uncertainty both.
Usage
new_year_fit(ptr)
bayes_new_year(
fit,
premium,
n_sims = 10000,
seed = 0,
level = c("exchangeable", "prior")
)Arguments
- fit
A bayes_bf_normalised_fit or a meyers_fit.
The new year's premium (its exposure for the normalised Bornhuetter-Ferguson), finite and positive.
- n_sims
The number of simulations.
- seed
The seed of the simulations.
- level
For a meyers_fit:
"exchangeable"or"prior".
Value
A new_year_fit with origin (the new origin's label),
premium, and loss_ratio and ultimate, each a
predictive_distribution with one component.
Details
For a bayes_bf_normalised_fit the new origin's expected ultimate is a
gamma with cv cv and mean s * apriori * premium, s the draw's
common multiplier (1 without common_cv), and its ultimate adds the
fit's process error. The data reach the new year only through s:
without common_cv the new year is the prior, Gamma(1 / cv^2, apriori)
in loss ratio, whatever the triangle says; with a vague common_cv (say
10) the triangle sets its level. A flat prior (cv = Inf) is an error.
For a meyers_fit the new origin's level logelr + alpha is drawn as
level says and its ultimate is log-normal with sd sigma[m] (in CAY,
plus rho times the newest origin's residual). Meyers' models have no
hyperparameter for the origin effects: "exchangeable" (the default)
draws the level from a Student t fitted to the draw's origin levels
(needs three origins); "prior" takes Meyers' own prior
N(0, origin_sd^2), too wide to price on at his origin_sd of 3.162.
The result's patterns are each simulation's posterior development
pattern: pattern_draws() and monthly_pattern_draws() take the result
and give the new year's emergence, row i simulation i of
loss_ratio.
Examples
# \donttest{
long <- data.frame(
year = c(2020, 2020, 2020, 2020, 2021, 2021, 2021, 2022, 2022, 2023),
age = c(12, 24, 36, 48, 12, 24, 36, 12, 24, 12),
paid = c(100, 150, 165, 170, 110, 170, 180, 120, 175, 130),
premium = c(200, 200, 200, 200, 220, 220, 220, 240, 240, 260))
tri <- triangle(long, "year", "age", c("paid", "premium"))
fit <- bayes_bf_normalised(tri, "paid", "premium", apriori = 0.85, cv = 0.1,
common_cv = 10, tune = 300, draws = 300, n_sims = 500)
year <- bayes_new_year(fit, premium = 280, n_sims = 2000, seed = 7)
year@origin
#> [1] "2024"
mean(year@loss_ratio)
#> [1] 0.833098
dim(monthly_pattern_draws(year, 48))
#> [1] 2000 48
# }