@casomoltd/nhs-pay 0.10.4 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +48 -0
  2. package/dist/award.d.ts +8 -8
  3. package/dist/award.js +8 -8
  4. package/dist/circulars/england-md-1-2026r.d.ts +2 -3
  5. package/dist/circulars/england-md-1-2026r.js +2 -3
  6. package/dist/circulars/england-md-1-2026r.js.map +1 -1
  7. package/dist/circulars/ni-hsc-tc8-05-2025.d.ts +2 -2
  8. package/dist/circulars/ni-hsc-tc8-05-2025.js +2 -2
  9. package/dist/circulars/scotland-pcs-dd-2025-01.d.ts +2 -3
  10. package/dist/circulars/scotland-pcs-dd-2025-01.js +2 -3
  11. package/dist/circulars/scotland-pcs-dd-2025-01.js.map +1 -1
  12. package/dist/circulars/scotland-pcs-dd-2026-01.d.ts +2 -2
  13. package/dist/circulars/scotland-pcs-dd-2026-01.js +2 -2
  14. package/dist/circulars/wales-mdw-01-2025.d.ts +2 -2
  15. package/dist/circulars/wales-mdw-01-2025.js +2 -2
  16. package/dist/circulars/wales-mdw-01-2026.d.ts +2 -2
  17. package/dist/circulars/wales-mdw-01-2026.js +2 -2
  18. package/dist/format.d.ts +8 -0
  19. package/dist/format.js +14 -0
  20. package/dist/format.js.map +1 -1
  21. package/dist/gad/erf-2023-06-30.d.ts +39 -3
  22. package/dist/gad/erf-2023-06-30.js +39 -3
  23. package/dist/gad/erf-2023-06-30.js.map +1 -1
  24. package/dist/gad/factor-table.d.ts +10 -0
  25. package/dist/gad/factor-table.js.map +1 -1
  26. package/dist/gad/lrf-2023-06-30.d.ts +39 -3
  27. package/dist/gad/lrf-2023-06-30.js +39 -3
  28. package/dist/gad/lrf-2023-06-30.js.map +1 -1
  29. package/dist/hcas-pcts.js +3 -1
  30. package/dist/hcas-pcts.js.map +1 -1
  31. package/dist/index.d.ts +15 -4
  32. package/dist/index.js +17 -5
  33. package/dist/index.js.map +1 -1
  34. package/dist/npa.d.ts +28 -0
  35. package/dist/npa.js +60 -0
  36. package/dist/npa.js.map +1 -0
  37. package/dist/pension/history.d.ts +105 -0
  38. package/dist/pension/history.js +115 -0
  39. package/dist/pension/history.js.map +1 -0
  40. package/dist/pension/ledger.d.ts +146 -0
  41. package/dist/pension/ledger.js +193 -0
  42. package/dist/pension/ledger.js.map +1 -0
  43. package/dist/pension/prices.d.ts +125 -0
  44. package/dist/pension/prices.js +108 -0
  45. package/dist/pension/prices.js.map +1 -0
  46. package/dist/pension/seed.d.ts +75 -0
  47. package/dist/pension/seed.js +82 -0
  48. package/dist/pension/seed.js.map +1 -0
  49. package/dist/pension/uplift.d.ts +151 -0
  50. package/dist/pension/uplift.js +135 -0
  51. package/dist/pension/uplift.js.map +1 -0
  52. package/dist/pension-projection.d.ts +249 -12
  53. package/dist/pension-projection.js +406 -101
  54. package/dist/pension-projection.js.map +1 -1
  55. package/dist/pension.js +9 -10
  56. package/dist/pension.js.map +1 -1
  57. package/dist/post.d.ts +24 -16
  58. package/dist/post.js +2 -3
  59. package/dist/post.js.map +1 -1
  60. package/dist/revaluation.d.ts +189 -0
  61. package/dist/revaluation.js +270 -0
  62. package/dist/revaluation.js.map +1 -0
  63. package/dist/scales.d.ts +17 -10
  64. package/dist/scales.js +17 -10
  65. package/dist/scales.js.map +1 -1
  66. package/dist/take-home.d.ts +9 -5
  67. package/dist/take-home.js +9 -5
  68. package/dist/take-home.js.map +1 -1
  69. package/package.json +2 -2
