FAILURE MAP
← Case archive

FA-63026 / Insurance premium rating / Open access

Parallelogram on-level factor: Rate levels are added instead of compounded · case 01

Sequences of rate changes produce the wrong current level.

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

ROOT CAUSE

Successive changes are summed rather than multiplied.

THE FAILURE

Successive changes are summed rather than multiplied.

Unsuccessful approach: Resetting the level to the last change forgets earlier changes.

Case contract

Input changes [[month offset from calendar-year start, change per mille]] in order. Annual policies written uniformly; the share of calendar-year earned exposure written after offset d=m/12 is (1-d)^2/2 for 0<=d<1, 1-(1+d)^2/2 for -1<d<0, 0 for d>=1 and 1 for d<=-1. Levels are cumulative products. OLF = current level / earned-weighted average level, returned *1000 rounded half-up.

Why this case matters

On-level factors restate historical earned premium at current rates before comparing to losses.

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):
    def after(m):
        d=Fraction(m,12)
        if d>=1: return Fraction(0)
        if d<=-1: return Fraction(1)
        if d>=0: return (1-d)**2/2
        return 1-(1+d)**2/2
    level=Fraction(1); levels=[level]
    for m,c in x['changes']:
        level+=Fraction(c,1000); levels.append(level)
    avg=Fraction(0)
    prev=Fraction(1)
    for i,(m,c) in enumerate(x['changes']):
        a=after(m)
        avg+=levels[i]*(prev-a)
        prev=a
    avg+=levels[-1]*prev
    return math.floor(levels[-1]/avg*1000+Fraction(1,2))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['single mid-year change', {'changes': [[3, 100]]}, 1070], ['change in prior year', {'changes': [[-7, 45]]}, 1004], ['two changes straddling', {'changes': [[-8, 45], [2, -50]]}, 969], ['three changes', {'changes': [[-9, 30], [3, 100], [8, -50]]}, 1020], ['change at year start', {'changes': [[0, 45]]}, 1022], ['change long before period', {'changes': [[-14, -50], [3, 100]]}, 1070], ['no changes', {'changes': []}, 1000], ['rate decrease', {'changes': [[10, -80]]}, 921]], [['single mid-year change', {'changes': [[5, 60]]}, 1049], ['change in prior year', {'changes': [[-8, 30]]}, 1002], ['two changes straddling', {'changes': [[-6, 80], [6, 60]]}, 1062], ['three changes', {'changes': [[-6, 30], [4, 30], [7, 100]]}, 1120], ['change at year start', {'changes': [[0, 80]]}, 1038], ['change long before period', {'changes': [[-14, 100], [4, -50]]}, 961], ['no changes', {'changes': []}, 1000], ['rate decrease', {'changes': [[6, -80]]}, 929]], [['single mid-year change', {'changes': [[8, 60]]}, 1056], ['change in prior year', {'changes': [[-3, -50]]}, 985], ['two changes straddling', {'changes': [[-7, 100], [2, 100]]}, 1071], ['three changes', {'changes': [[-11, -50], [0, -50], [10, 100]]}, 1070], ['change at year start', {'changes': [[0, 100]]}, 1048], ['change long before period', {'changes': [[-14, -50], [4, 30]]}, 1023], ['no changes', {'changes': []}, 1000], ['rate decrease', {'changes': [[4, -80]]}, 937]], [['single mid-year change', {'changes': [[4, 80]]}, 1061], ['change in prior year', {'changes': [[-9, 60]]}, 1002], ['two changes straddling', {'changes': [[-4, 80], [8, 100]]}, 1112], ['three changes', {'changes': [[-2, 30], [2, 60], [8, 60]]}, 1108], ['change at year start', {'changes': [[0, 45]]}, 1022], ['change long before period', {'changes': [[-14, 30], [4, 60]]}, 1046], ['no changes', {'changes': []}, 1000], ['rate decrease', {'changes': [[2, -80]]}, 946]], [['single mid-year change', {'changes': [[9, -50]]}, 951], ['change in prior year', {'changes': [[-5, -50]]}, 991], ['two changes straddling', {'changes': [[-8, 80], [5, -50]]}, 962], ['three changes', {'changes': [[-3, 80], [5, 30], [7, 60]]}, 1103], ['change at year start', {'changes': [[0, 100]]}, 1048], ['change long before period', {'changes': [[-14, 45], [4, 60]]}, 1046], ['no changes', {'changes': []}, 1000], ['rate decrease', {'changes': [[4, -80]]}, 937]]]
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
single mid-year change10701070Passed
change in prior year10041004Passed
two changes straddling971969Failed
three changes10241020Failed
change at year start10221022Passed
change long before period10731070Failed
no changes10001000Passed
rate decrease921921Passed

