FA-63761 / Actuarial life tables / Open access
Net premium reserve recursion: Negative reserves are floored at zero · case 01
Deficient-premium years show zero reserves and later reserves drift.
ROOT CAUSE
The recursion clamps V at zero.
THE FAILURE
The recursion clamps V at zero.
Unsuccessful approach: Flooring only the report hides the negative reserve.
Case contract
Input q (per 100000 by policy year), P (annual net premium, cents, paid at start of year), S (death benefit at year end), i (per mille). Starting from 0V=0: (k+1)V = ((kV+P)(1+i) - q S)/p carried exactly; each reserve is reported rounded half away from zero. If p=0 report None and stop.
Why this case matters
Life-table arithmetic compounds across ages, so one misplaced index or assumption shifts every downstream value.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(x):
V=Fraction(0); i=Fraction(x['i'],1000); out=[]
for q in x['q']:
q=Fraction(q,100000); p=1-q
if p==0: out.append(None); break
V=max(Fraction(0),((V+x['P'])*(1+i)-q*x['S'])/p)
out.append(math.floor(V+Fraction(1,2)) if V>=0 else -math.floor(-V+Fraction(1,2)))
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['level premium reserve build-up', {'q': [975, 1110, 1287, 1446, 1655, 1872], 'P': 76793, 'S': 10000000, 'i': 50}, [-17033, -48794, -100596, -172081, -270021, -397532]], ['negative early reserves', {'q': [2102, 1644, 1735, 2752, 3106, 3484], 'P': 4838, 'S': 10000000, 'i': 30}, [-209623, -381602, -571482, -883148, -1254215, -1694287]], ['terminal age', {'q': [5297, 5940, 6674, 7478, 100000], 'P': 60841, 'S': 10000000, 'i': 50}, [-491871, -1112675, -1898534, -2893774, None]], ['terminal after one year', {'q': [7910, 100000, 50000], 'P': 150000, 'S': 10000000, 'i': 40}, [-689543, None]], ['high interest', {'q': [1315, 1480, 1689, 1919, 2194], 'P': 32431, 'S': 10000000, 'i': 90}, [-97431, -222138, -382135, -584290, -839341]], ['odd premium', {'q': [2038, 2332, 2622, 2985, 3374], 'P': 58059, 'S': 10000001, 'i': 40}, [-146402, -332839, -562726, -848687, -1200146]], ['zero mortality year', {'q': [0, 366, 1710], 'P': 12345, 'S': 10000000, 'i': 30}, [12715, -10827, -172385]]], [['level premium reserve build-up', {'q': [744, 879, 1007, 1130, 1268, 1430], 'P': 89607, 'S': 10000000, 'i': 30}, [18029, 23169, 15617, -4672, -39822, -93052]], ['negative early reserves', {'q': [2093, 1729, 2954, 2713, 3083, 3497], 'P': 5237, 'S': 10000000, 'i': 40}, [-208211, -390749, -717529, -1040307, -1428823, -1896552]], ['terminal age', {'q': [2713, 3066, 3446, 3884, 100000], 'P': 86120, 'S': 10000000, 'i': 40}, [-186803, -424320, -721180, -1091246, None]], ['terminal after one year', {'q': [6406, 100000, 50000], 'P': 150000, 'S': 10000000, 'i': 40}, [-517768, None]], ['high interest', {'q': [1493, 1714, 1927, 2166, 2437], 'P': 43892, 'S': 10000000, 'i': 90}, [-102995, -239935, -414372, -634159, -909250]], ['odd premium', {'q': [1846, 2072, 2329, 2619, 2943], 'P': 59305, 'S': 10000001, 'i': 40}, [-125235, -281602, -475155, -713059, -1003744]], ['zero mortality year', {'q': [0, 393, 2596], 'P': 12345, 'S': 10000000, 'i': 30}, [12715, -13541, -267784]]], [['level premium reserve build-up', {'q': [1080, 1230, 1415, 1587, 1826, 2063], 'P': 69053, 'S': 10000000, 'i': 30}, [-37278, -91396, -166874, -263640, -390149, -548341]], ['negative early reserves', {'q': [2234, 1739, 1991, 1180, 1338, 1529], 'P': 3869, 'S': 10000000, 'i': 30}, [-224429, -408175, -628039, -769981, -935411, -1129661]], ['terminal age', {'q': [4877, 5479, 6148, 6925, 100000], 'P': 57524, 'S': 10000000, 'i': 40}, [-449812, -1011288, -1711967, -2592662, None]], ['terminal after one year', {'q': [6383, 100000, 50000], 'P': 150000, 'S': 10000000, 'i': 50}, [-513582, None]], ['high interest', {'q': [950, 1068, 1246, 1434, 1654], 'P': 43973, 'S': 10000000, 'i': 90}, [-47521, -111862, -201105, -319252, -473282]], ['odd premium', {'q': [1463, 1641, 1842, 2102, 2386], 'P': 35283, 'S': 10000001, 'i': 30}, [-111591, -246746, -409551, -608487, -849263]], ['zero mortality year', {'q': [0, 709, 1372], 'P': 12345, 'S': 10000000, 'i': 50}, [12962, -44644, -173494]]], [['level premium reserve build-up', {'q': [828, 943, 1093, 1268, 1442, 1649], 'P': 48203, 'S': 10000000, 'i': 40}, [-32942, -79175, -143074, -228362, -336416, -472432]], ['negative early reserves', {'q': [2171, 2815, 1676, 2525, 2850, 3242], 'P': 4814, 'S': 10000000, 'i': 50}, [-216751, -518633, -719163, -1028538, -1399804, -1848880]], ['terminal age', {'q': [5153, 5772, 6486, 7287, 100000], 'P': 55714, 'S': 10000000, 'i': 50}, [-481618, -1087150, -1851709, -2819987, None]], ['terminal after one year', {'q': [8017, 100000, 50000], 'P': 150000, 'S': 10000000, 'i': 40}, [-701978, None]], ['high interest', {'q': [2062, 2333, 2619, 2954, 3351], 'P': 54331, 'S': 10000000, 'i': 90}, [-150074, -345725, -595106, -911778, -1313741]], ['odd premium', {'q': [829, 978, 1104, 1247, 1430], 'P': 32765, 'S': 10000001, 'i': 50}, [-48902, -115877, -199875, -303955, -433955]], ['zero mortality year', {'q': [0, 457, 2109], 'P': 12345, 'S': 10000000, 'i': 40}, [12839, -19598, -223150]]], [['level premium reserve build-up', {'q': [1056, 1225, 1381, 1569, 1791, 2046], 'P': 41129, 'S': 10000000, 'i': 30}, [-63912, -147777, -251419, -379453, -537195, -730493]], ['negative early reserves', {'q': [2984, 2967, 1872, 1261, 1429, 1601], 'P': 5163, 'S': 10000000, 'i': 50}, [-301990, -626971, -856125, -1032631, -1239454, -1479797]], ['terminal age', {'q': [2899, 3279, 3718, 4187, 100000], 'P': 83535, 'S': 10000000, 'i': 50}, [-208225, -474379, -812391, -1235739, None]], ['terminal after one year', {'q': [5620, 100000, 50000], 'P': 150000, 'S': 10000000, 'i': 50}, [-428587, None]], ['high interest', {'q': [1989, 2255, 2548, 2862, 3235], 'P': 34236, 'S': 10000000, 'i': 90}, [-164862, -376369, -644138, -979012, -1398549]], ['odd premium', {'q': [1087, 1231, 1389, 1601, 1828], 'P': 31067, 'S': 10000001, 'i': 30}, [-77544, -173102, -289213, -432922, -607821]], ['zero mortality year', {'q': [0, 757, 1366], 'P': 12345, 'S': 10000000, 'i': 40}, [12839, -49886, -178076]]]]
for label, args, expected in fixtures[N-1]:
check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| level premium reserve build-up | [0, 0, 0, 0, 0, 0] | [-17033, -48794, -100596, -172081, -270021, -397532] | Failed |
| negative early reserves | [0, 0, 0, 0, 0, 0] | [-209623, -381602, -571482, -883148, -1254215, -1694287] | Failed |
| terminal age | [0, 0, 0, 0, None] | [-491871, -1112675, -1898534, -2893774, None] | Failed |
| terminal after one year | [0, None] | [-689543, None] | Failed |
| high interest | [0, 0, 0, 0, 0] | [-97431, -222138, -382135, -584290, -839341] | Failed |
| odd premium | [0, 0, 0, 0, 0] | [-146402, -332839, -562726, -848687, -1200146] | Failed |
| zero mortality year | [12715, 0, 0] | [12715, -10827, -172385] | Failed |
SHA-256 / 2497ca1c7375ca6ffccc4e9ccd7c6fca7ab2a666754dc1d1e09aa096ed85f6b8
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(x):
V=Fraction(0); i=Fraction(x['i'],1000); out=[]
for q in x['q']:
q=Fraction(q,100000); p=1-q
if p==0: out.append(None); break
V=((V+x['P'])*(1+i)-q*x['S'])/p
out.append(max(0,math.floor(V+Fraction(1,2))))
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['level premium reserve build-up', {'q': [975, 1110, 1287, 1446, 1655, 1872], 'P': 76793, 'S': 10000000, 'i': 50}, [-17033, -48794, -100596, -172081, -270021, -397532]], ['negative early reserves', {'q': [2102, 1644, 1735, 2752, 3106, 3484], 'P': 4838, 'S': 10000000, 'i': 30}, [-209623, -381602, -571482, -883148, -1254215, -1694287]], ['terminal age', {'q': [5297, 5940, 6674, 7478, 100000], 'P': 60841, 'S': 10000000, 'i': 50}, [-491871, -1112675, -1898534, -2893774, None]], ['terminal after one year', {'q': [7910, 100000, 50000], 'P': 150000, 'S': 10000000, 'i': 40}, [-689543, None]], ['high interest', {'q': [1315, 1480, 1689, 1919, 2194], 'P': 32431, 'S': 10000000, 'i': 90}, [-97431, -222138, -382135, -584290, -839341]], ['odd premium', {'q': [2038, 2332, 2622, 2985, 3374], 'P': 58059, 'S': 10000001, 'i': 40}, [-146402, -332839, -562726, -848687, -1200146]], ['zero mortality year', {'q': [0, 366, 1710], 'P': 12345, 'S': 10000000, 'i': 30}, [12715, -10827, -172385]]], [['level premium reserve build-up', {'q': [744, 879, 1007, 1130, 1268, 1430], 'P': 89607, 'S': 10000000, 'i': 30}, [18029, 23169, 15617, -4672, -39822, -93052]], ['negative early reserves', {'q': [2093, 1729, 2954, 2713, 3083, 3497], 'P': 5237, 'S': 10000000, 'i': 40}, [-208211, -390749, -717529, -1040307, -1428823, -1896552]], ['terminal age', {'q': [2713, 3066, 3446, 3884, 100000], 'P': 86120, 'S': 10000000, 'i': 40}, [-186803, -424320, -721180, -1091246, None]], ['terminal after one year', {'q': [6406, 100000, 50000], 'P': 150000, 'S': 10000000, 'i': 40}, [-517768, None]], ['high interest', {'q': [1493, 1714, 1927, 2166, 2437], 'P': 43892, 'S': 10000000, 'i': 90}, [-102995, -239935, -414372, -634159, -909250]], ['odd premium', {'q': [1846, 2072, 2329, 2619, 2943], 'P': 59305, 'S': 10000001, 'i': 40}, [-125235, -281602, -475155, -713059, -1003744]], ['zero mortality year', {'q': [0, 393, 2596], 'P': 12345, 'S': 10000000, 'i': 30}, [12715, -13541, -267784]]], [['level premium reserve build-up', {'q': [1080, 1230, 1415, 1587, 1826, 2063], 'P': 69053, 'S': 10000000, 'i': 30}, [-37278, -91396, -166874, -263640, -390149, -548341]], ['negative early reserves', {'q': [2234, 1739, 1991, 1180, 1338, 1529], 'P': 3869, 'S': 10000000, 'i': 30}, [-224429, -408175, -628039, -769981, -935411, -1129661]], ['terminal age', {'q': [4877, 5479, 6148, 6925, 100000], 'P': 57524, 'S': 10000000, 'i': 40}, [-449812, -1011288, -1711967, -2592662, None]], ['terminal after one year', {'q': [6383, 100000, 50000], 'P': 150000, 'S': 10000000, 'i': 50}, [-513582, None]], ['high interest', {'q': [950, 1068, 1246, 1434, 1654], 'P': 43973, 'S': 10000000, 'i': 90}, [-47521, -111862, -201105, -319252, -473282]], ['odd premium', {'q': [1463, 1641, 1842, 2102, 2386], 'P': 35283, 'S': 10000001, 'i': 30}, [-111591, -246746, -409551, -608487, -849263]], ['zero mortality year', {'q': [0, 709, 1372], 'P': 12345, 'S': 10000000, 'i': 50}, [12962, -44644, -173494]]], [['level premium reserve build-up', {'q': [828, 943, 1093, 1268, 1442, 1649], 'P': 48203, 'S': 10000000, 'i': 40}, [-32942, -79175, -143074, -228362, -336416, -472432]], ['negative early reserves', {'q': [2171, 2815, 1676, 2525, 2850, 3242], 'P': 4814, 'S': 10000000, 'i': 50}, [-216751, -518633, -719163, -1028538, -1399804, -1848880]], ['terminal age', {'q': [5153, 5772, 6486, 7287, 100000], 'P': 55714, 'S': 10000000, 'i': 50}, [-481618, -1087150, -1851709, -2819987, None]], ['terminal after one year', {'q': [8017, 100000, 50000], 'P': 150000, 'S': 10000000, 'i': 40}, [-701978, None]], ['high interest', {'q': [2062, 2333, 2619, 2954, 3351], 'P': 54331, 'S': 10000000, 'i': 90}, [-150074, -345725, -595106, -911778, -1313741]], ['odd premium', {'q': [829, 978, 1104, 1247, 1430], 'P': 32765, 'S': 10000001, 'i': 50}, [-48902, -115877, -199875, -303955, -433955]], ['zero mortality year', {'q': [0, 457, 2109], 'P': 12345, 'S': 10000000, 'i': 40}, [12839, -19598, -223150]]], [['level premium reserve build-up', {'q': [1056, 1225, 1381, 1569, 1791, 2046], 'P': 41129, 'S': 10000000, 'i': 30}, [-63912, -147777, -251419, -379453, -537195, -730493]], ['negative early reserves', {'q': [2984, 2967, 1872, 1261, 1429, 1601], 'P': 5163, 'S': 10000000, 'i': 50}, [-301990, -626971, -856125, -1032631, -1239454, -1479797]], ['terminal age', {'q': [2899, 3279, 3718, 4187, 100000], 'P': 83535, 'S': 10000000, 'i': 50}, [-208225, -474379, -812391, -1235739, None]], ['terminal after one year', {'q': [5620, 100000, 50000], 'P': 150000, 'S': 10000000, 'i': 50}, [-428587, None]], ['high interest', {'q': [1989, 2255, 2548, 2862, 3235], 'P': 34236, 'S': 10000000, 'i': 90}, [-164862, -376369, -644138, -979012, -1398549]], ['odd premium', {'q': [1087, 1231, 1389, 1601, 1828], 'P': 31067, 'S': 10000001, 'i': 30}, [-77544, -173102, -289213, -432922, -607821]], ['zero mortality year', {'q': [0, 757, 1366], 'P': 12345, 'S': 10000000, 'i': 40}, [12839, -49886, -178076]]]]
for label, args, expected in fixtures[N-1]:
check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| level premium reserve build-up | [0, 0, 0, 0, 0, 0] | [-17033, -48794, -100596, -172081, -270021, -397532] | Failed |
| negative early reserves | [0, 0, 0, 0, 0, 0] | [-209623, -381602, -571482, -883148, -1254215, -1694287] | Failed |
| terminal age | [0, 0, 0, 0, None] | [-491871, -1112675, -1898534, -2893774, None] | Failed |
| terminal after one year | [0, None] | [-689543, None] | Failed |
| high interest | [0, 0, 0, 0, 0] | [-97431, -222138, -382135, -584290, -839341] | Failed |
| odd premium | [0, 0, 0, 0, 0] | [-146402, -332839, -562726, -848687, -1200146] | Failed |
| zero mortality year | [12715, 0, 0] | [12715, -10827, -172385] | Failed |
SHA-256 / c294e3dcafac02876bd4eecdee947b7b6d9a4a24fc39550798611b9301409983
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
A deterministic bounded teaching model of a stipulated toy actuarial contract. Rates are small synthetic tables, exact rationals are used where practical and floats are rounded at the output; it makes no claim of conformance with any published table, standard of practice or regulation. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:47:17.599665+00:00.
Case digest / 70fcc12cf095e0e2bfaf09dd336a1c984e5f76a4e587f9f402ae65ab62c36396