Disabled Lives - Deterministic

Valuation Model

Documentation

class DisabledLivesValEMD(*, extract_base: pandas.core.frame.DataFrame, extract_riders: pandas.core.frame.DataFrame, valuation_dt: pandas._libs.tslibs.timestamps.Timestamp, assumption_set: str, modifier_ctr: float = 1.0, modifier_interest: float = 1.0)

Disabled lives deterministic valuation extract model.

This model takes an extract of policies and runs them through the respective Policy Models based on the COVERAGE_ID column (i.e., whether it is base policy or rider).

Parameters

extract_baseDataFrame

The disabled lives base extract.

extract_ridersDataFrame

The disabled lives rider extract.

valuation_dtTimestamp

The valuation date which reserves are based.

assumption_setstr

The assumption set to use for running the model. Options are :

  • stat

  • gaap

  • best-estimate

Sensitivities

modifier_ctrfloat

Modifier for CTR.

modifier_interestfloat

Interest rate modifier.

Meta

model_versionstr

The model version generated by versioneer.

last_commitstr

The last git commit.

run_date_timeTimestamp

The run date and time.

Intermediates

recordsdict

The extract transformed to records.

Returns

projectedDataFrame

The projected reserves for the policyholders.

time_0DataFrame

The time 0 reserve for the policyholders.

errorslist

Any errors captured.

Steps

  1. Create Records from Extracts - Turn extract into a list of records for each row in extract.

  2. Run Records with Policy Models - Foreach record run through respective policy model based on COVERAGE_ID value.

  3. Get Time0 Values - Filter projected reserves frame down to time_0 reserve for each record.

Usage

import pandas as pd
from footings_idi_model.models import DisabledLivesValEMD
extract_base = pd.read_csv(
  "disabled-lives-sample-base.csv",
  parse_dates=["BIRTH_DT", "INCURRED_DT", "TERMINATION_DT"]
)
extract_base
POLICY_ID BIRTH_DT CLAIM_ID COVERAGE_ID IDI_OCCUPATION_CLASS IDI_CONTRACT IDI_BENEFIT_PERIOD IDI_MARKET GENDER TOBACCO_USAGE INCURRED_DT TERMINATION_DT ELIMINATION_PERIOD BENEFIT_AMOUNT IDI_DIAGNOSIS_GRP COLA_PERCENT
0 M768 1967-01-15 M768C1 BASE 2 AS LIFE INDV F N 2011-01-15 2087-01-14 180 100 HIGH 0.02
1 M768 1967-01-15 M768C1 CAT 2 AS LIFE INDV F N 2011-01-15 2087-01-14 180 100 HIGH 0.02
2 M768 1967-01-15 M768C1 COLA 2 AS LIFE INDV F N 2011-01-15 2087-01-14 180 100 HIGH 0.02
3 M288 1966-08-16 M288C1 BASE M AO 24M INDV M N 2019-08-16 2021-10-15 60 100 VERY_HIGH 0.02
4 M234 1984-09-12 M234C1 BASE 4 AS TO67 INDV F N 2019-09-12 2051-09-11 360 100 VERY_HIGH 0.03
5 M234 1984-09-12 M234C1 RES 4 AS TO67 INDV F N 2019-09-12 2051-09-11 360 100 VERY_HIGH 0.03
6 M344 1964-07-24 M344C1 BASE 1 AS 24M INDV F Y 2019-07-24 2021-08-23 30 100 HIGH 0.02
7 M533 1958-08-18 M533C1 BASE 1 SO 60M INDV F N 2017-08-18 2022-09-17 30 100 MID 0.02
8 M434 1968-08-02 M434C1 BASE 1 SO TO70 INDV F Y 2010-08-02 2038-08-01 180 100 HIGH 0.03
9 M445 1958-09-03 M445C1 BASE M AO 60M INDV M Y 2016-09-03 2021-11-02 60 100 VERY_LOW 0.03
10 M221 1987-12-02 M221C1 BASE 1 AS TO67 INDV M N 2019-12-02 2054-12-01 90 100 MID 0.03
11 M9 1970-10-17 M9C1 BASE 2 AO TO70 INDV M Y 2009-10-17 2040-10-16 90 100 VERY_HIGH 0.03
12 M776 1958-10-02 M776C1 BASE 1 AS TO67 INDV M N 1990-10-02 2025-10-01 360 100 HIGH 0.02
13 M776 1958-10-02 M776C1 SIS 1 AS TO67 INDV M N 1990-10-02 2025-10-01 360 100 HIGH 0.02
14 M776 1958-10-02 M776C1 COLA 1 AS TO67 INDV M N 1990-10-02 2025-10-01 360 100 HIGH 0.02
extract_riders = pd.read_csv("disabled-lives-sample-riders.csv")
extract_riders
POLICY_ID CLAIM_ID COVERAGE_ID RIDER_ATTRIBUTE VALUE
0 M234 M234C1 RES residual_benefit_percent 0.5
model = DisabledLivesValEMD(
    extract_base=extract_base,
    extract_riders=extract_riders,
    valuation_dt=pd.Timestamp("2020-03-31"),
    assumption_set="STAT",
)

