FAILURE MAP
← Case archive

FA-63786 / Actuarial life tables / Open access

Pure endowment and survivorship accumulation: Escalation starts with the first premium · case 01

Every premium is one escalation step too high.

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

ROOT CAUSE

The first premium is already escalated.

THE FAILURE

The first premium is already escalated.

Unsuccessful approach: Escalating by n-k reverses the schedule.

Case contract

Input l (from issue age), n (0<=n<len(l) else 'invalid term'), i, g (premium escalation per mille), P. l_n=0 -> 'no survivors'. nEx = (l_n/l_0) v^n. Fund per survivor at n = sum_{k<n} P(1+g)^k (1+i)^(n-k) l_k/l_n (premiums at the start of each year). Return [nEx rounded 8, fund rounded half-up].

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):
    l=x['l']; n=x['n']; i=Fraction(x['i'],1000); g=Fraction(x['g'],1000)
    if n<0 or n>=len(l): return 'invalid term'
    if l[n]==0: return 'no survivors'
    E=Fraction(l[n],l[0])/(1+i)**n
    fund=sum(x['P']*(1+g)**(k+1)*(1+i)**(n-k)*Fraction(l[k],l[n]) for k in range(n))
    return [round(float(E),8), math.floor(fund+Fraction(1,2))]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['five-year accumulation', {'l': [100000, 99627, 99178, 98677, 98090, 97396, 96614, 95732, 94714, 93602], 'n': 5, 'i': 50, 'g': 30, 'P': 310187}, [0.76312315, 1939423]], ['escalating premiums', {'l': [100000, 99499, 98915, 98211, 97439, 96539, 95498, 94341, 93034, 91551], 'n': 3, 'i': 50, 'g': 30, 'P': 473064}, [0.84838354, 1632596]], ['one year', {'l': [100000, 99657, 99256, 98789, 98220, 97539, 96746, 95842, 94806, 93669], 'n': 1, 'i': 30, 'g': 0, 'P': 301346}, [0.96754369, 311455]], ['zero term', {'l': [100000, 99466, 98873, 98210, 97456, 96581, 95573, 94407, 93118, 91686], 'n': 0, 'i': 30, 'g': 30, 'P': 127967}, [1.0, 0]], ['term at table end', {'l': [100000, 99613, 99130, 98560, 97908, 97160, 96325, 95362, 94292, 93106], 'n': 9, 'i': 30, 'g': 0, 'P': 207738}, [0.71357996, 2281783]], ['term beyond table', {'l': [100000, 99389, 98714, 97931, 97058, 96063, 94925, 93637, 92169, 90541], 'n': 10, 'i': 30, 'g': 30, 'P': 278992}, 'invalid term'], ['no survivors', {'l': [100000, 99503, 98938, 98299, 97575, 96770, 95863, 94838, 93668, 0], 'n': 9, 'i': 40, 'g': 30, 'P': 463178}, 'no survivors'], ['level premium long', {'l': [100000, 99472, 98900, 98250, 97518, 96711, 95773, 94708, 93506, 92143], 'n': 8, 'i': 40, 'g': 0, 'P': 332485}, [0.68323918, 3333117]]], [['five-year accumulation', {'l': [100000, 99419, 98767, 98017, 97178, 96239, 95176, 93966, 92603, 91035], 'n': 5, 'i': 30, 'g': 20, 'P': 316047}, [0.83016607, 1842455]], ['escalating premiums', {'l': [100000, 99441, 98818, 98096, 97273, 96348, 95303, 94119, 92753, 91250], 'n': 4, 'i': 40, 'g': 30, 'P': 376996}, [0.83149368, 1771442]], ['one year', {'l': [100000, 99759, 99457, 99107, 98716, 98252, 97716, 97101, 96373, 95529], 'n': 1, 'i': 30, 'g': 20, 'P': 427465}, [0.96853398, 441353]], ['zero term', {'l': [100000, 99700, 99353, 98925, 98389, 97791, 97104, 96341, 95445, 94434], 'n': 0, 'i': 30, 'g': 0, 'P': 409365}, [1.0, 0]], ['term at table end', {'l': [100000, 99579, 99072, 98516, 97875, 97124, 96284, 95355, 94273, 93076], 'n': 9, 'i': 50, 'g': 0, 'P': 263911}, [0.59997619, 3210361]], ['term beyond table', {'l': [100000, 99753, 99467, 99106, 98692, 98229, 97669, 97055, 96304, 95459], 'n': 10, 'i': 50, 'g': 20, 'P': 475728}, 'invalid term'], ['no survivors', {'l': [100000, 99778, 99462, 99065, 98590, 98022, 97414, 96703, 95907, 0], 'n': 9, 'i': 40, 'g': 0, 'P': 291350}, 'no survivors'], ['level premium long', {'l': [100000, 99664, 99270, 98810, 98263, 97627, 96880, 96004, 95006, 93923], 'n': 8, 'i': 40, 'g': 0, 'P': 156070}, [0.69419954, 1549487]]], [['five-year accumulation', {'l': [100000, 99694, 99343, 98956, 98501, 97990, 97392, 96742, 96001, 95150], 'n': 5, 'i': 50, 'g': 30, 'P': 467213}, [0.76777729, 2908794]], ['escalating premiums', {'l': [100000, 99387, 98687, 97882, 96957, 95923, 94763, 93492, 92018, 90349], 'n': 7, 'i': 40, 'g': 30, 'P': 184993}, [0.71046236, 1730047]], ['one year', {'l': [100000, 99719, 99390, 99016, 98572, 98064, 97435, 96732, 95889, 94934], 'n': 1, 'i': 50, 'g': 30, 'P': 425453}, [0.94970476, 447984]], ['zero term', {'l': [100000, 99474, 98873, 98230, 97498, 96657, 95717, 94639, 93396, 92034], 'n': 0, 'i': 40, 'g': 0, 'P': 178875}, [1.0, 0]], ['term at table end', {'l': [100000, 99481, 98896, 98219, 97413, 96468, 95420, 94270, 92939, 91465], 'n': 9, 'i': 50, 'g': 20, 'P': 382728}, [0.58959155, 5070118]], ['term beyond table', {'l': [100000, 99742, 99462, 99122, 98711, 98181, 97548, 96831, 96003, 95049], 'n': 10, 'i': 30, 'g': 20, 'P': 216948}, 'invalid term'], ['no survivors', {'l': [100000, 99486, 98893, 98221, 97466, 96612, 95647, 94525, 93256, 0], 'n': 9, 'i': 30, 'g': 30, 'P': 443695}, 'no survivors'], ['level premium long', {'l': [100000, 99463, 98869, 98187, 97370, 96463, 95422, 94269, 92993, 91535], 'n': 8, 'i': 30, 'g': 0, 'P': 279303}, [0.73409533, 2685755]]], [['five-year accumulation', {'l': [100000, 99647, 99240, 98757, 98173, 97493, 96686, 95788, 94759, 93588], 'n': 5, 'i': 30, 'g': 20, 'P': 431512}, [0.84098318, 2495359]], ['escalating premiums', {'l': [100000, 99683, 99274, 98795, 98242, 97639, 96940, 96155, 95257, 94209], 'n': 3, 'i': 30, 'g': 30, 'P': 490177}, [0.9041142, 1620833]], ['one year', {'l': [100000, 99746, 99410, 99036, 98581, 98074, 97498, 96854, 96107, 95270], 'n': 1, 'i': 40, 'g': 30, 'P': 187911}, [0.95909615, 195925]], ['zero term', {'l': [100000, 99732, 99391, 99018, 98550, 98024, 97402, 96653, 95801, 94842], 'n': 0, 'i': 40, 'g': 20, 'P': 383986}, [1.0, 0]], ['term at table end', {'l': [100000, 99532, 99019, 98411, 97699, 96870, 95914, 94809, 93568, 92171], 'n': 9, 'i': 40, 'g': 30, 'P': 374272}, [0.64758122, 4874021]], ['term beyond table', {'l': [100000, 99395, 98677, 97899, 96989, 95965, 94826, 93546, 92113, 90505], 'n': 10, 'i': 40, 'g': 20, 'P': 391759}, 'invalid term'], ['no survivors', {'l': [100000, 99436, 98759, 97991, 97084, 96058, 94874, 93546, 92075, 0], 'n': 9, 'i': 40, 'g': 0, 'P': 258512}, 'no survivors'], ['level premium long', {'l': [100000, 99575, 99078, 98515, 97855, 97101, 96216, 95203, 94075, 92820], 'n': 8, 'i': 40, 'g': 0, 'P': 274632}, [0.68739681, 2743824]]], [['five-year accumulation', {'l': [100000, 99618, 99173, 98667, 98087, 97408, 96641, 95782, 94815, 93766], 'n': 5, 'i': 30, 'g': 20, 'P': 427312}, [0.84024996, 2471882]], ['escalating premiums', {'l': [100000, 99483, 98900, 98235, 97459, 96563, 95554, 94423, 93132, 91708], 'n': 8, 'i': 40, 'g': 30, 'P': 364091}, [0.6805064, 4040305]], ['one year', {'l': [100000, 99741, 99435, 99053, 98614, 98098, 97514, 96814, 96053, 95155], 'n': 1, 'i': 30, 'g': 30, 'P': 382445}, [0.96835922, 394941]], ['zero term', {'l': [100000, 99625, 99217, 98716, 98122, 97448, 96665, 95754, 94700, 93479], 'n': 0, 'i': 40, 'g': 20, 'P': 150292}, [1.0, 0]], ['term at table end', {'l': [100000, 99624, 99187, 98665, 98044, 97353, 96572, 95690, 94680, 93547], 'n': 9, 'i': 40, 'g': 30, 'P': 414508}, [0.65724881, 5342367]], ['term beyond table', {'l': [100000, 99720, 99377, 98960, 98499, 97952, 97305, 96596, 95793, 94879], 'n': 10, 'i': 40, 'g': 30, 'P': 308034}, 'invalid term'], ['no survivors', {'l': [100000, 99649, 99279, 98844, 98335, 97740, 97075, 96329, 95486, 0], 'n': 9, 'i': 50, 'g': 30, 'P': 170315}, 'no survivors'], ['level premium long', {'l': [100000, 99549, 99017, 98394, 97709, 96899, 95973, 94973, 93856, 92607], 'n': 8, 'i': 40, 'g': 0, 'P': 100799}, [0.6857966, 1008179]]]]
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
five-year accumulation[0.76312315, 1997605][0.76312315, 1939423]Failed
escalating premiums[0.84838354, 1681574][0.84838354, 1632596]Failed
one year[0.96754369, 311455][0.96754369, 311455]Passed
zero term[1.0, 0][1.0, 0]Passed
term at table end[0.71357996, 2281783][0.71357996, 2281783]Passed
term beyond tableinvalid terminvalid termPassed
no survivorsno survivorsno survivorsPassed
level premium long[0.68323918, 3333117][0.68323918, 3333117]Passed

