FAILURE MAP
← Case archive

FA-63751 / Actuarial life tables / Open access

Net premium reserve recursion: Rounded reserves feed the next year · case 01

Later reserves drift from the exact recursion.

Verified by executionVariant 1 · 7 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The reported rounded reserve overwrites the exact carried value.

VERIFIED REPAIR

Carry the exact reserve and round only for reporting.

Unsuccessful approach: Truncating the carried reserve adds a larger drift.

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=((V+x['P'])*(1+i)-q*x['S'])/p
        V=Fraction(math.floor(V+Fraction(1,2)) if V>=0 else -math.floor(-V+Fraction(1,2))); out.append(int(V))
    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 fixtureActualExpectedOutcome
level premium reserve build-up[-17033, -48794, -100596, -172081, -270021, -397531][-17033, -48794, -100596, -172081, -270021, -397532]Failed
negative early reserves[-209623, -381602, -571482, -883148, -1254215, -1694287][-209623, -381602, -571482, -883148, -1254215, -1694287]Passed
terminal age[-491871, -1112674, -1898533, -2893773, None][-491871, -1112675, -1898534, -2893774, None]Failed
terminal after one year[-689543, None][-689543, None]Passed
high interest[-97431, -222138, -382135, -584290, -839341][-97431, -222138, -382135, -584290, -839341]Passed
odd premium[-146402, -332839, -562726, -848687, -1200146][-146402, -332839, -562726, -848687, -1200146]Passed
zero mortality year[12715, -10828, -172385][12715, -10827, -172385]Failed

SHA-256 / 7fc7acc140ed848aa601b6cde9a2e90b58e072b261f93100ccd285085cbea35c

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
        V=Fraction(int(V)); out.append(int(V))
    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 fixtureActualExpectedOutcome
level premium reserve build-up[-17033, -48793, -100594, -172079, -270019, -397529][-17033, -48794, -100596, -172081, -270021, -397532]Failed
negative early reserves[-209623, -381602, -571482, -883147, -1254214, -1694286][-209623, -381602, -571482, -883148, -1254215, -1694287]Failed
terminal age[-491871, -1112674, -1898532, -2893771, None][-491871, -1112675, -1898534, -2893774, None]Failed
terminal after one year[-689542, None][-689543, None]Failed
high interest[-97431, -222137, -382133, -584287, -839338][-97431, -222138, -382135, -584290, -839341]Failed
odd premium[-146402, -332838, -562724, -848684, -1200142][-146402, -332839, -562726, -848687, -1200146]Failed
zero mortality year[12715, -10827, -172384][12715, -10827, -172385]Failed

SHA-256 / f3bfde96a57e5e6c8264054ddf1e39dee7a479eecb6b796aca7edf0ba76b500b

3 / The verified repair

Exit 0
"""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(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 fixtureActualExpectedOutcome
level premium reserve build-up[-17033, -48794, -100596, -172081, -270021, -397532][-17033, -48794, -100596, -172081, -270021, -397532]Passed
negative early reserves[-209623, -381602, -571482, -883148, -1254215, -1694287][-209623, -381602, -571482, -883148, -1254215, -1694287]Passed
terminal age[-491871, -1112675, -1898534, -2893774, None][-491871, -1112675, -1898534, -2893774, None]Passed
terminal after one year[-689543, None][-689543, None]Passed
high interest[-97431, -222138, -382135, -584290, -839341][-97431, -222138, -382135, -584290, -839341]Passed
odd premium[-146402, -332839, -562726, -848687, -1200146][-146402, -332839, -562726, -848687, -1200146]Passed
zero mortality year[12715, -10827, -172385][12715, -10827, -172385]Passed

SHA-256 / 18e0414258b2a3af63a8679fd545638eebd65578071e3d54630b305f2976a273

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.501233+00:00.

Case digest / 26197af29be2d2efa952f173d1058d43420a9b1d8b996092ef57273a2802b0e3