Tuesday, May 20, 2025

Xval v0.7.28 - Model Parameters

Timothy Quast
Parameters

Xval v0.7.28 - Model Parameters

In demos, multiple actuaries from different companies have asked how to set mortality to use UDD (uniform distribution of deaths) instead of CFM (constant force of mortality).

These methods determine how mortality is calculated for months in a given year.

  • Under CFM, the probability of dying in a given month, contingent on surviving to the start of that month, is the same for all months.
  • Under UDD, the probability of dying in a given month, contingent on surviving to the start of that year, is the same for all months.

Here's an example using xact:

xact
Loading...

The module expects a boolean parameter called use_udd. The default is False. If set to False, we are using CFM. Therefore, we compute the the num_deaths via:

num_deaths(t)=[1(1year_qx(t))1/12]lives_inforce(t1)num\_deaths(t) = \left[1 - \left( 1 - year\_qx(t) \right)^{1/12}\right] * lives\_inforce(t-1)

Otherwise we are using UDD and the formula is:

num_deaths(t)=year_qx(t)12num\_deaths(t) = \frac{year\_qx(t)}{12}

We can back out the monthly mortality probability by dividing number of deaths by lives inforce.

month_qx(t)=num_deaths(t)lives_inforce(t)month\_qx(t) = \frac{num\_deaths(t)}{lives\_inforce(t)}

This seems just like the module parameters update. So what's new?

Setting parameters

Similarly to module parameters, we can set parameter values whenever we go to run this module. However, now we can also set parameters if we add this module to a model.

Setting Parameters

If we set the value in the model, it will propagate as a model value for the parameter when we go do setup the run.

Here are a sample of results for use_udd values of True and False.

projection with use_uud = True

Note that num_deaths is constant throughout each year.

ageyear_qxnum_deathslives_inforcemonth_qx
530.00588888910.000490740810.0004907408
540.0060.00050.99949997660.0005002501
540.0060.00050.99899995330.0005005006
540.0060.00050.99849992990.0005007512
540.0060.00050.99799990650.0005010021
540.0060.00050.99749988320.0005012532
540.0060.00050.99699985980.0005015046
540.0060.00050.99649983640.0005017563
540.0060.00050.99599981310.0005020081
540.0060.00050.99549978970.0005022603
540.0060.00050.99499976630.0005025127
540.0060.00050.9944997430.0005027654
540.0060.00050.99399971960.0005030183
...............

projection with use_uud = False

Note that month_qx is constant throughout each year. Also, the first row mortality is not used, therefore the formula error is not a problem.

ageyear_qxnum_deathslives_inforcemonth_qx
530.0058888891#ERR1#ERR
540.0060.00050139430.99949860570.0005016458
540.00600.00050114290.99899744990.0005016458
540.0060.00050089160.99849653240.0005016458
540.0060.00050064040.9979959130.0005016458
540.0060.00050038940.9974955320.0005016458
540.0060.00050013860.99699538950.0005016458
540.0060.00049988780.99649548530.0005016458
540.0060.00049963720.99599581960.0005016458
540.0060.00049938660.99549645190.0005016458
540.0060.00049913620.99499732260.0005016458
540.0060.00049888590.99449843170.0005016458
540.0060.00049863580.99399977920.0005016458
...............

Next Steps

Now users can configure models using module parameters. So all 37 of you who asked how to UDD instead of CFM -- you have your answer. (Actually only two people asked.)

You can try the new params feature for free at demo.xval.io.