To run the model call the run method which returns -

  • the projected reserve for each policy in the extract (projected),

  • the reserve as of the valuation date for each policy (time0), and

  • policies that error out when the model runs (run).

projected, time0, errors = model.run()

Note the time0 and projected have the same columns with time0 being a subset of the projected frame.

projected.info()
<class 'pandas.core.frame.DataFrame'>
Int64Index: 4334 entries, 0 to 66
Data columns (total 23 columns):
 #   Column          Non-Null Count  Dtype         
---  ------          --------------  -----         
 0   MODEL_VERSION   4334 non-null   object        
 1   LAST_COMMIT     4334 non-null   object        
 2   RUN_DATE_TIME   4334 non-null   datetime64[ns]
 3   SOURCE          4334 non-null   object        
 4   POLICY_ID       4334 non-null   object        
 5   CLAIM_ID        4334 non-null   object        
 6   COVERAGE_ID     4334 non-null   object        
 7   DATE_BD         4334 non-null   datetime64[ns]
 8   DATE_ED         4334 non-null   datetime64[ns]
 9   DURATION_YEAR   4334 non-null   Int64         
 10  DURATION_MONTH  4334 non-null   Int64         
 11  BENEFIT_AMOUNT  4334 non-null   float64       
 12  CTR             4334 non-null   float64       
 13  LIVES_BD        4334 non-null   float64       
 14  LIVES_MD        4334 non-null   float64       
 15  LIVES_ED        4334 non-null   float64       
 16  DISCOUNT_BD     4334 non-null   float64       
 17  DISCOUNT_MD     4334 non-null   float64       
 18  DISCOUNT_ED     4334 non-null   float64       
 19  PVFB_BD         4334 non-null   float64       
 20  PVFB_ED         4334 non-null   float64       
 21  DATE_DLR        4334 non-null   datetime64[ns]
 22  DLR             4334 non-null   float64       
