Compute everything belonging to the chosen special claims
compute_special_claims.Rd
This function computes every needed information about the chosen special claims in one step.
Usage
compute_special_claims(
special_claims,
extended_claims_data,
first_orig_year,
last_orig_year,
end_of_tail,
external_patterns = NULL,
active_annuities = NULL,
age_shift = NULL,
mortality = NULL,
reinsurance = NULL,
indices = NULL
)
Arguments
- special_claims
Dataframe with special claims, see details.
- extended_claims_data
Prepared claims data dataframe, see details of
prepare_data()
.
It is not necessary to reduce this dataframe to special claims, this will be done by the function.- first_orig_year
Integer value for the first origin year, will be treated as the first observed calendar year.
- last_orig_year
Integer value for the last origin year which will also be treated as the last calendar year, usually the calendar year that just ended.
- end_of_tail
Chosen development year of tail end.
- external_patterns
List of external patterns that can be referred to in
special_claims
, see details. Default: NULL
Only necessary if special_claims$type is set to external.- 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.- indices
Dataframe for indexation, see details of
prepare_data()
. Default: NULL
Only necessary if reinsurance shall be considered.
Value
List of matrices. Each matrix consists of one row per year between first_orig_year
and last_orig_year
but the count of
columns varies (with n be the number of origin years):
special_claims_payments
with historic and future claim payments (250 + n columns)special_claims_reserved
with historic claims reserves (n columns)special_annuities_payments
with historic and future annuity payments (250 + n columns)special_annuities_reserved
with historic annuities reserves (n columns)special_ceded_quota_payments
with historic and future payments from the quota share reinsurance contract (250 + n columns)special_ceded_xl_payments
with historic and future payments from the xl reinsurance contract (250 + n columns)
Details
Some claims differ to historic claims so much that they cannot be reserved with the available pools. This mostly
applies to very large claims that have not been observed yet hence there is no adequate historic data of similar
claims in the pools. These claims must be separated and projected deterministically.
This package comes with some graphic options to identify special claims. After this process, the dataframe
special_claims
must be created with one row per special claim and the following columns:
Claim_id
type: character. Unique claim id.Reserve2BE_percentage
type: numeric. This number will be multiplied with the latest claim reserve to calculate the best estimate reserve, e.g. 0.8 if 80% of the reserve will be needed for future payments.Rollout_type
type: character. One oflinear
,constant
orexternal
.linear
means that the payments will decrease evenly and reach 0 atend_of_tail
. The sum is the desired best estimate.constant
means equal payments untilend_of_tail
that add to the desired best estimate.external
means that the best estimate is rolled out by an external pattern. The patterns must be specified in the listexternal_patterns
. Ifexternal
is chosen, the columnPattern_id
is used.
Pattern_id
type: integer. The number of the element of listexternal_patterns
where the desired external pattern is specified.
The list external_patterns
specifies the external patterns that special_claims$Pattern_id refers to. Hence this list
must at least contain max(special_claims$Pattern_id)
elements.
Each element is a numeric vector with future payments as a percentage of the best estimate reserve. Sum of vector must be 1.
Examples
# this example uses data provided with this package
extended_claims_data <- prepare_data(claims_data = minimal_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 = minimal_pool_of_annuities_xmpl)
# The claims with claim_ids Claim#43, Claim#44 and Claim#68 are identified as special claims.
special_claims <- data.frame(Claim_id = c("Claim#43", "Claim#44", "Claim#68"),
Reserve2BE_percentage = c(0.8, 0.5, 1.2),
Rollout_type = c("linear", "constant", "external"),
Pattern_id = c(1,1,3))
print(special_claims)
#> Claim_id Reserve2BE_percentage Rollout_type Pattern_id
#> 1 Claim#43 0.8 linear 1
#> 2 Claim#44 0.5 constant 1
#> 3 Claim#68 1.2 external 3
external_patterns <- list(c(0.5, 0.3, 0.2),
c(1),
c(0.7, 0.3))
print(external_patterns)
#> [[1]]
#> [1] 0.5 0.3 0.2
#>
#> [[2]]
#> [1] 1
#>
#> [[3]]
#> [1] 0.7 0.3
#>
# First example ignores annuities and reinsurance.
result <- compute_special_claims(special_claims = special_claims,
extended_claims_data = extended_claims_data,
first_orig_year = 1989,
last_orig_year = 2023,
end_of_tail = 50,
external_patterns = external_patterns)
print(str(result))
#> List of 6
#> $ special_claims_payments : num [1:35, 1:285] 0 0 0 0 0 0 0 0 0 0 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : chr [1:35] "1989" "1990" "1991" "1992" ...
#> .. ..$ : chr [1:285] "1989" "1990" "1991" "1992" ...
#> $ special_claims_reserved : 'xtabs' num [1:35, 1:35] 0 0 0 0 0 0 0 0 0 0 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ Origin_year : chr [1:35] "1989" "1990" "1991" "1992" ...
#> .. ..$ Calendar_year: chr [1:35] "1989" "1990" "1991" "1992" ...
#> ..- attr(*, "call")= language xtabs(formula = substitute(i ~ j, list(i = as.name(col_name), j = quote(Origin_year + Calendar_year))), data = data)
#> $ special_annuities_payments : num [1:35, 1:285] 0 0 0 0 0 0 0 0 0 0 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : chr [1:35] "1989" "1990" "1991" "1992" ...
#> .. ..$ : chr [1:285] "1989" "1990" "1991" "1992" ...
#> $ special_annuities_reserved : 'xtabs' num [1:35, 1:35] 0 0 0 0 0 0 0 0 0 0 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ Origin_year : chr [1:35] "1989" "1990" "1991" "1992" ...
#> .. ..$ Calendar_year: chr [1:35] "1989" "1990" "1991" "1992" ...
#> ..- attr(*, "call")= language xtabs(formula = substitute(i ~ j, list(i = as.name(col_name), j = quote(Origin_year + Calendar_year))), data = data)
#> $ special_ceded_quota_payments: num [1:35, 1:285] 0 0 0 0 0 0 0 0 0 0 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : chr [1:35] "1989" "1990" "1991" "1992" ...
#> .. ..$ : chr [1:285] "1989" "1990" "1991" "1992" ...
#> $ special_ceded_xl_payments : num [1:35, 1:285] 0 0 0 0 0 0 0 0 0 0 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : chr [1:35] "1989" "1990" "1991" "1992" ...
#> .. ..$ : chr [1:285] "1989" "1990" "1991" "1992" ...
#> NULL
print(result$special_claims_payments[, c("2024", "2025", "2026", "2027", "2028", "2029")])
#> 2024 2025 2026 2027 2028 2029
#> 1989 0.00 0.00 0.00 0.00 0.00 0.0
#> 1990 0.00 0.00 0.00 0.00 0.00 0.0
#> 1991 0.00 0.00 0.00 0.00 0.00 0.0
#> 1992 0.00 0.00 0.00 0.00 0.00 0.0
#> 1993 0.00 0.00 0.00 0.00 0.00 0.0
#> 1994 0.00 0.00 0.00 0.00 0.00 0.0
#> 1995 0.00 0.00 0.00 0.00 0.00 0.0
#> 1996 0.00 0.00 0.00 0.00 0.00 0.0
#> 1997 0.00 0.00 0.00 0.00 0.00 0.0
#> 1998 0.00 0.00 0.00 0.00 0.00 0.0
#> 1999 0.00 0.00 0.00 0.00 0.00 0.0
#> 2000 0.00 0.00 0.00 0.00 0.00 0.0
#> 2001 0.00 0.00 0.00 0.00 0.00 0.0
#> 2002 0.00 0.00 0.00 0.00 0.00 0.0
#> 2003 0.00 0.00 0.00 0.00 0.00 0.0
#> 2004 0.00 0.00 0.00 0.00 0.00 0.0
#> 2005 0.00 0.00 0.00 0.00 0.00 0.0
#> 2006 19094.48 18752.05 18409.61 18067.17 17724.73 17382.3
#> 2007 0.00 0.00 0.00 0.00 0.00 0.0
#> 2008 0.00 0.00 0.00 0.00 0.00 0.0
#> 2009 0.00 0.00 0.00 0.00 0.00 0.0
#> 2010 0.00 0.00 0.00 0.00 0.00 0.0
#> 2011 0.00 0.00 0.00 0.00 0.00 0.0
#> 2012 0.00 0.00 0.00 0.00 0.00 0.0
#> 2013 0.00 0.00 0.00 0.00 0.00 0.0
#> 2014 0.00 0.00 0.00 0.00 0.00 0.0
#> 2015 0.00 0.00 0.00 0.00 0.00 0.0
#> 2016 0.00 0.00 0.00 0.00 0.00 0.0
#> 2017 0.00 0.00 0.00 0.00 0.00 0.0
#> 2018 0.00 0.00 0.00 0.00 0.00 0.0
#> 2019 242822.29 104066.70 0.00 0.00 0.00 0.0
#> 2020 0.00 0.00 0.00 0.00 0.00 0.0
#> 2021 0.00 0.00 0.00 0.00 0.00 0.0
#> 2022 0.00 0.00 0.00 0.00 0.00 0.0
#> 2023 0.00 0.00 0.00 0.00 0.00 0.0
# Second example also computes annuities for claim#43
result <- compute_special_claims(special_claims = special_claims,
extended_claims_data = extended_claims_data,
first_orig_year = 1989,
last_orig_year = 2023,
end_of_tail = 50,
external_patterns = external_patterns,
active_annuities = minimal_active_annuities_xmpl,
age_shift = age_shift_xmpl,
mortality = mortality_xmpl)
print(result$special_annuities_payments[, c("2024", "2025", "2026", "2027", "2028", "2029")])
#> 2024 2025 2026 2027 2028 2029
#> 1989 0.00 0.000 0.000 0.000 0.000 0.000
#> 1990 0.00 0.000 0.000 0.000 0.000 0.000
#> 1991 0.00 0.000 0.000 0.000 0.000 0.000
#> 1992 0.00 0.000 0.000 0.000 0.000 0.000
#> 1993 0.00 0.000 0.000 0.000 0.000 0.000
#> 1994 0.00 0.000 0.000 0.000 0.000 0.000
#> 1995 0.00 0.000 0.000 0.000 0.000 0.000
#> 1996 0.00 0.000 0.000 0.000 0.000 0.000
#> 1997 0.00 0.000 0.000 0.000 0.000 0.000
#> 1998 0.00 0.000 0.000 0.000 0.000 0.000
#> 1999 0.00 0.000 0.000 0.000 0.000 0.000
#> 2000 0.00 0.000 0.000 0.000 0.000 0.000
#> 2001 0.00 0.000 0.000 0.000 0.000 0.000
#> 2002 0.00 0.000 0.000 0.000 0.000 0.000
#> 2003 0.00 0.000 0.000 0.000 0.000 0.000
#> 2004 0.00 0.000 0.000 0.000 0.000 0.000
#> 2005 0.00 0.000 0.000 0.000 0.000 0.000
#> 2006 12168.21 8678.269 6160.377 4352.512 3060.705 2142.111
#> 2007 0.00 0.000 0.000 0.000 0.000 0.000
#> 2008 0.00 0.000 0.000 0.000 0.000 0.000
#> 2009 0.00 0.000 0.000 0.000 0.000 0.000
#> 2010 0.00 0.000 0.000 0.000 0.000 0.000
#> 2011 0.00 0.000 0.000 0.000 0.000 0.000
#> 2012 0.00 0.000 0.000 0.000 0.000 0.000
#> 2013 0.00 0.000 0.000 0.000 0.000 0.000
#> 2014 0.00 0.000 0.000 0.000 0.000 0.000
#> 2015 0.00 0.000 0.000 0.000 0.000 0.000
#> 2016 0.00 0.000 0.000 0.000 0.000 0.000
#> 2017 0.00 0.000 0.000 0.000 0.000 0.000
#> 2018 0.00 0.000 0.000 0.000 0.000 0.000
#> 2019 0.00 0.000 0.000 0.000 0.000 0.000
#> 2020 0.00 0.000 0.000 0.000 0.000 0.000
#> 2021 0.00 0.000 0.000 0.000 0.000 0.000
#> 2022 0.00 0.000 0.000 0.000 0.000 0.000
#> 2023 0.00 0.000 0.000 0.000 0.000 0.000
# Third example also computes reinsurance
# Priority in 2019 is set to 100.000 to produce a positive xl portion
reinsurance_xmpl[reinsurance_xmpl$Origin_year == 2019, "Priority"] <- 100000
result <- compute_special_claims(special_claims = special_claims,
extended_claims_data = extended_claims_data,
first_orig_year = 1989,
last_orig_year = 2023,
end_of_tail = 50,
external_patterns = external_patterns,
active_annuities = minimal_active_annuities_xmpl,
age_shift = age_shift_xmpl,
mortality = mortality_xmpl,
reinsurance = reinsurance_xmpl,
indices = indices_xmpl)
print(result$special_ceded_xl_payments[, c("2024", "2025", "2026", "2027", "2028", "2029")])
#> 2024 2025 2026 2027 2028 2029
#> 1989 0.0 0.00 0 0 0 0
#> 1990 0.0 0.00 0 0 0 0
#> 1991 0.0 0.00 0 0 0 0
#> 1992 0.0 0.00 0 0 0 0
#> 1993 0.0 0.00 0 0 0 0
#> 1994 0.0 0.00 0 0 0 0
#> 1995 0.0 0.00 0 0 0 0
#> 1996 0.0 0.00 0 0 0 0
#> 1997 0.0 0.00 0 0 0 0
#> 1998 0.0 0.00 0 0 0 0
#> 1999 0.0 0.00 0 0 0 0
#> 2000 0.0 0.00 0 0 0 0
#> 2001 0.0 0.00 0 0 0 0
#> 2002 0.0 0.00 0 0 0 0
#> 2003 0.0 0.00 0 0 0 0
#> 2004 0.0 0.00 0 0 0 0
#> 2005 0.0 0.00 0 0 0 0
#> 2006 0.0 0.00 0 0 0 0
#> 2007 0.0 0.00 0 0 0 0
#> 2008 0.0 0.00 0 0 0 0
#> 2009 0.0 0.00 0 0 0 0
#> 2010 0.0 0.00 0 0 0 0
#> 2011 0.0 0.00 0 0 0 0
#> 2012 0.0 0.00 0 0 0 0
#> 2013 0.0 0.00 0 0 0 0
#> 2014 0.0 0.00 0 0 0 0
#> 2015 0.0 0.00 0 0 0 0
#> 2016 0.0 0.00 0 0 0 0
#> 2017 0.0 0.00 0 0 0 0
#> 2018 0.0 0.00 0 0 0 0
#> 2019 193753.2 82762.24 0 0 0 0
#> 2020 0.0 0.00 0 0 0 0
#> 2021 0.0 0.00 0 0 0 0
#> 2022 0.0 0.00 0 0 0 0
#> 2023 0.0 0.00 0 0 0 0
print(result$special_ceded_quota_payments[, c("2024", "2025", "2026", "2027", "2028", "2029")])
#> 2024 2025 2026 2027 2028 2029
#> 1989 0.000 0.000 0.000 0.000 0.000 0.000
#> 1990 0.000 0.000 0.000 0.000 0.000 0.000
#> 1991 0.000 0.000 0.000 0.000 0.000 0.000
#> 1992 0.000 0.000 0.000 0.000 0.000 0.000
#> 1993 0.000 0.000 0.000 0.000 0.000 0.000
#> 1994 0.000 0.000 0.000 0.000 0.000 0.000
#> 1995 0.000 0.000 0.000 0.000 0.000 0.000
#> 1996 0.000 0.000 0.000 0.000 0.000 0.000
#> 1997 0.000 0.000 0.000 0.000 0.000 0.000
#> 1998 0.000 0.000 0.000 0.000 0.000 0.000
#> 1999 0.000 0.000 0.000 0.000 0.000 0.000
#> 2000 0.000 0.000 0.000 0.000 0.000 0.000
#> 2001 0.000 0.000 0.000 0.000 0.000 0.000
#> 2002 0.000 0.000 0.000 0.000 0.000 0.000
#> 2003 0.000 0.000 0.000 0.000 0.000 0.000
#> 2004 0.000 0.000 0.000 0.000 0.000 0.000
#> 2005 0.000 0.000 0.000 0.000 0.000 0.000
#> 2006 9378.809 8229.095 7370.996 6725.905 6235.632 5857.322
#> 2007 0.000 0.000 0.000 0.000 0.000 0.000
#> 2008 0.000 0.000 0.000 0.000 0.000 0.000
#> 2009 0.000 0.000 0.000 0.000 0.000 0.000
#> 2010 0.000 0.000 0.000 0.000 0.000 0.000
#> 2011 0.000 0.000 0.000 0.000 0.000 0.000
#> 2012 0.000 0.000 0.000 0.000 0.000 0.000
#> 2013 0.000 0.000 0.000 0.000 0.000 0.000
#> 2014 0.000 0.000 0.000 0.000 0.000 0.000
#> 2015 0.000 0.000 0.000 0.000 0.000 0.000
#> 2016 0.000 0.000 0.000 0.000 0.000 0.000
#> 2017 0.000 0.000 0.000 0.000 0.000 0.000
#> 2018 0.000 0.000 0.000 0.000 0.000 0.000
#> 2019 48564.459 20813.339 0.000 0.000 0.000 0.000
#> 2020 0.000 0.000 0.000 0.000 0.000 0.000
#> 2021 0.000 0.000 0.000 0.000 0.000 0.000
#> 2022 0.000 0.000 0.000 0.000 0.000 0.000
#> 2023 0.000 0.000 0.000 0.000 0.000 0.000