Skip to contents

Creates a matrix with one row per annuitiy and agreed future payments in columns. Mortality probabilities are not taken into account here.

Usage

generate_annuity_payments(
  annuities,
  last_orig_year,
  indices = NULL,
  future_annuities = FALSE
)

Arguments

annuities

dataframe, see description of pool_of_annuities in details of prepare_data().

last_orig_year

Integer value for the last origin year which will also be treated as the last calendar year, usually the calendar year just ended.

indices

dataframe for indexation, see details of prepare_data(). Only needed if at least one annuity's calendar_year is not equal to last_orig_year, in particular not needed for rolling out active annuities. Default: Null

future_annuities

TRUE if this function is used to calculate future annuities, FALSE for known annuities. Default: FALSE

Value

dataframe with one row per row in 'annuities' and 130 columns for future possible payments

Details

In order to reduce computing time when rolling out annuities, they are split into two matrices, one with agreed future payments and one with the corresponding survival probabilities. This is the function for the first.

The function uses the entries of the columns Annual_payment, Dynamic, Annuity_start and Annuity_end to create the deterministic agreed future payments. If Calendar_year is not equal to last_orig_year, the payments are indexed to last_orig_year which is important when using annuity pools to predict future annuities. In this case the dataframe indices is needed.

Examples

# this example uses data provided with this package
# Example without indexation
print(minimal_active_annuities_xmpl)
#>   Claim_id Annuity_id Origin_year Calendar_year Entering_year Annuity_start
#> 1 Claim#43          1        2006          2023          2009          2009
#> 2 Claim#51          1        2010          2023          2013          2036
#> 3 Claim#13          1        1990          2023          1992          1992
#>   Annuity_end Birth_year Gender Annual_payment Dynamic
#> 1           0       1939      m       12168.21       0
#> 2        2051       1986      m       12893.00       0
#> 3           0       1958      w       11807.36       0

# show only the first 10 columns
generate_annuity_payments(annuities = minimal_active_annuities_xmpl,
                          last_orig_year = 2023)[,1:10]
#>          [,1]     [,2]     [,3]     [,4]     [,5]     [,6]     [,7]     [,8]
#> [1,] 12168.21 12168.21 12168.21 12168.21 12168.21 12168.21 12168.21 12168.21
#> [2,]     0.00     0.00     0.00     0.00     0.00     0.00     0.00     0.00
#> [3,] 11807.36 11807.36 11807.36 11807.36 11807.36 11807.36 11807.36 11807.36
#>          [,9]    [,10]
#> [1,] 12168.21 12168.21
#> [2,]     0.00     0.00
#> [3,] 11807.36 11807.36

# Example with indexation
print(minimal_pool_of_annuities_xmpl)
#>   Claim_id Annuity_id Origin_year Calendar_year Entering_year Annuity_start
#> 1 Claim#43          1        2006          2009          2009          2009
#> 2 Claim#51          1        2010          2013          2013          2036
#> 3 Claim#13          2        1990          2009          2009          2009
#> 4 Claim#22          1        1996          2004          2004          2004
#> 5 Claim#22          2        1996          2004          2004          2016
#>   Annuity_end Birth_year Gender Annual_payment Dynamic
#> 1           0       1939      m      12168.214       0
#> 2        2051       1986      m      12892.997       0
#> 3        2012       1988      w       7094.071       0
#> 4        2016       1960      m       5645.357       0
#> 5        2025       1960      m      41642.501       0

# show only the first 10 columns
generate_annuity_payments(annuities = minimal_pool_of_annuities_xmpl,
                          last_orig_year = 2023,
                          indices = indices_xmpl,
                          future_annuities = TRUE)[,1:10]
#>           [,1]      [,2]      [,3]      [,4]      [,5]      [,6]      [,7]
#> [1,] 16226.105 16226.105 16226.105 16226.105 16226.105 16226.105 16226.105
#> [2,]     0.000     0.000     0.000     0.000     0.000     0.000     0.000
#> [3,]  9459.822  9459.822  9459.822  9459.822     0.000     0.000     0.000
#> [4,]  8177.771  8177.771  8177.771  8177.771  8177.771  8177.771  8177.771
#> [5,]     0.000     0.000     0.000     0.000     0.000     0.000     0.000
#>           [,8]      [,9]     [,10]
#> [1,] 16226.105 16226.105 16226.105
#> [2,]     0.000     0.000     0.000
#> [3,]     0.000     0.000     0.000
#> [4,]  8177.771  8177.771  8177.771
#> [5,]     0.000     0.000     0.000