@@ -0,0 +1,146 @@
1
+ /**
2
+ * The member's pension as a balance-forward periodic ledger.
3
+ *
4
+ * closing(N) = [closing(N−1) × (1 + uplift(N)) + earned(N)]
5
+ * × factor(N) − cash(N)
6
+ *
7
+ * One uniform row per scheme year. `factor` is 1 and `cash` is 0
8
+ * on every row but the retirement one, so there is no branch in
9
+ * the recurrence — only a multiplier that is usually the
10
+ * identity, the same trick as an uplift of zero.
11
+ *
12
+ * **The order is load-bearing.** The pot is revalued FIRST and
13
+ * the year's slice added after, so a slice earns no revaluation
14
+ * in the scheme year it is earned. The other order overstates a
15
+ * real statement by 3.2% while every internal test still passes.
16
+ *
17
+ * This is a READ MODEL, not a book of record: it is rebuilt from
18
+ * source on every call, never stored, and every row is frozen at
19
+ * construction.
20
+ */
21
+ import type { FactorProvenance } from '../gad/factor-table.js';
22
+ import type { Prices } from './prices.js';
23
+ import type { AppliedUplift, MemberPhase } from './uplift.js';
24
+ import type { LedgerSeed } from './seed.js';
25
+ /** The retirement event, recorded on the year it falls in. */
26
+ export interface AppliedDrawing {
27
+ /** The retirement date itself — drawing is date-based, by
28
+ * years and months from NPA, not annual. */
29
+ readonly on: Date;
30
+ readonly factor: number;
31
+ readonly kind: 'erf' | 'lrf';
32
+ /** Which issue of which table the factor came from. */
33
+ readonly provenance: FactorProvenance;
34
+ /** Pension given up and cash taken, or null if none was. */
35
+ readonly commuted: {
36
+ readonly pensionGivenUp: number;
37
+ readonly lumpSum: number;
38
+ } | null;
39
+ }
40
+ /** One scheme year, accounted for the way the scheme accounts
41
+ * for it. Every field is nominal £/yr unless said otherwise. */
42
+ export interface LedgerYear {
43
+ /** Scheme year END — 2026 for 2025/26. The same key the
44
+ * revaluation table uses, so a row joins by value. */
45
+ readonly schemeYearEnd: number;
46
+ readonly phase: MemberPhase;
47
+ /** Nominal pensionable pay for this year, or null when not
48
+ * accruing. In a partial year this is the PAY scaled by months
49
+ * worked — the 1/54 divisor is never pro-rated. */
50
+ readonly pensionableEarnings: number | null;
51
+ /** pensionableEarnings / 54, or 0. */
52
+ readonly earned: number;
53
+ /**
54
+ * Whether this year's earnings are the scheme's own figure or
55
+ * ours. Sits BESIDE the uplift's provenance rather than
56
+ * folded into it, because the two answer different questions:
57
+ * this one is about the PAY, `uplift.from.si` about the RATE.
58
+ *
59
+ * It is the only knownness a projected row carries. Every
60
+ * uplift after the seed is the caller's assumption, so
61
+ * `uplift.from.si` is null on every row and no row is the
62
+ * scheme's own record — the seed is the last figure that was.
63
+ *
64
+ * Always `assumed` where anything was earned: the library has
65
+ * no route to a member's actual year-by-year pay, so every
66
+ * non-zero figure derives from the single pay the caller gave,
67
+ * held flat in real terms. `none` where the member was not
68
+ * accruing, which is the only case with nothing to be wrong
69
+ * about. A statement's own earnings history would add a
70
+ * `given` here, and is the reason this field exists now.
71
+ */
72
+ readonly earningsBasis: 'assumed' | 'none';
73
+ /** Brought INTO this year — last year's closing balance,
74
+ * untouched. The whole banked pot, not a slice. */
75
+ readonly opening: number;
76
+ /** Applied at the START of this year, to the WHOLE opening
77
+ * balance. Null for the first year of membership. */
78
+ readonly uplift: AppliedUplift | null;
79
+ /** opening × (1 + uplift), before this year's slice. */
80
+ readonly revalued: number;
81
+ /** The retirement transform, on the one row where it happens. */
82
+ readonly drawing: AppliedDrawing | null;
83
+ /** (revalued + earned) × factor − pension given up. Before the
84
+ * drawing row an accrued ENTITLEMENT; after it, a pension IN
85
+ * PAYMENT — the same money, with `drawing` the dated record of
86
+ * the moment it changed character. */
87
+ readonly closing: number;
88
+ }
89
+ /** Named indices into the ledger, not stored copies of it. */
90
+ export interface MemberLedger {
91
+ readonly years: readonly LedgerYear[];
92
+ /** Closing balance in force at `date`, in this walk's own
93
+ * money. Flat between steps, which is the whole point.
94
+ *
95
+ * ONE ruler per ledger: a walk is either the cash projection
96
+ * or the today's-money one, and it reports in the money it
97
+ * was built in. Pairing the two is the orchestrator's job —
98
+ * see `pension-projection.ts` — because neither walk can see
99
+ * the other. */
100
+ atDate(date: Date): number;
101
+ /** Closing balance at the end of a scheme year. Years at or
102
+ * before the seed's own year return the seed balance: the
103
+ * walk starts after it, so there is no row, but there is
104
+ * still an answer. */
105
+ closingAt(schemeYearEnd: number): number;
106
+ /** The ACCRUED entitlement at `date`, before any retirement
107
+ * factor. Distinct from `atDate`, which reports the pension
108
+ * actually in force: on the row carrying the drawing those
109
+ * two differ by the ERF or LRF, and asking "what had they
110
+ * built up" must not be answered with the reduced figure. */
111
+ accruedAt(date: Date): number;
112
+ /** The statement-shaped view: the years a member can lay
113
+ * beside the paper. */
114
+ earningsRows(): readonly LedgerYear[];
115
+ }
116
+ export interface LedgerRequest {
117
+ readonly seed: LedgerSeed;
118
+ /**
119
+ * Pensionable pay in TODAY'S MONEY, held flat.
120
+ *
121
+ * **This is the base case and the only one built.** Every
122
+ * year's slice is the same figure in today's money; what
123
+ * varies is only its expression in each year's own cash,
124
+ * because a nominal model that froze pay in CASH while
125
+ * revaluing the pot above CPI would count inflation twice.
126
+ *
127
+ * Pay progression is a deliberate non-feature — issue #11.
128
+ * Anything that makes a year's slice differ from
129
+ * `pensionableEarnings / 54` in today's money is that unbuilt
130
+ * feature arriving by accident: quote the figure at the
131
+ * statement date and hold it flat in real terms FROM there,
132
+ * and the member collects a 5.6% real pay rise. Held to a
133
+ * date, `earnings in today's money are pay / 54, every year`
134
+ * is the invariant that catches it.
135
+ */
136
+ readonly pensionableEarnings: number;
137
+ /** Last day of service. */
138
+ readonly exitDate: Date;
139
+ readonly retirementDate: Date;
140
+ readonly prices: Prices;
141
+ /** Built once, against the balance standing at retirement. */
142
+ readonly drawingFor: (revalued: number) => AppliedDrawing | null;
143
+ /** Last scheme year to walk. */
144
+ readonly through: number;
145
+ }
146
+ export declare function buildLedger(req: LedgerRequest): MemberLedger;
@@ -0,0 +1,193 @@
1
+ /**
2
+ * The member's pension as a balance-forward periodic ledger.
3
+ *
4
+ * closing(N) = [closing(N−1) × (1 + uplift(N)) + earned(N)]
5
+ * × factor(N) − cash(N)
6
+ *
7
+ * One uniform row per scheme year. `factor` is 1 and `cash` is 0
8
+ * on every row but the retirement one, so there is no branch in
9
+ * the recurrence — only a multiplier that is usually the
10
+ * identity, the same trick as an uplift of zero.
11
+ *
12
+ * **The order is load-bearing.** The pot is revalued FIRST and
13
+ * the year's slice added after, so a slice earns no revaluation
14
+ * in the scheme year it is earned. The other order overstates a
15
+ * real statement by 3.2% while every internal test still passes.
16
+ *
17
+ * This is a READ MODEL, not a book of record: it is rebuilt from
18
+ * source on every call, never stored, and every row is frozen at
19
+ * construction.
20
+ */
21
+ import { invariant } from '../errors.js';
22
+ import { periodInYearsMonths } from '../dates.js';
23
+ import { openingUpliftFor, phaseAt } from './uplift.js';
24
+ import { schemeYearEndDate, schemeYearEndFor, schemeYearStartDate, } from './seed.js';
25
+ /** Complete months from `from` to `to`, capped at a scheme year. */
26
+ function completeMonths(from, to) {
27
+ if (to <= from)
28
+ return 0;
29
+ const { years, months } = periodInYearsMonths(from, to);
30
+ return Math.min(12, years * 12 + months);
31
+ }
32
+ /**
33
+ * Nominal pay for a year, scaled where the year is partial.
34
+ * The 1/54 divisor is never pro-rated — only the pay is.
35
+ *
36
+ * **Only the JOINING year can be partial.** A member joining in
37
+ * October earns two thirds of that year's pay and their
38
+ * statement says so; there is one join and it is handled one
39
+ * way, so nothing is inconsistent about counting it.
40
+ *
41
+ * Leaving is different: an exit date names a SCHEME YEAR and
42
+ * the member is credited the whole of it, unearned months
43
+ * included. That is a simplification the library should not be
44
+ * making — see `rowFor` and issue #12.
45
+ */
46
+ function payFor({ year, prices, first, accruingFrom, annualPay, }) {
47
+ // Today's money in, this year's cash out. One conversion, so
48
+ // the figure cannot pick up growth on the way. At a zero
49
+ // assumption it is the identity, which is what makes the
50
+ // today's-money run credit pay / 54 every year.
51
+ const whole = prices.payAt(annualPay, schemeYearEndDate(year));
52
+ let months = 12;
53
+ if (year === first && accruingFrom !== null) {
54
+ months = completeMonths(accruingFrom, schemeYearStartDate(year + 1));
55
+ }
56
+ return (whole * months) / 12;
57
+ }
58
+ /** One row: revalue the pot, add the year's slice, then apply
59
+ * the retirement transform if this is the year it falls in. */
60
+ function rowFor(ctx) {
61
+ const { year, opening, req, exitYear, retireYear } = ctx;
62
+ const { prices, seed } = req;
63
+ const phase = phaseAt(year, exitYear, retireYear);
64
+ /* ONE RULE FOR LEAVING: an exit date names a SCHEME YEAR.
65
+ The member is active for all of it, earns its whole 1/54
66
+ slice, and from its close the in-service rate stops. Both
67
+ halves are the same decision.
68
+
69
+ It is a simplification the LIBRARY makes on the consumer's
70
+ behalf, which is the wrong way round — SI 2015/94 Sch 9
71
+ para 3 is finer on both counts and no caller can reach it.
72
+ See docs/how-it-works.md, "An exit date names a scheme
73
+ year, not a day", for what it costs, and issue #12 for what
74
+ a fix takes. */
75
+ /* The rate is `openingUpliftFor`'s answer, never assembled
76
+ here: the seed inverts this exact step, and the two must ask
77
+ one function rather than each name the phase, the year and
78
+ the series for themselves. */
79
+ const uplift = ctx.isFirst
80
+ ? null
81
+ : openingUpliftFor(year - 1, req.exitDate, req.retirementDate, prices);
82
+ const revalued = uplift === null
83
+ ? opening
84
+ : opening * (1 + uplift.percent / 100);
85
+ const pensionableEarnings = phase === 'active'
86
+ ? payFor({
87
+ year, prices, first: ctx.first,
88
+ accruingFrom: seed.accruingFrom,
89
+ annualPay: req.pensionableEarnings,
90
+ })
91
+ : null;
92
+ const earned = pensionableEarnings === null
93
+ ? 0
94
+ : pensionableEarnings / 54;
95
+ const drawing = year === retireYear
96
+ ? req.drawingFor(revalued + earned)
97
+ : null;
98
+ const factor = drawing?.factor ?? 1;
99
+ const givenUp = drawing?.commuted?.pensionGivenUp ?? 0;
100
+ // The one nonsense the shape still permits. An invariant
101
+ // rather than three row subtypes: nothing about a row's
102
+ // BEHAVIOUR differs by phase, so there is nothing to dispatch
103
+ // and subtypes would override nothing.
104
+ invariant(phase === 'active' || pensionableEarnings === null, `${phase} year ${year} carries pensionable earnings`);
105
+ return Object.freeze({
106
+ schemeYearEnd: year,
107
+ phase,
108
+ pensionableEarnings,
109
+ earned,
110
+ earningsBasis: earned === 0 ? 'none' : 'assumed',
111
+ opening,
112
+ uplift: uplift === null ? null : Object.freeze(uplift),
113
+ revalued,
114
+ drawing: drawing === null ? null : Object.freeze(drawing),
115
+ closing: (revalued + earned) * factor - givenUp,
116
+ });
117
+ }
118
+ export function buildLedger(req) {
119
+ const { seed, exitDate, retirementDate, through } = req;
120
+ const exitYear = schemeYearEndFor(exitDate);
121
+ const retireYear = schemeYearEndFor(retirementDate);
122
+ const first = seed.atSchemeYearEnd + 1;
123
+ const years = [];
124
+ let opening = seed.opening;
125
+ for (let year = first; year <= through; year++) {
126
+ const row = rowFor({
127
+ year,
128
+ opening,
129
+ isFirst: years.length === 0 && seed.basis === 'derived',
130
+ req, first, exitYear, retireYear,
131
+ });
132
+ years.push(row);
133
+ opening = row.closing;
134
+ }
135
+ return readerOver(Object.freeze(years), seed);
136
+ }
137
+ /**
138
+ * The read side, over rows already walked.
139
+ *
140
+ * Separated from the walk because they are different jobs: one
141
+ * produces the record, the other answers questions of it. Also
142
+ * keeps each honest about its own complexity.
143
+ */
144
+ function readerOver(frozen, seed) {
145
+ /** The earliest date this ledger can answer for: the close of
146
+ * the year its seed sits at. */
147
+ const startsAt = schemeYearEndDate(seed.atSchemeYearEnd);
148
+ /**
149
+ * Asked about a date BEFORE the ledger begins, answer at the
150
+ * beginning instead — the balance is the seed's, and the seed
151
+ * is a figure at a stated date.
152
+ *
153
+ * Returning the seed against the DATE ASKED made leaving
154
+ * earlier look worth more: the cash figure was unchanged but
155
+ * deflated over a longer window, so a member who left in
156
+ * January 2024 read £3,849 in today's money where one who
157
+ * left in January 2025 read £3,607, off the same statement.
158
+ * Monotonic nonsense, and in the one regime where it shows —
159
+ * a statement issued after the member had already left.
160
+ */
161
+ const answerableAt = (date) => date < startsAt ? startsAt : date;
162
+ /** Replay the steps up to `date`. `preDrawing` reads the row
163
+ * carrying the retirement event at its pre-factor value. */
164
+ const walkTo = (date, preDrawing) => {
165
+ let value = seed.opening;
166
+ for (const row of frozen) {
167
+ if (row.uplift !== null && row.uplift.appliedOn <= date) {
168
+ value = row.revalued;
169
+ }
170
+ if (schemeYearEndDate(row.schemeYearEnd) <= date) {
171
+ value = preDrawing
172
+ ? row.revalued + row.earned
173
+ : row.closing;
174
+ }
175
+ }
176
+ return value;
177
+ };
178
+ return Object.freeze({
179
+ years: frozen,
180
+ atDate: (date) => walkTo(answerableAt(date), false),
181
+ accruedAt: (date) => walkTo(answerableAt(date), true),
182
+ closingAt(schemeYearEnd) {
183
+ if (schemeYearEnd <= seed.atSchemeYearEnd) {
184
+ return seed.opening;
185
+ }
186
+ const row = frozen.find((r) => r.schemeYearEnd === schemeYearEnd);
187
+ invariant(row !== undefined, `scheme year ${schemeYearEnd} is beyond the walk`);
188
+ return row.closing;
189
+ },
190
+ earningsRows: () => frozen.filter((row) => row.pensionableEarnings !== null),
191
+ });
192
+ }
193
+ //# sourceMappingURL=ledger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ledger.js","sourceRoot":"","sources":["../../src/pension/ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AACvC,OAAO,EAAC,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAIhD,OAAO,EAAC,gBAAgB,EAAE,OAAO,EAAC,MAAM,aAAa,CAAC;AAEtD,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,WAAW,CAAC;AA+HnB,oEAAoE;AACpE,SAAS,cAAc,CAAC,IAAU,EAAE,EAAQ;IAC1C,IAAI,EAAE,IAAI,IAAI;QAAE,OAAO,CAAC,CAAC;IACzB,MAAM,EAAC,KAAK,EAAE,MAAM,EAAC,GAAG,mBAAmB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACtD,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,GAAG,EAAE,GAAG,MAAM,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,SAAS,MAAM,CAAC,EACd,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,GAO7C;IACC,6DAA6D;IAC7D,yDAAyD;IACzD,yDAAyD;IACzD,gDAAgD;IAChD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,iBAAiB,CAAC,IAA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2
+ * The caller's CPI assumption, and the one conversion that
3
+ * needs it.
4
+ *
5
+ * Two jobs. The assumption itself, read as a `CpiEntry` for any
6
+ * scheme year, and expressing the caller's pay in the money of
7
+ * a given scheme year, which is that same rate applied.
8
+ *
9
+ * ── There is no deflator here any more ──────────────
10
+ *
11
+ * Today's money is NOT this projection divided by inflation. It
12
+ * is the SAME projection run with the inflation assumption set
13
+ * to zero, so the pension revalues at 1.5% a year while a
14
+ * member is paying in and not at all once they are deferred.
15
+ * `pension-projection.ts` runs the model twice and pairs the
16
+ * two readings; neither one is derived from the other.
17
+ *
18
+ * That is a real difference, not a restatement of the same
19
+ * arithmetic. Dividing a CPI + 1.5 projection by CPI gives
20
+ * 1.5 / (1 + cpi) — 1.47% at a 2% assumption, because the 1.5
21
+ * points are added before the growth and then eaten into by
22
+ * the same year's inflation. Running at zero gives 1.5% flat.
23
+ * The second is what the scheme's own rule reduces to when
24
+ * inflation is ignored, and it is what the tool means by
25
+ * today's money.
26
+ *
27
+ * Deleting the deflator deleted a great deal with it: an anchor
28
+ * date, a face-value window, and the rule that a stated balance
29
+ * must not be restated. At a zero assumption there is nothing
30
+ * to restate, so that property now holds by construction rather
31
+ * than by a clamp — which is why three separate attempts at
32
+ * placing the anchor all failed and this does not.
33
+ *
34
+ * An uplift rule reads whatever entry it is handed and carries
35
+ * it through to its receipt; it never branches on whether the
36
+ * figure was measured or assumed. A PROJECTION is always handed
37
+ * `assumedFor`: an Order is a nominal rate, and the
38
+ * today's-money run is this same model at an assumption of
39
+ * zero, so an Order applied inside it puts a whole year of CPI
40
+ * into a reading defined to contain none. So there is one rate
41
+ * here and it is the assumption.
42
+ *
43
+ * Reading the published record itself is a different question,
44
+ * and `revaluation.ts` answers it: `revaluationFor` for one
45
+ * year, `publishedInflationBetween` for a window, both beside
46
+ * the table they read.
47
+ */
48
+ /** One year of the September CPI series, and where it came from. */
49
+ export interface CpiEntry {
50
+ /** Scheme year END, e.g. 2016 for the 2015/16 year. */
51
+ readonly schemeYearEnd: number;
52
+ /** Percentage points. Negative is legal: September 2015 was
53
+ * -0.1, which is the scheme's very first uplift. */
54
+ readonly cpi: number;
55
+ /** The Order that published this figure; null when it is the
56
+ * caller's assumption. Never an empty string.
57
+ *
58
+ * This one nullable field IS the published-versus-assumed
59
+ * distinction — not a variant of uplift, not a flag on a ledger
60
+ * row. A year either has the Order that set it or it does not,
61
+ * which leaves pro-rating free to vary independently of it. */
62
+ readonly si: string | null;
63
+ }
64
+ /** Where one year's CPI figure is read from. The uplift rule is
65
+ * a function of phase and a series, so `upliftsFor` takes the
66
+ * CHOICE rather than a table and a condition — WHICH series
67
+ * stays the caller's question and never the rule's. A projection
68
+ * makes that choice exactly once, in `openingUpliftFor`. */
69
+ export type CpiSource = (schemeYearEnd: number) => CpiEntry;
70
+ /** The rate a projection revalues at, and the money readings
71
+ * that follow from it. Two members and no third: reading the
72
+ * published record is `revaluation.ts`'s job, and a reader here
73
+ * would be a second answer to a question already answered. */
74
+ export interface Prices {
75
+ /**
76
+ * A scheme year read as the caller's ASSUMPTION, whatever the
77
+ * published table holds for it.
78
+ *
79
+ * Not a fallback and not a test seam. This is the ONLY rate a
80
+ * projection uses, for every uplift after its seed and for
81
+ * published years as readily as unpublished ones — see the
82
+ * header, and `openingUpliftFor`, which is where a projection
83
+ * reaches for it.
84
+ */
85
+ assumedFor(schemeYearEnd: number): CpiEntry;
86
+ /**
87
+ * The caller's pay, given in today's money, expressed in the
88
+ * cash of `asAt`.
89
+ *
90
+ * The only conversion left in this module. At a zero
91
+ * assumption it is the identity, which is exactly why the
92
+ * today's-money run credits `pay / 54` every year without
93
+ * anything having to enforce it.
94
+ */
95
+ payAt(todaysMoney: number, asAt: Date): number;
96
+ }
97
+ /**
98
+ * How much more a pound of `asAt` money is than a pound of
99
+ * `from` money, under the caller's assumption.
100
+ *
101
+ * **Annual STEPS, never a continuous power.** Pay is a slice of
102
+ * a scheme year and the pot moves once a year, so a ruler that
103
+ * compounded smoothly would drift against both inside every
104
+ * year. The steps are the days the Orders actually land, read
105
+ * from the table: 1 April through 2022, 6 April after. Reading
106
+ * them off a hardcoded 6 April put a five-day window either
107
+ * side of every pre-2023 April and counted a step that had not
108
+ * happened.
109
+ *
110
+ * Symmetric, so a year behind the run date is divided by
111
+ * exactly what a year ahead is multiplied by, and a caller
112
+ * converting out and back lands where it started.
113
+ */
114
+ export declare function inflationFactor(asAt: Date, from: Date, assumedCpi: number): number;
115
+ /**
116
+ * Build the price series for one run.
117
+ *
118
+ * @param assumedCpi Decimal, e.g. 0.02 — the caller's single
119
+ * assumption, and the rate behind every uplift a projection
120
+ * applies.
121
+ * @param asOf The date the caller's pay is quoted at — the run
122
+ * date. Pay is the only thing converted, so this is the only
123
+ * date the module needs.
124
+ */
125
+ export declare function createPrices(assumedCpi: number, asOf: Date): Prices;
@@ -0,0 +1,108 @@
1
+ /**
2
+ * The caller's CPI assumption, and the one conversion that
3
+ * needs it.
4
+ *
5
+ * Two jobs. The assumption itself, read as a `CpiEntry` for any
6
+ * scheme year, and expressing the caller's pay in the money of
7
+ * a given scheme year, which is that same rate applied.
8
+ *
9
+ * ── There is no deflator here any more ──────────────
10
+ *
11
+ * Today's money is NOT this projection divided by inflation. It
12
+ * is the SAME projection run with the inflation assumption set
13
+ * to zero, so the pension revalues at 1.5% a year while a
14
+ * member is paying in and not at all once they are deferred.
15
+ * `pension-projection.ts` runs the model twice and pairs the
16
+ * two readings; neither one is derived from the other.
17
+ *
18
+ * That is a real difference, not a restatement of the same
19
+ * arithmetic. Dividing a CPI + 1.5 projection by CPI gives
20
+ * 1.5 / (1 + cpi) — 1.47% at a 2% assumption, because the 1.5
21
+ * points are added before the growth and then eaten into by
22
+ * the same year's inflation. Running at zero gives 1.5% flat.
23
+ * The second is what the scheme's own rule reduces to when
24
+ * inflation is ignored, and it is what the tool means by
25
+ * today's money.
26
+ *
27
+ * Deleting the deflator deleted a great deal with it: an anchor
28
+ * date, a face-value window, and the rule that a stated balance
29
+ * must not be restated. At a zero assumption there is nothing
30
+ * to restate, so that property now holds by construction rather
31
+ * than by a clamp — which is why three separate attempts at
32
+ * placing the anchor all failed and this does not.
33
+ *
34
+ * An uplift rule reads whatever entry it is handed and carries
35
+ * it through to its receipt; it never branches on whether the
36
+ * figure was measured or assumed. A PROJECTION is always handed
37
+ * `assumedFor`: an Order is a nominal rate, and the
38
+ * today's-money run is this same model at an assumption of
39
+ * zero, so an Order applied inside it puts a whole year of CPI
40
+ * into a reading defined to contain none. So there is one rate
41
+ * here and it is the assumption.
42
+ *
43
+ * Reading the published record itself is a different question,
44
+ * and `revaluation.ts` answers it: `revaluationFor` for one
45
+ * year, `publishedInflationBetween` for a window, both beside
46
+ * the table they read.
47
+ */
48
+ import { appliedOnFor } from '../revaluation.js';
49
+ /**
50
+ * How much more a pound of `asAt` money is than a pound of
51
+ * `from` money, under the caller's assumption.
52
+ *
53
+ * **Annual STEPS, never a continuous power.** Pay is a slice of
54
+ * a scheme year and the pot moves once a year, so a ruler that
55
+ * compounded smoothly would drift against both inside every
56
+ * year. The steps are the days the Orders actually land, read
57
+ * from the table: 1 April through 2022, 6 April after. Reading
58
+ * them off a hardcoded 6 April put a five-day window either
59
+ * side of every pre-2023 April and counted a step that had not
60
+ * happened.
61
+ *
62
+ * Symmetric, so a year behind the run date is divided by
63
+ * exactly what a year ahead is multiplied by, and a caller
64
+ * converting out and back lands where it started.
65
+ */
66
+ export function inflationFactor(asAt, from, assumedCpi) {
67
+ const ahead = asAt >= from;
68
+ const steps = ahead
69
+ ? aprilsBetween(from, asAt)
70
+ : aprilsBetween(asAt, from);
71
+ return Math.pow(1 + assumedCpi, ahead ? steps : -steps);
72
+ }
73
+ /**
74
+ * How many uplift dates fall in `(from, to]` — the days the pot
75
+ * moves, read from the table so that a pre-2023 Order counts on
76
+ * 1 April and a later one on the 6th. Whole steps, never a
77
+ * fraction: the pension does not move on any other day, so
78
+ * neither does the ruler used to read it.
79
+ */
80
+ function aprilsBetween(from, to) {
81
+ let count = 0;
82
+ for (let year = from.getFullYear(); year <= to.getFullYear(); year++) {
83
+ const applied = appliedOnFor(year);
84
+ if (applied > from && applied <= to)
85
+ count += 1;
86
+ }
87
+ return count;
88
+ }
89
+ /**
90
+ * Build the price series for one run.
91
+ *
92
+ * @param assumedCpi Decimal, e.g. 0.02 — the caller's single
93
+ * assumption, and the rate behind every uplift a projection
94
+ * applies.
95
+ * @param asOf The date the caller's pay is quoted at — the run
96
+ * date. Pay is the only thing converted, so this is the only
97
+ * date the module needs.
98
+ */
99
+ export function createPrices(assumedCpi, asOf) {
100
+ const assumedPct = assumedCpi * 100;
101
+ return {
102
+ assumedFor: (schemeYearEnd) => ({
103
+ schemeYearEnd, cpi: assumedPct, si: null,
104
+ }),
105
+ payAt: (todaysMoney, asAt) => todaysMoney * inflationFactor(asAt, asOf, assumedCpi),
106
+ };
107
+ }
108
+ //# sourceMappingURL=prices.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prices.js","sourceRoot":"","sources":["../../src/pension/prices.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,EAAC,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAsD/C;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,eAAe,CAC7B,IAAU,EACV,IAAU,EACV,UAAkB;IAElB,MAAM,KAAK,GAAG,IAAI,IAAI,IAAI,CAAC;IAC3B,MAAM,KAAK,GAAG,KAAK;QACjB,CAAC,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC;QAC3B,CAAC,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC9B,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;;GAMG;AACH,SAAS,aAAa,CAAC,IAAU,EAAE,EAAQ;IACzC,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KACE,IAAI,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,EAC7B,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EACxB,IAAI,EAAE,EACN,CAAC;QACD,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,OAAO,GAAG,IAAI,IAAI,OAAO,IAAI,EAAE;YAAE,KAAK,IAAI,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY,CAC1B,UAAkB,EAClB,IAAU;IAEV,MAAM,UAAU,GAAG,UAAU,GAAG,GAAG,CAAC;IAEpC,OAAO;QACL,UAAU,EAAE,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;YAC9B,aAAa,EAAE,GAAG,EAAE,UAAU,EAAE,EAAE,EAAE,IAAI;SACzC,CAAC;QACF,KAAK,EAAE,CAAC,WAAW,EAAE,IAAI,EAAE,EAAE,CAC3B,WAAW,GAAG,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC;KACxD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Where the walk starts, and what it starts from.
3
+ *
4
+ * This is the ENTIRETY of the statement-versus-estimation
5
+ * difference: the two input variants are read exactly once, here,
6
+ * to fill this object, and nothing downstream may ask which
7
+ * produced it.
8
+ */
9
+ /** An initial condition, not an abstraction. */
10
+ export interface LedgerSeed {
11
+ /** Nominal £/yr already banked at the close of
12
+ * `atSchemeYearEnd`. Zero when there is nothing to start
13
+ * from. */
14
+ readonly opening: number;
15
+ /** The scheme year the opening balance sits AT. The walk
16
+ * starts at the year after this one. */
17
+ readonly atSchemeYearEnd: number;
18
+ /** The date service actually begins INSIDE the first walked
19
+ * year, when that year is a part year — null when it is whole.
20
+ * Only the join route can produce a value here: a statement
21
+ * lands on a scheme year end, so the year after it is always
22
+ * whole. The first year's PAY is scaled by this; the 1/54
23
+ * divisor never is. */
24
+ readonly accruingFrom: Date | null;
25
+ /** Whether `opening` is the scheme's own figure or ours. No
26
+ * arithmetic reads this — it exists so a consumer can tell a
27
+ * figure a member could check against paper from one this
28
+ * library produced. */
29
+ readonly basis: 'given' | 'derived';
30
+ }
31
+ /**
32
+ * The scheme year a date falls in, named by the year it ENDS.
33
+ *
34
+ * The cycle is the scheme's own — 1 April to 31 March — and it
35
+ * is the same one an Annual Benefit Statement closes on: a
36
+ * statement marked *Updated To 31/03/2025* reports scheme year
37
+ * 2025, so its figure seeds that row's close untouched. 1 Apr
38
+ * 2025 and 31 Mar 2026 are both scheme year 2026.
39
+ */
40
+ export declare function schemeYearEndFor(date: Date): number;
41
+ /** 31 March of the given scheme year. */
42
+ export declare function schemeYearEndDate(schemeYearEnd: number): Date;
43
+ /** 1 April opening the given scheme year. */
44
+ export declare function schemeYearStartDate(schemeYearEnd: number): Date;
45
+ /**
46
+ * The scheme year that had already CLOSED by `date` — the year
47
+ * a balance stated on that date belongs to.
48
+ *
49
+ * Taking the day after makes 31 March land on the year it ends
50
+ * rather than the one before it. Shared with the caller that
51
+ * picks the real-terms anchor, which has to know the seed's year
52
+ * BEFORE a `Prices` exists to build the seed with.
53
+ */
54
+ export declare function schemeYearClosedBy(date: Date): number;
55
+ /**
56
+ * Route 1: the scheme has already told us the balance.
57
+ *
58
+ * Precondition: `statementDate` IS a scheme year end (31 March).
59
+ * A mid-year statement date is a caller error, not a value to
60
+ * round — the accrued figure would not correspond to any closing
61
+ * balance. Throw; never silently snap to a year end.
62
+ *
63
+ * Yields basis 'given', and `accruingFrom` null: the first walked
64
+ * year is the one AFTER the statement's, which is always whole.
65
+ */
66
+ export declare function seedFromStatement(accruedPension: number, statementDate: Date): LedgerSeed;
67
+ /**
68
+ * Route 2: we compute the balance from the beginning.
69
+ *
70
+ * Opening is zero and the walk starts in the join date's own
71
+ * scheme year, which is a PART year whenever the member did not
72
+ * join on 1 April — hence `accruingFrom`, which scales that
73
+ * year's pay.
74
+ */
75
+ export declare function seedFromJoinDate(joinDate: Date): LedgerSeed;