SHA-256 / 9371ed5788bc1ab0a0f782d9a461494fced35fc90a3a357a841b68fcebb4d1bd

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):
    l=x['l']; n=x['n']; i=Fraction(x['i'],1000); g=Fraction(x['g'],1000)
    if n<0 or n>=len(l): return 'invalid term'
    if l[n]==0: return 'no survivors'
    E=Fraction(l[n],l[0])/(1+i)**n
    fund=sum(x['P']*(1+g)**(n-k)*(1+i)**(n-k)*Fraction(l[k],l[n]) for k in range(n))
    return [round(float(E),8), math.floor(fund+Fraction(1,2))]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['five-year accumulation', {'l': [100000, 99627, 99178, 98677, 98090, 97396, 96614, 95732, 94714, 93602], 'n': 5, 'i': 50, 'g': 30, 'P': 310187}, [0.76312315, 1939423]], ['escalating premiums', {'l': [100000, 99499, 98915, 98211, 97439, 96539, 95498, 94341, 93034, 91551], 'n': 3, 'i': 50, 'g': 30, 'P': 473064}, [0.84838354, 1632596]], ['one year', {'l': [100000, 99657, 99256, 98789, 98220, 97539, 96746, 95842, 94806, 93669], 'n': 1, 'i': 30, 'g': 0, 'P': 301346}, [0.96754369, 311455]], ['zero term', {'l': [100000, 99466, 98873, 98210, 97456, 96581, 95573, 94407, 93118, 91686], 'n': 0, 'i': 30, 'g': 30, 'P': 127967}, [1.0, 0]], ['term at table end', {'l': [100000, 99613, 99130, 98560, 97908, 97160, 96325, 95362, 94292, 93106], 'n': 9, 'i': 30, 'g': 0, 'P': 207738}, [0.71357996, 2281783]], ['term beyond table', {'l': [100000, 99389, 98714, 97931, 97058, 96063, 94925, 93637, 92169, 90541], 'n': 10, 'i': 30, 'g': 30, 'P': 278992}, 'invalid term'], ['no survivors', {'l': [100000, 99503, 98938, 98299, 97575, 96770, 95863, 94838, 93668, 0], 'n': 9, 'i': 40, 'g': 30, 'P': 463178}, 'no survivors'], ['level premium long', {'l': [100000, 99472, 98900, 98250, 97518, 96711, 95773, 94708, 93506, 92143], 'n': 8, 'i': 40, 'g': 0, 'P': 332485}, [0.68323918, 3333117]]], [['five-year accumulation', {'l': [100000, 99419, 98767, 98017, 97178, 96239, 95176, 93966, 92603, 91035], 'n': 5, 'i': 30, 'g': 20, 'P': 316047}, [0.83016607, 1842455]], ['escalating premiums', {'l': [100000, 99441, 98818, 98096, 97273, 96348, 95303, 94119, 92753, 91250], 'n': 4, 'i': 40, 'g': 30, 'P': 376996}, [0.83149368, 1771442]], ['one year', {'l': [100000, 99759, 99457, 99107, 98716, 98252, 97716, 97101, 96373, 95529], 'n': 1, 'i': 30, 'g': 20, 'P': 427465}, [0.96853398, 441353]], ['zero term', {'l': [100000, 99700, 99353, 98925, 98389, 97791, 97104, 96341, 95445, 94434], 'n': 0, 'i': 30, 'g': 0, 'P': 409365}, [1.0, 0]], ['term at table end', {'l': [100000, 99579, 99072, 98516, 97875, 97124, 96284, 95355, 94273, 93076], 'n': 9, 'i': 50, 'g': 0, 'P': 263911}, [0.59997619, 3210361]], ['term beyond table', {'l': [100000, 99753, 99467, 99106, 98692, 98229, 97669, 97055, 96304, 95459], 'n': 10, 'i': 50, 'g': 20, 'P': 475728}, 'invalid term'], ['no survivors', {'l': [100000, 99778, 99462, 99065, 98590, 98022, 97414, 96703, 95907, 0], 'n': 9, 'i': 40, 'g': 0, 'P': 291350}, 'no survivors'], ['level premium long', {'l': [100000, 99664, 99270, 98810, 98263, 97627, 96880, 96004, 95006, 93923], 'n': 8, 'i': 40, 'g': 0, 'P': 156070}, [0.69419954, 1549487]]], [['five-year accumulation', {'l': [100000, 99694, 99343, 98956, 98501, 97990, 97392, 96742, 96001, 95150], 'n': 5, 'i': 50, 'g': 30, 'P': 467213}, [0.76777729, 2908794]], ['escalating premiums', {'l': [100000, 99387, 98687, 97882, 96957, 95923, 94763, 93492, 92018, 90349], 'n': 7, 'i': 40, 'g': 30, 'P': 184993}, [0.71046236, 1730047]], ['one year', {'l': [100000, 99719, 99390, 99016, 98572, 98064, 97435, 96732, 95889, 94934], 'n': 1, 'i': 50, 'g': 30, 'P': 425453}, [0.94970476, 447984]], ['zero term', {'l': [100000, 99474, 98873, 98230, 97498, 96657, 95717, 94639, 93396, 92034], 'n': 0, 'i': 40, 'g': 0, 'P': 178875}, [1.0, 0]], ['term at table end', {'l': [100000, 99481, 98896, 98219, 97413, 96468, 95420, 94270, 92939, 91465], 'n': 9, 'i': 50, 'g': 20, 'P': 382728}, [0.58959155, 5070118]], ['term beyond table', {'l': [100000, 99742, 99462, 99122, 98711, 98181, 97548, 96831, 96003, 95049], 'n': 10, 'i': 30, 'g': 20, 'P': 216948}, 'invalid term'], ['no survivors', {'l': [100000, 99486, 98893, 98221, 97466, 96612, 95647, 94525, 93256, 0], 'n': 9, 'i': 30, 'g': 30, 'P': 443695}, 'no survivors'], ['level premium long', {'l': [100000, 99463, 98869, 98187, 97370, 96463, 95422, 94269, 92993, 91535], 'n': 8, 'i': 30, 'g': 0, 'P': 279303}, [0.73409533, 2685755]]], [['five-year accumulation', {'l': [100000, 99647, 99240, 98757, 98173, 97493, 96686, 95788, 94759, 93588], 'n': 5, 'i': 30, 'g': 20, 'P': 431512}, [0.84098318, 2495359]], ['escalating premiums', {'l': [100000, 99683, 99274, 98795, 98242, 97639, 96940, 96155, 95257, 94209], 'n': 3, 'i': 30, 'g': 30, 'P': 490177}, [0.9041142, 1620833]], ['one year', {'l': [100000, 99746, 99410, 99036, 98581, 98074, 97498, 96854, 96107, 95270], 'n': 1, 'i': 40, 'g': 30, 'P': 187911}, [0.95909615, 195925]], ['zero term', {'l': [100000, 99732, 99391, 99018, 98550, 98024, 97402, 96653, 95801, 94842], 'n': 0, 'i': 40, 'g': 20, 'P': 383986}, [1.0, 0]], ['term at table end', {'l': [100000, 99532, 99019, 98411, 97699, 96870, 95914, 94809, 93568, 92171], 'n': 9, 'i': 40, 'g': 30, 'P': 374272}, [0.64758122, 4874021]], ['term beyond table', {'l': [100000, 99395, 98677, 97899, 96989, 95965, 94826, 93546, 92113, 90505], 'n': 10, 'i': 40, 'g': 20, 'P': 391759}, 'invalid term'], ['no survivors', {'l': [100000, 99436, 98759, 97991, 97084, 96058, 94874, 93546, 92075, 0], 'n': 9, 'i': 40, 'g': 0, 'P': 258512}, 'no survivors'], ['level premium long', {'l': [100000, 99575, 99078, 98515, 97855, 97101, 96216, 95203, 94075, 92820], 'n': 8, 'i': 40, 'g': 0, 'P': 274632}, [0.68739681, 2743824]]], [['five-year accumulation', {'l': [100000, 99618, 99173, 98667, 98087, 97408, 96641, 95782, 94815, 93766], 'n': 5, 'i': 30, 'g': 20, 'P': 427312}, [0.84024996, 2471882]], ['escalating premiums', {'l': [100000, 99483, 98900, 98235, 97459, 96563, 95554, 94423, 93132, 91708], 'n': 8, 'i': 40, 'g': 30, 'P': 364091}, [0.6805064, 4040305]], ['one year', {'l': [100000, 99741, 99435, 99053, 98614, 98098, 97514, 96814, 96053, 95155], 'n': 1, 'i': 30, 'g': 30, 'P': 382445}, [0.96835922, 394941]], ['zero term', {'l': [100000, 99625, 99217, 98716, 98122, 97448, 96665, 95754, 94700, 93479], 'n': 0, 'i': 40, 'g': 20, 'P': 150292}, [1.0, 0]], ['term at table end', {'l': [100000, 99624, 99187, 98665, 98044, 97353, 96572, 95690, 94680, 93547], 'n': 9, 'i': 40, 'g': 30, 'P': 414508}, [0.65724881, 5342367]], ['term beyond table', {'l': [100000, 99720, 99377, 98960, 98499, 97952, 97305, 96596, 95793, 94879], 'n': 10, 'i': 40, 'g': 30, 'P': 308034}, 'invalid term'], ['no survivors', {'l': [100000, 99649, 99279, 98844, 98335, 97740, 97075, 96329, 95486, 0], 'n': 9, 'i': 50, 'g': 30, 'P': 170315}, 'no survivors'], ['level premium long', {'l': [100000, 99549, 99017, 98394, 97709, 96899, 95973, 94973, 93856, 92607], 'n': 8, 'i': 40, 'g': 0, 'P': 100799}, [0.6857966, 1008179]]]]
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
five-year accumulation[0.76312315, 2010280][0.76312315, 1939423]Failed
escalating premiums[0.84838354, 1685170][0.84838354, 1632596]Failed
one year[0.96754369, 311455][0.96754369, 311455]Passed
zero term[1.0, 0][1.0, 0]Passed
term at table end[0.71357996, 2281783][0.71357996, 2281783]Passed
term beyond tableinvalid terminvalid termPassed
no survivorsno survivorsno survivorsPassed
level premium long[0.68323918, 3333117][0.68323918, 3333117]Passed

SHA-256 / ea1d195ae3a1246a2ea4a0e998865015722dac9b05917a60a1fcb3b5132b1d01

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 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.793837+00:00.

Case digest / dbc3aa2f2fa2cf1de7bc108b435cec88bc9776f58f94b8cfbc6232cd0ff8ed25