Tuesday, May 20, 2025
Xval v0.7.28 - Model 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:
Otherwise we are using UDD and the formula is:
We can back out the monthly mortality probability by dividing number of deaths by lives inforce.
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.
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.
age | year_qx | num_deaths | lives_inforce | month_qx |
---|---|---|---|---|
53 | 0.0058888891 | 0.0004907408 | 1 | 0.0004907408 |
54 | 0.006 | 0.0005 | 0.9994999766 | 0.0005002501 |
54 | 0.006 | 0.0005 | 0.9989999533 | 0.0005005006 |
54 | 0.006 | 0.0005 | 0.9984999299 | 0.0005007512 |
54 | 0.006 | 0.0005 | 0.9979999065 | 0.0005010021 |
54 | 0.006 | 0.0005 | 0.9974998832 | 0.0005012532 |
54 | 0.006 | 0.0005 | 0.9969998598 | 0.0005015046 |
54 | 0.006 | 0.0005 | 0.9964998364 | 0.0005017563 |
54 | 0.006 | 0.0005 | 0.9959998131 | 0.0005020081 |
54 | 0.006 | 0.0005 | 0.9954997897 | 0.0005022603 |
54 | 0.006 | 0.0005 | 0.9949997663 | 0.0005025127 |
54 | 0.006 | 0.0005 | 0.994499743 | 0.0005027654 |
54 | 0.006 | 0.0005 | 0.9939997196 | 0.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.
age | year_qx | num_deaths | lives_inforce | month_qx |
---|---|---|---|---|
53 | 0.0058888891 | #ERR | 1 | #ERR |
54 | 0.006 | 0.0005013943 | 0.9994986057 | 0.0005016458 |
54 | 0.0060 | 0.0005011429 | 0.9989974499 | 0.0005016458 |
54 | 0.006 | 0.0005008916 | 0.9984965324 | 0.0005016458 |
54 | 0.006 | 0.0005006404 | 0.997995913 | 0.0005016458 |
54 | 0.006 | 0.0005003894 | 0.997495532 | 0.0005016458 |
54 | 0.006 | 0.0005001386 | 0.9969953895 | 0.0005016458 |
54 | 0.006 | 0.0004998878 | 0.9964954853 | 0.0005016458 |
54 | 0.006 | 0.0004996372 | 0.9959958196 | 0.0005016458 |
54 | 0.006 | 0.0004993866 | 0.9954964519 | 0.0005016458 |
54 | 0.006 | 0.0004991362 | 0.9949973226 | 0.0005016458 |
54 | 0.006 | 0.0004988859 | 0.9944984317 | 0.0005016458 |
54 | 0.006 | 0.0004986358 | 0.9939997792 | 0.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.