Create a summary of termination experience for a given target status (an ExpStats object).
Parameters
Name
Type
Description
Default
target_status
str | list | numpy.numpy.ndarray
A single string, list, or array of target status values
None
expected
str | list | numpy.numpy.ndarray
A single string, list, or array of column names in the data property with expected values
None
wt
str
Name of the column in the data property containing weights to use in the calculation of claims, exposures, and partial credibility.
None
conf_int
bool
If True, the output will include confidence intervals around the observed termination rates and any actual-to-expected ratios.
False
credibility
bool
Whether the output should include partial credibility weights and credibility-weighted decrement rates.
False
conf_level
float
Confidence level under the Limited Fluctuation credibility method
0.95
cred_r
float
Error tolerance under the Limited Fluctuation credibility method
0.05
col_exposure
str
Name of the column in data containing exposures. Only necessary for SplitExposedDF objects.
'exposure'
Notes
If the ExposedDF object is grouped (see the group_by() method), the returned ExpStats object’s data will contain one row per group.
If nothing is passed to target_status, the target_status property of the ExposedDF object will be used. If that property is None, all status values except the first level will be assumed. This will produce a warning message.
Expected values
The expected argument is optional. If provided, this argument must be a string, list, or array with values corresponding to columns in the data property containing expected experience. More than one expected basis can be provided.
Confidence intervals
If conf_int is set to True, the output will contain lower and upper confidence interval limits for the observed termination rate and any actual-to-expected ratios. The confidence level is dictated by conf_level. If no weighting variable is passed to wt, confidence intervals will be constructed assuming a binomial distribution of claims. Otherwise, confidence intervals will be calculated assuming that the aggregate claims distribution is normal with a mean equal to observed claims and a variance equal to:
Var(S) = E(N) * Var(X) + E(X)**2 * Var(N),
Where S is the aggregate claim random variable, X is the weighting variable assumed to follow a normal distribution, and N is a binomial random variable for the number of claims.
If credibility is True and expected values are passed to expected, the output will also contain confidence intervals for any credibility-weighted termination rates.
Credibility
If credibility is set to True, the output will contain a credibility column equal to the partial credibility estimate under the Limited Fluctuation credibility method (also known as Classical Credibility) assuming a binomial distribution of claims.
Returns
Type
Description
ExpStats
An ExpStats object with a data property that includes columns for any grouping variables, claims, exposures, and observed decrement rates (q_obs). If any values are passed to expected, additional columns will be added for expected decrements and actual-to-expected ratios. If credibility is set to True, additional columns are added for partial credibility and credibility-weighted decrement rates (assuming values are passed to expected). If conf_int is set to True, additional columns are added for lower and upper confidence interval limits around the observed termination rates and any actual-to-expected ratios. Additionally, if credibility is True and expected values are passed to expected, the output will contain confidence intervals around credibility-weighted termination rates. Confidence interval columns include the name of the original output column suffixed by either _lower or _upper. If a value is passed to wt, additional columns are created containing the the sum of weights (.weight), the sum of squared weights (.weight_qs), and the number of records (.weight_n).
References
Herzog, Thomas (1999). Introduction to Credibility Theory
Examples
import actxps as xp(xp.ExposedDF(xp.load_census_dat(),"2019-12-31", target_status="Surrender"). group_by('pol_yr', 'inc_guar'). exp_stats(conf_int=True))