The Data Space#
Input data shared by every by-policy projection.
The six input CSVs are read here, once per model, and referenced from
Projection as data. Projection is
parameterized by idx, the position of a model point in the table, so each
Projection[i] is a separate ItemSpace with its own cells cache; if the readers lived
there, every model point would re-read every file. Holding them in an unparameterized
Space reads each file once no matter how many policies are projected.
Inputs are external files: plain CSVs in the model folder’s parent directory,
products/whole_life/, rather than data stored inside the model. The model folder
therefore holds nothing but formulas — no _data/, no IOSpec, no embedded values —
so a diff of the model shows logic changes only. This follows
annuallife.TradLife_A; contrast basiclife.BasicTerm_S, which keeps its inputs
inside the model through modelx’s IOSpec machinery.
The consequence worth knowing: the model is not portable on its own. Copying the
WholeLife_US_SEC folder without its parent’s CSVs produces a model that reads and
then fails on first evaluation.
Five of the tables are WholeLife_US_S’s. The guaranteed cash value schedule, the net
single premiums, the nonforfeiture net level premiums, the guaranteed mortality and the
final-expense premium rates are the files WholeLife_US_S reads, read here in
place: one copy of each table serves both models, so an edit to one reaches both. The
model point table is this model’s own, model_point_table_sec.csv; it sits beside
WholeLife_US_S’s model_point_table.csv, which this model never opens.
input_dir() resolves the directory from _model.path.parent at run time, so
the model works wherever the repository is checked out. Each table has a filename
Reference and a reader Cells:
Reference |
Cells |
File |
|---|---|---|
model_point_file |
model_point_table() |
model_point_table_sec.csv |
cv_file |
cv_table() |
cv_table.csv |
nsp_file |
nsp_table() |
nsp_table.csv |
np_guar_file |
np_guar_table() |
np_guar_table.csv |
mort_table_file |
mort_table() |
mort_table.csv |
premium_rates_file |
premium_rates() |
premium_rates.csv |
The model point table is checked as it is read. Nine of its columns are the
in-force interface: policy_count and duration_mth, as in
basiclife.BasicTerm_SE, and the seven columns of an in-force policy’s opening
state. model_point_table() refuses a table that lacks any of them, repeats a
point_id, holds a count or a duration no policy can have, or holds an opening state
no policy can be in. The checks run in turn, and the first that fails raises, naming the
missing column or every point that fails it. It also refuses a policy to be issued more
than future_horizon_mth months after the valuation date, 120 months as shipped:
future new business is written over a stated horizon, so that no frame runs longer than
cover from issue plus that horizon. Set to 0, the Reference refuses future new business
altogether. A longer horizon projects in modelx, but the compiled model’s caches are sized
for the shipped 120 months (spec_sec.py): it needs t there raised to
12 x (maturity_age - issue_age_min) + the horizon + 2 and a rebuild, or a frame longer
than 1,320 months raises IndexError compiled, naming nothing, at the first month past
the caches. Whether a point is still in cover at the valuation date, and whether the
contract issues it, are rules of the product rather than of the table, and
Projection.proj_len checks them, against two Projection References the caches are
sized from as they are from the horizon: maturity_age and issue_age_min.
The four guarantee-basis tables belong together. mort_table.csv holds the
guaranteed mortality q^g, nsp_table.csv the endowment-at-100 net single
premiums that price paid-up additions, np_guar_table.csv the nonforfeiture net
level premium that the dividend’s interest margin is credited on, and cv_table.csv
the guaranteed cash value schedule. The technical notes’ first “known modeling
pitfall” is exactly a mismatch between them, and it prescribes regenerating all four
from one 2017 CSO / 4% source.
The shipped four are not one construction, and no set carrying the worked example’s
anchors could be. On a single mortality basis at 4% the notes’ own definition
collapses to NNLP = 1000 d NSP_45 / (1 - NSP_45), so the worked example’s
NNLP = 13.00 forces NSP_45 = 0.252616 and hence NSP_55 <= 0.252616 x 1.04^10
= 0.373933 — short of the worked example’s NSP_55 = 0.42, whatever mortality is
assumed. Each shipped table is therefore pinned to its own worked-example anchor
independently: q^g_54 = 0.00320, NSP_55 = 0.42, NP_g = 13.00, and 95.00 and
112.00 per $1,000 on the policy-year 9 and 10 rows of the cash value schedule — the
worked example’s CV_107 and CV_119. The anchor cell, in force 108 months at the
valuation date, reaches them as cv_pp_anniv(9), the value entering its t = 0,
which WholeLife_US_S reads as cv_pp(107), and as cv_pp(11), its tenth
anniversary, WholeLife_US_S’s month 119. Reconciling nsp_table.csv with
mort_table.csv would need a guarantee interest rate falling from 5.99% at age 45
to 0.02% at age 99. model.md and the Projection docstring carry the
arithmetic; a test pins the mismatch by age so it cannot quietly close.
What is guaranteed, because the two consequences the pitfall names would otherwise
bite, is the pair of endpoints: nsp = 1.000000 at attained age 100, so the
paid-up-additions cash value reaches paid-up-additions face at maturity, and
cv_per_1000 = 1000.00 on the last policy year of each cell — the schedule’s
policy_year = 100 - issue_age row, read by the model at t = proj_len() - 1 — so
the base block endows at face.
Both are asserted by the tests. Every rate is also sex-distinct, as the notes
require — including the pay-to-100 cash value schedule.
To swap in a licensed mortality basis, replace mort_table.csv with a same-schema
file, or point mort_table_file at a different name, then clear the cache; a compiled
model clears no cache, so there the name is set on a package just imported, before
anything is read. No formula changes — but regenerate nsp_table.csv,
np_guar_table.csv and cv_table.csv from the same basis, or the pitfall above is
exactly what happens.
Doing so is the only way to satisfy the notes’ one-basis instruction, and it will stop
the worked example reproducing. Replacing the files changes WholeLife_US_S
too, which reads the same ones.
The vectors. The readers return what the files hold, and no
Projection cell but model_point, a reporting cell, reads
them. The others read the arrays below instead, one element at a time, a model point’s
attribute being the element at its position, data.issue_age()[idx]. That is what lets
the model compile to C, as basiclife.BasicTerm_SC does: each array is a numpy vector
or table of int64 or float64, which compiles to a typed memoryview, never one of bools,
objects or text, and each count of rows or schedules is an int.
Text the projection needs is decoded here, into the number it selects: the product into two flags, the premium period and the dividend option into their codes, the premium mode into the months between instalments. Each table keyed by more than a number becomes an integer-indexed array or a join. The cash value schedules, keyed by premium period, sex and issue age, are numbered, each point carrying the number of its own, and tabled by schedule and policy year. The guaranteed mortality and the net single premiums are numbered by sex the same way and tabled by schedule and attained age, padded from age 0, so that the column index is the age. The final-expense rates and the net level premiums, each one number a point and read by one design alone, are joined to the points, a flag beside each saying whether the table has the point’s key:
Cells |
dtype |
Shape |
From |
|---|---|---|---|
point_id() |
int64 |
[point] |
the table’s index |
issue_age() |
int64 |
[point] |
|
face_amount() |
float64 |
[point] |
|
annual_premium() |
float64 |
[point] |
|
pua_rider_premium() |
float64 |
[point] |
|
term_blend_target() |
float64 |
[point] |
|
loan_utilization() |
float64 |
[point] |
|
policy_count() |
float64 |
[point] |
|
duration_mth() |
int64 |
[point] |
|
pua_face_init() |
float64 |
[point] |
|
pua_face_prev_anniv_init() |
float64 |
[point] |
|
loan_bal_init() |
float64 |
[point] |
|
loan_bal_prev_anniv_init() |
float64 |
[point] |
|
div_accum_init() |
float64 |
[point] |
|
div_prev_anniv_init() |
float64 |
[point] |
|
prem_cum_init() |
float64 |
[point] |
|
is_par() |
int64 |
[point] |
|
is_graded() |
int64 |
[point] |
|
premium_period_code() |
int64 |
[point] |
|
dividend_option_code() |
int64 |
[point] |
|
prem_cycle() |
int64 |
[point] |
|
premium_rate_rows() |
int |
scalar |
premium_rates.csv, checked |
premium_rate_per_1000() |
float64 |
[point] |
premium_rates.csv, joined |
has_premium_rate() |
int64 |
[point] |
1 where joined, 0 where not |
np_guar_rows() |
int |
scalar |
np_guar_table.csv, checked |
np_guar_per_1000() |
float64 |
[point] |
np_guar_table.csv, joined |
has_np_guar() |
int64 |
[point] |
1 where joined, 0 where not |
cv_schedules() |
int |
scalar |
cv_table.csv, checked |
cv_schedule() |
int64 |
[point] |
period, sex and issue age, joined |
cv_array() |
float64 |
[schedule, y] |
cv_table.csv |
cv_year_first() |
int64 |
[schedule] |
cv_table.csv |
cv_year_last() |
int64 |
[schedule] |
cv_table.csv |
mort_schedules() |
int |
scalar |
mort_table.csv, checked |
mort_schedule() |
int64 |
[point] |
|
mort_table_array() |
float64 |
[schedule, age] |
mort_table.csv |
mort_age_first() |
int64 |
[schedule] |
mort_table.csv |
mort_age_last() |
int64 |
[schedule] |
mort_table.csv |
nsp_schedules() |
int |
scalar |
nsp_table.csv, checked |
nsp_schedule() |
int64 |
[point] |
|
nsp_array() |
float64 |
[schedule, age] |
nsp_table.csv |
nsp_age_first() |
int64 |
[schedule] |
nsp_table.csv |
nsp_age_last() |
int64 |
[schedule] |
nsp_table.csv |
An array is read by element, never whole, in this Space as in
Projection. The compiler types an array cell as a memoryview
only once it has seen that every use of it, in either Space, is an element read: one
len(), slice, loop over it or numpy call on it anywhere, and the cell compiles as a
Python object. So an array derived here from another reads the table’s column, or the
other cell element by element, as cv_schedule() reads issue_age(); a flag
beside a join is formed from the tables again, not read off the join’s values; and a
width comes from a table, never from another cell’s array. Each table’s check is one cell
that every array, extent and schedule number of the table reads first,
cv_schedules() for the cash values, so that a projection, which reads an extent or a
schedule number first, meets the same refusal as a reader of the array.
What cannot be decoded is refused when the array is first read, naming every point
at fault: a point_id that is not a whole number, a premium period other than TO_100,
PAY_10, PAY_20 or TO_65, a premium mode other than A, SA, Q or M. A dividend option none
of the four is WholeLife_US_S’s none, and is read so, not refused. So is a table the
arrays cannot hold: a cash value schedule whose policy years are not whole, leave a gap,
repeat or start below 1; a mortality or net single premium schedule with an age that is
not whole, a gap, a repeated or negative age; an issue age key of the cash values, the
net level premiums or the rates that is not whole; a key of the net level premiums or the
rates that appears twice. WholeLife_US_S met each of these only when a projection
reached it. A key written as a float, a policy year 9.0 or an age 54.0, is read by
its value, as WholeLife_US_S’s lookups match it, and so is every key an extent or a
join is taken from: a key written as text is not whole, and the table’s check refuses it.
A read beyond a table’s extent is refused where WholeLife_US_S’s lookup raised
KeyError, by the one Projection cell that reads the table,
naming the point: cv_pp_anniv, nsp and mort_rate_guar_at; and so is a point
whose key a joined table lacks, by the cell that reads the join, premium_rate or
np_guar. Data refuses neither, since WholeLife_US_S projects a point that reads
no such key, a participating point without a final-expense rate among them.
A value a capped rate, a min or a max reads is a number in its range, or it is
refused when its array is first read, naming the file, the column and every line, key or
point at fault. Projection.mort_rate caps the annual rate with min, and the
dividend’s floor, the REDUCE_PREM offset, the term-blend gap and its cap, the
paid-up-additions purchases bound theirs with min and max.
Each keeps its first argument unless a later one compares smaller, or larger, and no
comparison with NaN holds, so a NaN would stay NaN; but an infinity is a number, which the
cap reads as 1, certain death, and a blank or a text is no number at all. Through the
dividend and the paid-up additions those bounds reach every amount and rate the
projection reads, so every one is checked, over its whole column, whether or not a point
carries its key: the face, the premium of the participating design, the rider premium
and the blend target, each a number, zero or more; the loan share, a number from 0 to 1;
a cash value, a net level premium and a final-expense rate, each a number, zero or more;
a guaranteed mortality rate, a number from 0 to 1, a probability; and a net single
premium, a number above 0, which the purchases divide by. The opening state and the count
are model_point_table()’s, and the issue age must be a finite number. A blank
premium off the participating design is final expense’s own, and is left so, and so is
the padding, which no formula reads.
An int64 holds what it is read from. A float past int64 casts to the least int64
without a word, so a number read into an int64 vector is first refused unless it is below
2**53 in size, where the int64 holds WholeLife_US_S’s reading of it: the issue age,
and duration_mth (model_point_table()). modelx and the compiled model refuse
alike, before any cast. A fractional issue age is not refused: it truncates toward zero,
as WholeLife_US_S’s int truncates it.
Cells Descriptions#
- input_dir()[source]#
The directory holding the input CSVs: the model folder’s parent.
Inputs are external files, not data stored inside the model, so the model folder is pure formulas. The path is resolved at run time from where the model was read, following
annuallife.TradLife_A.
- model_point_table()[source]#
The model point table, read from model_point_table_sec.csv and checked.
Indexed by
point_id. Nine columns are the in-force interface:policy_countandduration_mth, the completed policy months at the valuation date, as inbasiclife.BasicTerm_SE, and the seven columns of the opening state, per policy, as the policy stands at the start of month 0, before any month-0 event:pua_face_init,loan_bal_initanddiv_accum_init: the paid-up-additions face, the loan and the accumulation balance entering month 0;pua_face_prev_anniv_initandloan_bal_prev_anniv_init: the same face and loan at the anniversary that opened the policy year under way, the one on or before the valuation date, anddiv_prev_anniv_init, the dividend credited there;prem_cum_init: the gross premium paid before the valuation date.
The rest are
WholeLife_US_S’s, exceptrow_kind,source_policy_idandsource_mth, which record where the generator took each shipped row from and which no formula reads.The checks run over the whole table at once, and the first that fails raises
ValueError, naming the missing column or every point it fails on:the nine in-force columns are present;
no
point_idappears twice;policy_countis a number, zero or more;duration_mthis a whole number of months: positive for a policy in force, 0 for one issued at the valuation date, negative for one issued later;duration_mthis below2**53months, which an int64 and a float both hold exactly: numpy would read a duration past int64 as the least int64, without a word, a policy to be issued2**63months on, past the horizon below;no policy is issued more than
future_horizon_mthmonths after the valuation date, soduration_mthis-future_horizon_mthor more. At 0 the model takes no future new business, and the message says so; a negative horizon is itself refused;each opening-state column is a number, zero or more;
a policy not yet in force,
duration_mth0 or less, has no opening state: it is issued with none;the non-participating final-expense design has no paid-up additions and no dividend;
only the ACCUM option has an accumulation balance, which on any other the projection would drop from every benefit;
on a point valued on a policy anniversary,
duration_mtha multiple of 12, the two anniversary columns equal the two entering month 0, which are the same instant;in the first policy year,
duration_mth1 to 11, the year opened at issue and has credited no dividend yet, so the three anniversary columns hold their issue values, 0, and so doesdiv_accum_init.
A point whose paid-up additions at the anniversary exceed those entering month 0 is accepted. The model never shrinks the block, so such a row records a partial surrender of additions, which the model does not implement, and it is projected from the values it gives.
The final-expense premium rates per $1,000, read from premium_rates.csv.
- point_id()[source]#
The
point_idof every model point, in table order: int64 [point].Projectionis indexed by position,idx, so this is how a projection names its point:Projection.point_id()is the element atidx, and every refusal quotes it. A label that is not a whole number is refused, naming every such label.
- issue_age()[source]#
The issue age (ANB) of every model point: int64 [point].
The attained age it opens indexes mort_table.csv, whose rate
Projection.mort_ratecaps, and keys the cash value schedule, the net level premium and the final-expense rate, so an age that is not a finite number, blank, text or infinite, is refused, naming every point that carries one: numpy would read a blank or infinite age as the least int64, without a word. So is one of2**53or more in size, which numpy would read as the least int64 once past int64, before the cast. Otherwise the age is read asWholeLife_US_Sreads it,intof the number: a fraction truncates toward zero, so 45.5 projects as 45, and -0.5 as 0, whichproj_lenthen issues, asWholeLife_US_Sdoes.
- face_amount()[source]#
The base face amount F of every model point: float64 [point].
A number, zero or more: the face reaches the dividend’s floor, the term-blend gap and the cap on the layer through the net amount at risk, so a blank, text, infinite or negative face is refused, naming every point that carries one.
The participating design’s gross annual premium G, its model point’s: float64 [point].
Projection.premium_pp_annreads it on the participating design alone, where it is a number, zero or more, or the point is refused: the premium reaches the REDUCE_PREM offset’smax. Final expense prices its premium from premium_rates.csv and leaves the column blank, NaN here, which no formula reads; a number there is held to the same rule, and anything else is refused. Each refusal names every point that carries one.
The annual paid-up-additions rider premium of every model point: float64 [point].
A number, zero or more, or it is refused, naming every point that carries one: the rider’s additions reach the dividend’s floor and the term-blend gap.
- term_blend_target()[source]#
TF, the term-blend rider’s target face, of every model point: float64 [point].
A number, zero or more, or it is refused, naming every point that carries one: the term-blend gap’s
maxand the layer’sminread it.
- loan_utilization()[source]#
The share of the cash value held as a loan, of every model point: float64 [point].
A share, so a number from 0 to 1, or it is refused, naming every point that carries one: the loan reaches the dividend’s floor through the interest margin.
- policy_count()[source]#
The
policy_countof every model point: float64 [point].model_point_table()has checked it: a number, zero or more.
- duration_mth()[source]#
The
duration_mthof every model point, in whole months: int64 [point].model_point_table()has checked that each is whole, so a duration written as12.0is the int 12.
- pua_face_init()[source]#
The
pua_face_initcolumn, the additions entering month 0: float64 [point].model_point_table()has checked it, as every opening-state column: a number, zero or more.
- pua_face_prev_anniv_init()[source]#
The
pua_face_prev_anniv_initcolumn, the additions at the anniversary on or before the valuation date: float64 [point], checked bymodel_point_table().
- loan_bal_init()[source]#
The
loan_bal_initcolumn, the loan entering month 0: float64 [point], checked bymodel_point_table().
- loan_bal_prev_anniv_init()[source]#
The
loan_bal_prev_anniv_initcolumn, the loan at the anniversary on or before the valuation date: float64 [point], checked bymodel_point_table().
- div_accum_init()[source]#
The
div_accum_initcolumn, the accumulation balance entering month 0: float64 [point], checked bymodel_point_table().
- div_prev_anniv_init()[source]#
The
div_prev_anniv_initcolumn, the dividend credited at the anniversary on or before the valuation date: float64 [point], checked bymodel_point_table().
- prem_cum_init()[source]#
The
prem_cum_initcolumn, the gross premium paid before the valuation date: float64 [point], checked bymodel_point_table().
- is_par()[source]#
Whether each model point is the participating design: int64 [point], 1 where its
productis WL_PAR, 0 elsewhere.WholeLife_US_Stests the product against that one value, so any other product is read as not participating, as there; nothing is refused. An int, not a bool: a numpy bool array compiles as a Python object, not a memoryview.
- is_graded()[source]#
Whether each model point is the graded final-expense plan: int64 [point], 1 where its
productis WL_FE_GRADED, 0 elsewhere.WholeLife_US_S’s death benefit tests the product against that one value, andProjection.claim_ppreads this instead. Nothing is refused.
The premium period of every model point, as its code: int64 [point].
TO_100 0, PAY_10 1, PAY_20 2, TO_65 3, the
ProjectionReferences of the names, in the orderproduct-spec.mdlists them.Projection.policy_termandProjection.mec_flagbranch on it whereWholeLife_US_Scompares the text. Any other period is refused, naming every point that carries it, whereWholeLife_US_S’spolicy_termraisedinvalid premium_periodonce a projection reached it.
- dividend_option_code()[source]#
The dividend option of every model point, as its code: int64 [point].
PUA 0, CASH 1, ACCUM 2, REDUCE_PREM 3, the
ProjectionReferences of the names, and NONE 4 for any other text, final expense’sNONEamong it:WholeLife_US_Scompares the text with each of the four and reads anything else as none of them, so an unknown option is read so here too, not refused, and earns no dividend benefit.
- prem_cycle()[source]#
Months between premium instalments, decoded from
premium_mode: int64 [point].A 12, SA 6, Q 3, M 1, the arithmetic of the mode, as
WholeLife_US_S’sprem_cyclehas it, andProjection.modal_factorselects the mode’s factor by it. Any other mode is refused, naming every point that carries it, whereWholeLife_US_Sraised once a projection reached it.
The number of rates in premium_rates.csv, each checked: an int.
A rate is keyed by product, sex, risk class and issue age, the key
WholeLife_US_S’spremium_ratelooks it up by. The issue age is read by its value, as that lookup matches it, so one written65.0is 65; one that is not a whole number, text among them, is refused, naming every such age. A key that appears twice is refused, naming every such key: the lookup would return two rates. And everyrate_per_1000must be a number, zero or more, whether or not a point carries its key, since the final-expense premium it prices reaches the REDUCE_PREM offset’smaxand the acquisition charge; the refusal names every key at fault.premium_rate_per_1000()andhas_premium_rate()read this first, so either meets the refusal, whichever a projection reads first.
Each model point’s final-expense rate per $1,000 of face: float64 [point].
The rate of premium_rates.csv keyed by the point’s product, sex,
risk_classand issue age, matched by value, asWholeLife_US_Slooks it up, and NaN where the table has no rate for the key, whichhas_premium_rate()marks. Only final expense reads it, so a participating point, which has none as shipped, is not refused here:Projection.premium_raterefuses a point that reads a rate it lacks, naming it, whereWholeLife_US_S’s lookup raisedKeyError.premium_rate_rows()has checked the table.
Whether premium_rates.csv has a rate for each model point’s key: int64 [point], 1 where it has, 0 where not.
The key and the match are
premium_rate_per_1000()’s, formed again from the tables rather than read off that array, which would read it whole. An int, not a bool: a numpy bool array compiles as a Python object, not a memoryview.
- np_guar_rows()[source]#
The number of net level premiums in np_guar_table.csv, each checked: an int.
A premium is keyed by premium period, sex and issue age, the key
WholeLife_US_S’snp_guarlooks it up by, the issue age read by its value. Aspremium_rate_rows()checks its table: an issue age that is not a whole number, text among them, and a key that appears twice are refused, naming every one, and everynp_guar_per_1000must be a number, zero or more, whether or not a point carries its key, since the interest margin it enters reaches the dividend’s floor.np_guar_per_1000()andhas_np_guar()read this first.
- np_guar_per_1000()[source]#
Each model point’s nonforfeiture net level premium per $1,000: float64 [point].
The premium of np_guar_table.csv keyed by the point’s premium period, sex and issue age, matched by value, and NaN where the table has none, which
has_np_guar()marks. Only the participating dividend reads it, so a final-expense point, which has none as shipped, is not refused here:Projection.np_guarrefuses a point that reads a premium it lacks, naming it.np_guar_rows()has checked the table.
- has_np_guar()[source]#
Whether np_guar_table.csv has a premium for each model point’s key: int64 [point], 1 where it has, 0 where not, formed as
has_premium_rate()is.
- cv_schedules()[source]#
The number of cash value schedules in cv_table.csv, each checked: an int.
A schedule is the table’s rows for one premium period, sex and issue age, numbered from 1 in the order of those keys, as
cv_schedule()numbers them. The issue age and the policy years are read by their value, asWholeLife_US_S’s lookup matches them, so a year written9.0is year 9. An issue age that is not a whole number, text among them, is refused, naming every such age; then a schedule whose policy years are not whole numbers, text among them, leave a gap, repeat or start below 1 is refused, naming it. Once every schedule’s years are checked, a cash value that is not a number, zero or more, is refused, naming every schedule that holds one, whether or not a point carries it, and every such policy year in it: the cash value reaches the dividend’s floor and the surrender value.cv_array(), its extentscv_year_first()andcv_year_last(), andcv_schedule()are sized or numbered by this count, so each meets the refusal first, whichever a projection reads first.
- cv_schedule()[source]#
Each model point’s cash value schedule, its row of
cv_array(): int64 [point].The schedule of the point’s premium period, sex and issue age, the key
WholeLife_US_Slooks the cash value up by, matched by value. A point whose key has no schedule has 0, a schedule whose extent holds no policy year, so thatProjection.cv_pp_annivrefuses every year of it, naming the point, whereWholeLife_US_S’s lookup raisedKeyError.cv_schedules()has checked the table.
- cv_array()[source]#
The guaranteed cash value per $1,000 by schedule and policy year, from cv_table.csv: float64 [schedule, policy year].
Row
sis schedules(cv_schedule()) and columnypolicy yeary, soProjection.cv_pp_annivreads a point’s value at[cv_schedule(), y]. The width is the table’s last policy year plus one. Row 0, no schedule, and column 0, no policy year, hold NaN, and so do the years outside a schedule’scv_year_first()andcv_year_last(); no formula reads them.cv_schedules()refuses a schedule this array cannot hold.
- cv_year_first()[source]#
The first policy year of each cash value schedule: int64 [schedule].
1 for row 0, no schedule, whose last year is 0, so that no year lies between them. The years are read by value, from the schedules
cv_schedules()has checked.
- cv_year_last()[source]#
The last policy year of each cash value schedule: int64 [schedule], 0 for no schedule, read as
cv_year_first()reads the first.
- mort_schedules()[source]#
The number of guaranteed mortality schedules in mort_table.csv, one a sex, each checked: an int.
A schedule is the table’s rows for one sex, numbered from 1 in the order of the sexes, as
mort_schedule()numbers them. An age is read by its value, asWholeLife_US_S’s lookup matches it, so one written54.0is 54; one that is not a whole number, text among them, is refused, naming every such age. A schedule whose ages leave a gap, repeat or start below 0 is refused, naming its sex. Then everymort_ratemust be a number from 0 to 1, a probability, whether or not a point carries its sex:Projection.mort_ratecaps the best-estimate rate built on it, and the term-blend layer divides by the scale rate. The refusal names every sex and age at fault.mort_table_array(), its extents andmort_schedule()read this first.
- mort_schedule()[source]#
Each model point’s guaranteed mortality schedule, its row of
mort_table_array(): int64 [point].The schedule of the point’s sex, the key
WholeLife_US_Slooks the rate up by beside the age. A sex the table lacks is 0, a schedule whose extent holds no age, so thatProjection.mort_rate_guar_atrefuses every age of it, naming the point, whereWholeLife_US_S’s lookup raisedKeyError.
- mort_table_array()[source]#
Guaranteed mortality by schedule and attained age, from mort_table.csv: float64 [schedule, age].
Row
sis schedules(mort_schedule()), and each row is padded from age 0, so that the column index is the age, asbasiclife.BasicTerm_SCpads its table; the ages below a schedule’s first, 0 to 17 as shipped, row 0 and any age past a schedule’s last hold NaN, which no formula reads.Projection.mort_rate_guar_atrefuses an age outside the schedule’smort_age_first()andmort_age_last(), naming the point.
- mort_age_first()[source]#
The first attained age of each guaranteed mortality schedule: int64 [schedule].
1 for row 0, no schedule, whose last age is 0, so that no age lies between them. The ages are read by value, from the schedules
mort_schedules()has checked.
- mort_age_last()[source]#
The last attained age of each guaranteed mortality schedule: int64 [schedule], 0 for no schedule, read as
mort_age_first()reads the first.
- nsp_schedules()[source]#
The number of net single premium schedules in nsp_table.csv, one a sex, each checked: an int.
Numbered and checked as
mort_schedules()numbers and checks the mortality schedules, but for the value: everynspmust be a number above 0, whether or not a point carries its sex, since the paid-up additions are bought by dividing by it and their value reaches the dividend’s floor. A price per unit of face is no probability, and a negative interest rate would take it past 1, so no upper bound is set. The refusal names every sex and age at fault.nsp_array(), its extents andnsp_schedule()read this first.
- nsp_schedule()[source]#
Each model point’s net single premium schedule, its row of
nsp_array(): int64 [point].The schedule of the point’s sex, 0 for a sex the table lacks, which
Projection.nsprefuses at every age, naming the point, asmort_schedule().
- nsp_array()[source]#
The endowment-at-100 net single premium by schedule and attained age, from nsp_table.csv: float64 [schedule, age].
Padded from age 0 as
mort_table_array()is, NaN where no formula reads.Projection.nsprefuses an age outside the schedule’snsp_age_first()andnsp_age_last(), naming the point.
- nsp_age_first()[source]#
The first attained age of each net single premium schedule: int64 [schedule], 1 for no schedule, read as
mort_age_first()reads the mortality table’s.