Compares expected and actual payments for more than one year
backtesting_multiyears.RdThis function compares expected and actual payments for desired reserve classes and development years on a multi-year basis.
Usage
backtesting_multiyears(
sim_result_series_old,
extended_claims_data_new,
reserve_classes = NULL,
dev_years = NULL
)Arguments
- sim_result_series_old
Object created by
sicr_series()containing a series of possible realisations.- extended_claims_data_new
Object created by
prepare_data()at least one year later.- reserve_classes
Integer vector of desired reserve classes.
- dev_years
Integer vector of desired development years.
Examples
# this example uses data provided with this package
claims_data_old <- dplyr::filter(claims_data_xmpl,
Calendar_year <= 2020)
historic_indices_old <- dplyr::filter(historic_indices_xmpl,
Calendar_year <= 2020)
indices_old <- expand_historic_indices(historic_indices_old,
first_orig_year = 1989,
last_orig_year = 2020,
index_gross_future = 0.03,
index_re_future = 0.02)
indices_old <- add_transition_factor(indices_old, index_year = 2022)
extended_claims_data <- prepare_data(claims_data = claims_data_old,
indices = indices_old,
threshold = 400000,
first_orig_year = 1989,
last_orig_year = 2020,
expected_year_of_growing_large = 3,
reserve_classes = c(1, 200001, 400001, 700001, 1400001),
pool_of_annuities = pool_of_annuities_xmpl)
pools <- generate_pools(extended_claims_data = extended_claims_data,
reserve_classes = c(1, 200001, 400001, 700001, 1400001),
years_for_pools = 2014:2020,
start_of_tail = 17,
end_of_tail = 50,
lower_outlier_limit = -Inf,
upper_outlier_limit = Inf,
pool_of_annuities = pool_of_annuities_xmpl)
large_claims_list <- generate_claims_list(extended_claims_data = extended_claims_data,
first_orig_year = 1989,
last_orig_year = 2020)
history <- generate_history_per_claim(data = extended_claims_data,
column = "Cl_payment_cal",
first_orig_year = 1989,
last_orig_year = 2020)
series <- sicr_series(n = 10,
large_claims_list = large_claims_list,
first_orig_year = 1989,
last_orig_year = 2020,
pools = pools,
indices = indices_old,
history = history)
#>
1 of 10 (10%) --- remaining time approx. Inf secs
2 of 10 (20%) --- remaining time approx. 2,61 secs
3 of 10 (30%) --- remaining time approx. 1,69 secs
4 of 10 (40%) --- remaining time approx. 1,32 secs
5 of 10 (50%) --- remaining time approx. 1,05 secs
6 of 10 (60%) --- remaining time approx. 0,84 secs
7 of 10 (70%) --- remaining time approx. 0,65 secs
8 of 10 (80%) --- remaining time approx. 0,47 secs
9 of 10 (90%) --- remaining time approx. 0,35 secs
10 of 10 (100%) --- remaining time approx. 0,17 secs
extended_claims_data_new <- prepare_data(claims_data = claims_data_xmpl,
indices = indices_xmpl,
threshold = 400000,
first_orig_year = 1989,
last_orig_year = 2023,
expected_year_of_growing_large = 3,
reserve_classes = c(1, 200001, 400001, 700001, 1400001),
pool_of_annuities = pool_of_annuities_xmpl)
g <- backtesting_multiyears(sim_result_series_old = series,
extended_claims_data_new = extended_claims_data_new,
reserve_classes = 3,
dev_year = 2:16)