SHA-256 / 789e8ba61a7b55a6bdb52c8eb1f2a73b0edc7d469eaec7251466e9f282672fe8

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):
    def after(m):
        d=Fraction(m,12)
        if d>=1: return Fraction(0)
        if d<=-1: return Fraction(1)
        if d>=0: return (1-d)**2/2
        return 1-(1+d)**2/2
    level=Fraction(1); levels=[level]
    for m,c in x['changes']:
        level=1+Fraction(c,1000); levels.append(level)
    avg=Fraction(0)
    prev=Fraction(1)
    for i,(m,c) in enumerate(x['changes']):
        a=after(m)
        avg+=levels[i]*(prev-a)
        prev=a
    avg+=levels[-1]*prev
    return math.floor(levels[-1]/avg*1000+Fraction(1,2))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['single mid-year change', {'changes': [[3, 100]]}, 1070], ['change in prior year', {'changes': [[-7, 45]]}, 1004], ['two changes straddling', {'changes': [[-8, 45], [2, -50]]}, 969], ['three changes', {'changes': [[-9, 30], [3, 100], [8, -50]]}, 1020], ['change at year start', {'changes': [[0, 45]]}, 1022], ['change long before period', {'changes': [[-14, -50], [3, 100]]}, 1070], ['no changes', {'changes': []}, 1000], ['rate decrease', {'changes': [[10, -80]]}, 921]], [['single mid-year change', {'changes': [[5, 60]]}, 1049], ['change in prior year', {'changes': [[-8, 30]]}, 1002], ['two changes straddling', {'changes': [[-6, 80], [6, 60]]}, 1062], ['three changes', {'changes': [[-6, 30], [4, 30], [7, 100]]}, 1120], ['change at year start', {'changes': [[0, 80]]}, 1038], ['change long before period', {'changes': [[-14, 100], [4, -50]]}, 961], ['no changes', {'changes': []}, 1000], ['rate decrease', {'changes': [[6, -80]]}, 929]], [['single mid-year change', {'changes': [[8, 60]]}, 1056], ['change in prior year', {'changes': [[-3, -50]]}, 985], ['two changes straddling', {'changes': [[-7, 100], [2, 100]]}, 1071], ['three changes', {'changes': [[-11, -50], [0, -50], [10, 100]]}, 1070], ['change at year start', {'changes': [[0, 100]]}, 1048], ['change long before period', {'changes': [[-14, -50], [4, 30]]}, 1023], ['no changes', {'changes': []}, 1000], ['rate decrease', {'changes': [[4, -80]]}, 937]], [['single mid-year change', {'changes': [[4, 80]]}, 1061], ['change in prior year', {'changes': [[-9, 60]]}, 1002], ['two changes straddling', {'changes': [[-4, 80], [8, 100]]}, 1112], ['three changes', {'changes': [[-2, 30], [2, 60], [8, 60]]}, 1108], ['change at year start', {'changes': [[0, 45]]}, 1022], ['change long before period', {'changes': [[-14, 30], [4, 60]]}, 1046], ['no changes', {'changes': []}, 1000], ['rate decrease', {'changes': [[2, -80]]}, 946]], [['single mid-year change', {'changes': [[9, -50]]}, 951], ['change in prior year', {'changes': [[-5, -50]]}, 991], ['two changes straddling', {'changes': [[-8, 80], [5, -50]]}, 962], ['three changes', {'changes': [[-3, 80], [5, 30], [7, 60]]}, 1103], ['change at year start', {'changes': [[0, 100]]}, 1048], ['change long before period', {'changes': [[-14, 45], [4, 60]]}, 1046], ['no changes', {'changes': []}, 1000], ['rate decrease', {'changes': [[4, -80]]}, 937]]]
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
single mid-year change10701070Passed
change in prior year10041004Passed
two changes straddling941969Failed
three changes9131020Failed
change at year start10221022Passed
change long before period11091070Failed
no changes10001000Passed
rate decrease921921Passed

SHA-256 / 20b7670e174c7eadc2ef9f89a51c75ce12cab92dd7f3be13ee69ab6b25a85014

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 rating contract. Amounts are integer cents and factors exact rationals; it makes no claim of conformance with any filed rating plan, bureau manual or jurisdiction. 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:10.388181+00:00.

Case digest / 92a87ea22add5b381d96bee50d9eff61e37a3921da3219fbe62293facf934480