Simulation of large claims per stochastic individual claims reserving
sicr.Rd
This function is the main function of the sicr package. It uses the prepared objects to simulate future payments for large claims.
Usage
sicr(
n,
large_claims_list,
first_orig_year,
last_orig_year,
pools,
indices,
history,
exposure = NULL,
years_for_ibnr_pools = NULL,
active_annuities = NULL,
age_shift = NULL,
mortality = NULL,
reinsurance = NULL,
seed = 12345,
progress = TRUE,
summary = TRUE,
detailed_export = FALSE
)
Arguments
- n
Integer. Desired number of realisations.
- large_claims_list
Dataframe with one row per known large claim generated by
generate_claims_list()
.- first_orig_year
First origin year with complete history.
- last_orig_year
Last origin year.
- pools
List as output of
generate_pools()
.- indices
Dataframe for indexation, see details of
prepare_data()
.- history
numeric matrix with one row per claim with historic payments, generated by
generate_history_per_claim()
.
If generated in other ways, note that colnames must be the origin years.
This matrix is needed to calculate ibnr payments and reinsurance if desired.- exposure
Dataframe that must contain one row for each origin year between
first_orig_year
andlast_orig_year
and the columnsOrigin_year
andExposure
.
Default: NULL. In this case, a constant exposure is assumed.- years_for_ibnr_pools
Vector containing the calendar years that shall be used to build the pools.
Default: NULL. In this case, all years are used for building ibnr pools.- active_annuities
Dataframe of active annuities, see active_annuities_xmpl. Default: NULL.
Only necessary if annuities shall be considered.- age_shift
Dataframe, see description of age_shift_xmpl. Default: NULL
Only necessary if annuities shall be considered.- mortality
Dataframe, see description of mortality_xmpl. Default: NULL
Only necessary if annuities shall be considered.- reinsurance
Dataframe with reinsurance information, see details of
xl_cashflow()
or reinsurance_xmpl. Default: NULL
Only necessary if reinsurance shall be considered.- seed
Default: 12345. Setting a seed makes the simulation reproducible.
- progress
Default: TRUE. Set to FALSE if no progress bar shall be shown during simulation.
- summary
Default: TRUE. Set to FALSE if no summary shall be shown after the simulation.
- detailed_export
Default: FALSE. Set to TRUE if the output shall contain more detailed technical information about the simulation.
Value
Numeric three-dimensional array with
one row per known claim followed by one row per expected ibnr claim
250 columns for future calendar years
7 (or 15 if
detailed_export
is true) matrices for the following information:Sum of gross payments (Gross_sum)
Sum of reinsurance payments (Reinsurance_sum)
Claim payments (without annuity payments) (Claim_payments)
Payments for active annuities (Active_annuities_payments)
Payments for expected future annuities (Future_annuities_payments)
Reinsurance payments from xl treaties (Reinsurance_xl)
Reinsurance payments from quota share treaties (Reinsurance_quota_share)
(Reserve class (Reserve_class))
(Development year (Dev_year))
(Sampled future annuities index 1 (Future_annuities_index1))
(Sampled future annuities index 2 (Future_annuities_index2))
(Sampled future annuities index 3 (Future_annuities_index3))
(Sampled future annuities index 4 (Future_annuities_index4))
(Sampled future annuities index 5 (Future_annuities_index5))
(Random sampling index (Random_sampling_index))
Examples
# this example uses data provided with this package
extended_claims_data <- 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)
pools <- generate_pools(extended_claims_data = extended_claims_data,
reserve_classes = c(1, 200001, 400001, 700001, 1400001),
years_for_pools = 2014:2023,
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 = 2023)
history <- generate_history_per_claim(data = extended_claims_data,
column = "Cl_payment_cal",
first_orig_year = 1989,
last_orig_year = 2023)
# smallest version
result <- sicr(n = 5,
large_claims_list = large_claims_list,
first_orig_year = 1989,
last_orig_year = 2023,
pools = pools,
indices = indices_xmpl,
history = history)
#>
1 of 5 (20%) --- remaining time approx. Inf secs
2 of 5 (40%) --- remaining time approx. 1,53 secs
3 of 5 (60%) --- remaining time approx. 0,90 secs
4 of 5 (80%) --- remaining time approx. 0,55 secs
5 of 5 (100%) --- remaining time approx. 0,26 secs
#>
#> Simulation time: 1,52 secs
#>
#> Gross Best Estimate: 118.562.967,46 (standard error: 2,87%)
#> ...Known claims 91.870.605,43
#> ...IBNR 26.692.362,03
# more complex version
result <- sicr(n = 5,
large_claims_list = large_claims_list,
first_orig_year = 1989,
last_orig_year = 2023,
pools = pools,
indices = indices_xmpl,
history = history,
exposure = exposure_xmpl,
years_for_ibnr_pools = 2014:2023,
active_annuities = active_annuities_xmpl,
age_shift = age_shift_xmpl,
mortality = mortality_xmpl,
reinsurance = reinsurance_xmpl)
#>
1 of 5 (20%) --- remaining time approx. Inf secs
2 of 5 (40%) --- remaining time approx. 2,18 secs
3 of 5 (60%) --- remaining time approx. 1,59 secs
4 of 5 (80%) --- remaining time approx. 0,96 secs
5 of 5 (100%) --- remaining time approx. 0,45 secs
#>
#> Simulation time: 2,50 secs
#>
#> Gross Best Estimate: 123.671.884,25 (standard error: 1,58%)
#> ...Known claims 105.904.400,28
#> ...Claims 92.255.416,01
#> ...Active annuities 9.201.022,08
#> ...Future annuities 4.447.962,20
#> ...IBNR 17.767.483,97
#>
#> Reinsurance Best Estimate: 46.579.940,51 (standard error (only XL): 8,63%)
#> ...Known Claims 42.638.419,12
#> ...XL 9.209.873,70
#> ...Quota Share 33.428.545,42
#> ...IBNR 3.941.521,39
#> ...XL 0,00
#> ...Quota Share 3.941.521,39