FA-63016 / Insurance premium rating / Open access
Parallelogram on-level factor: Current-year change area is not triangular · case 01
Changes within the calendar year are credited with too much earned exposure.
ROOT CAUSE
The area after a mid-year change is taken as the written fraction 1-d.
VERIFIED REPAIR
Use the triangle (1-d)^2/2.
Unsuccessful approach: Dropping the one-half doubles the triangle.
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)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| single mid-year change | 1023 | 1070 | Failed |
| change in prior year | 1004 | 1004 | Passed |
| two changes straddling | 994 | 969 | Failed |
| three changes | 990 | 1020 | Failed |
| change at year start | 1000 | 1022 | Failed |
| change long before period | 1023 | 1070 | Failed |
| no changes | 1000 | 1000 | Passed |
| rate decrease | 932 | 921 | Failed |
SHA-256 / a317aabae09e8db9451d8d3e268a07408390b3ae2282ead77addf4964ce4ef93
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
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| single mid-year change | 1041 | 1070 | Failed |
| change in prior year | 1004 | 1004 | Passed |
| two changes straddling | 987 | 969 | Failed |
| three changes | 996 | 1020 | Failed |
| change at year start | 1000 | 1022 | Failed |
| change long before period | 1041 | 1070 | Failed |
| no changes | 1000 | 1000 | Passed |
| rate decrease | 922 | 921 | Failed |
SHA-256 / 498386aa8a80efd9dc9583d3fc433dcbdaae301b1bee1be23a35b0e15b105198
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):
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| single mid-year change | 1070 | 1070 | Passed |
| change in prior year | 1004 | 1004 | Passed |
| two changes straddling | 969 | 969 | Passed |
| three changes | 1020 | 1020 | Passed |
| change at year start | 1022 | 1022 | Passed |
| change long before period | 1070 | 1070 | Passed |
| no changes | 1000 | 1000 | Passed |
| rate decrease | 921 | 921 | Passed |
SHA-256 / 955ae0b8d1af18c2c45ee5114cda871716060f5573910736e91a1fcc01c25b41
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.208923+00:00.
Case digest / edb5b694f800e819b4f32c28afbee61bd5fd31d08260da2185c3b1ea11ab5296