dtypes: Int64(2), datetime64[ns](4), float64(11), object(6)
memory usage: 821.1+ KB
projected
MODEL_VERSION LAST_COMMIT RUN_DATE_TIME SOURCE POLICY_ID CLAIM_ID COVERAGE_ID DATE_BD DATE_ED DURATION_YEAR ... LIVES_BD LIVES_MD LIVES_ED DISCOUNT_BD DISCOUNT_MD DISCOUNT_ED PVFB_BD PVFB_ED DATE_DLR DLR
0 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValBasePMD M768 M768C1 BASE 2020-03-15 2020-04-15 10 ... 1.000000 0.999172 0.998345 1.000000 0.998752 0.997506 20719.986514 20671.699782 2020-03-31 20730.47
1 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValBasePMD M768 M768C1 BASE 2020-04-15 2020-05-15 10 ... 0.998345 0.997519 0.996692 0.997506 0.996262 0.995019 20671.699782 20572.320820 2020-04-30 20724.23
2 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValBasePMD M768 M768C1 BASE 2020-05-15 2020-06-15 10 ... 0.996692 0.995868 0.995043 0.995019 0.993777 0.992537 20572.320820 20473.353763 2020-05-31 20693.01
3 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValBasePMD M768 M768C1 BASE 2020-06-15 2020-07-15 10 ... 0.995043 0.994219 0.993396 0.992537 0.991299 0.990062 20473.353763 20374.796902 2020-06-30 20661.76
4 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValBasePMD M768 M768C1 BASE 2020-07-15 2020-08-15 10 ... 0.993396 0.992574 0.991752 0.990062 0.988827 0.987593 20374.796902 20276.648538 2020-07-31 20630.50
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
62 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValColaRPMD M776 M776C1 COLA 2025-05-02 2025-06-02 35 ... 0.883314 0.882338 0.881363 0.856581 0.855512 0.854445 344.807293 275.194921 2025-05-31 359.95
63 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValColaRPMD M776 M776C1 COLA 2025-06-02 2025-07-02 35 ... 0.881363 0.880389 0.879416 0.854445 0.853379 0.852314 275.194921 205.909539 2025-06-30 271.95
64 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValColaRPMD M776 M776C1 COLA 2025-07-02 2025-08-02 35 ... 0.879416 0.878444 0.877473 0.852314 0.851251 0.850188 205.909539 136.949609 2025-07-31 183.59
65 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValColaRPMD M776 M776C1 COLA 2025-08-02 2025-09-02 35 ... 0.877473 0.876504 0.875535 0.850188 0.849128 0.848068 136.949609 68.313603 2025-08-31 94.87
66 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValColaRPMD M776 M776C1 COLA 2025-09-02 2025-10-02 35 ... 0.875535 0.874568 0.873601 0.848068 0.847010 0.845953 68.313603 0.000000 2025-09-30 5.77

4334 rows × 23 columns

time0
MODEL_VERSION LAST_COMMIT RUN_DATE_TIME SOURCE POLICY_ID CLAIM_ID COVERAGE_ID DATE_DLR DLR
0 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValBasePMD M768 M768C1 BASE 2020-03-31 20730.47
0 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValCatRPMD M768 M768C1 CAT 2020-03-31 20730.47
0 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValColaRPMD M768 M768C1 COLA 2020-03-31 8602.22
0 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValBasePMD M288 M288C1 BASE 2020-03-31 1245.77
0 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValBasePMD M234 M234C1 BASE 2020-03-31 6335.54
0 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValResRPMD M234 M234C1 RES 2020-03-31 3167.77
0 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValBasePMD M344 M344C1 BASE 2020-03-31 1262.22
0 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValBasePMD M533 M533C1 BASE 2020-03-31 2659.17
0 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValBasePMD M434 M434C1 BASE 2020-03-31 14992.73
0 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValBasePMD M445 M445C1 BASE 2020-03-31 1810.27
0 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValBasePMD M221 M221C1 BASE 2020-03-31 9692.17
0 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValBasePMD M9 M9C1 BASE 2020-03-31 15087.05
0 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValBasePMD M776 M776C1 BASE 2020-03-31 5716.40
0 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValSisRPMD M776 M776C1 SIS 2020-03-31 1714.92
0 0.6.0 5d026f4756f03f9cb797de5a8f0c3c6d2b349ccb 2021-03-25 11:28:38.280102 DValColaRPMD M776 M776C1 COLA 2020-03-31 4939.78
errors
[]

An audit of the model is ran by calling the audit method as shown below.

model.audit("Audit-DisabledLivesValEMD.xlsx")

The audit file can be downloaded here.

Projection Model

Documentation

To be completed.

Usage

To be completed.