@casomoltd/nhs-pay 0.21.1 → 0.23.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.
- package/README.md +9 -4
- package/dist/additional-pension.d.ts +104 -0
- package/dist/additional-pension.js +163 -0
- package/dist/additional-pension.js.map +1 -0
- package/dist/dates.d.ts +21 -8
- package/dist/dates.js +46 -18
- package/dist/dates.js.map +1 -1
- package/dist/errors.d.ts +26 -0
- package/dist/errors.js +29 -0
- package/dist/errors.js.map +1 -1
- package/dist/factor-basis.d.ts +75 -22
- package/dist/factor-basis.js +95 -24
- package/dist/factor-basis.js.map +1 -1
- package/dist/gad/additional-pension-0-703-2023-10-03.d.ts +180 -0
- package/dist/gad/additional-pension-0-703-2023-10-03.js +87 -0
- package/dist/gad/additional-pension-0-703-2023-10-03.js.map +1 -0
- package/dist/gad/additional-pension-0-712-2023-10-03.d.ts +35 -0
- package/dist/gad/additional-pension-0-712-2023-10-03.js +170 -0
- package/dist/gad/additional-pension-0-712-2023-10-03.js.map +1 -0
- package/dist/gad/additional-pension-0-713-2023-10-03.d.ts +35 -0
- package/dist/gad/additional-pension-0-713-2023-10-03.js +173 -0
- package/dist/gad/additional-pension-0-713-2023-10-03.js.map +1 -0
- package/dist/gad/additional-pension-0-714-2023-10-03.d.ts +35 -0
- package/dist/gad/additional-pension-0-714-2023-10-03.js +176 -0
- package/dist/gad/additional-pension-0-714-2023-10-03.js.map +1 -0
- package/dist/gad/additional-pension-0-715-2023-10-03.d.ts +35 -0
- package/dist/gad/additional-pension-0-715-2023-10-03.js +179 -0
- package/dist/gad/additional-pension-0-715-2023-10-03.js.map +1 -0
- package/dist/gad/additional-pension-0-716-2023-10-03.d.ts +35 -0
- package/dist/gad/additional-pension-0-716-2023-10-03.js +170 -0
- package/dist/gad/additional-pension-0-716-2023-10-03.js.map +1 -0
- package/dist/gad/additional-pension-0-717-2023-10-03.d.ts +35 -0
- package/dist/gad/additional-pension-0-717-2023-10-03.js +173 -0
- package/dist/gad/additional-pension-0-717-2023-10-03.js.map +1 -0
- package/dist/gad/additional-pension-0-718-2023-10-03.d.ts +35 -0
- package/dist/gad/additional-pension-0-718-2023-10-03.js +176 -0
- package/dist/gad/additional-pension-0-718-2023-10-03.js.map +1 -0
- package/dist/gad/additional-pension-0-719-2023-10-03.d.ts +35 -0
- package/dist/gad/additional-pension-0-719-2023-10-03.js +179 -0
- package/dist/gad/additional-pension-0-719-2023-10-03.js.map +1 -0
- package/dist/gad/additional-pension-table.d.ts +51 -0
- package/dist/gad/additional-pension-table.js +23 -0
- package/dist/gad/additional-pension-table.js.map +1 -0
- package/dist/gad/factor-table.d.ts +7 -3
- package/dist/gad/factor-table.js.map +1 -1
- package/dist/gad/lrf-0-422-2023-06-30.d.ts +45 -0
- package/dist/gad/lrf-0-422-2023-06-30.js +70 -0
- package/dist/gad/lrf-0-422-2023-06-30.js.map +1 -0
- package/dist/gad/lrf-2023-06-30.d.ts +3 -3
- package/dist/gad/lrf-2023-06-30.js +3 -3
- package/dist/index.d.ts +16 -11
- package/dist/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/dist/member-benefits.d.ts +16 -1
- package/dist/member-benefits.js +19 -3
- package/dist/member-benefits.js.map +1 -1
- package/dist/pension/history.d.ts +0 -8
- package/dist/pension/history.js +10 -4
- package/dist/pension/history.js.map +1 -1
- package/dist/pension/ledger.d.ts +59 -32
- package/dist/pension/ledger.js +129 -100
- package/dist/pension/ledger.js.map +1 -1
- package/dist/pension/prices.d.ts +75 -58
- package/dist/pension/prices.js +111 -42
- package/dist/pension/prices.js.map +1 -1
- package/dist/pension/uplift.d.ts +32 -24
- package/dist/pension/uplift.js +66 -18
- package/dist/pension/uplift.js.map +1 -1
- package/dist/pension-projection.d.ts +3 -3
- package/dist/pension-projection.js +8 -13
- package/dist/pension-projection.js.map +1 -1
- package/dist/sections/section-1995.d.ts +2 -2
- package/dist/sections/section-1995.js +3 -3
- package/dist/sections/section-1995.js.map +1 -1
- package/dist/sections/section-2008.js +5 -3
- package/dist/sections/section-2008.js.map +1 -1
- package/dist/sections/section-2015.d.ts +8 -7
- package/dist/sections/section-2015.js +14 -10
- package/dist/sections/section-2015.js.map +1 -1
- package/dist/sources.d.ts +3 -0
- package/dist/sources.js +14 -0
- package/dist/sources.js.map +1 -1
- package/package.json +1 -1
package/dist/pension/ledger.js
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
* The member's pension as a balance-forward periodic ledger.
|
|
3
3
|
*
|
|
4
4
|
* closing(N) = [closing(N−1) × (1 + uplift(N)) + earned(N)]
|
|
5
|
-
* × factor(N)
|
|
5
|
+
* × (1 + leaver(N)) × factor(N)
|
|
6
6
|
*
|
|
7
|
-
* One uniform row per scheme year. `
|
|
8
|
-
* the
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* One uniform row per scheme year. `leaver` is 0 on every row but
|
|
8
|
+
* the one the member leaves in, and `factor` 1 on every row but the
|
|
9
|
+
* retirement one, so there is no branch in the recurrence — only
|
|
10
|
+
* multipliers that are usually the identity, the same trick as an
|
|
11
|
+
* uplift of zero.
|
|
11
12
|
*
|
|
12
13
|
* **The order is load-bearing.** The pot is revalued FIRST and
|
|
13
14
|
* the year's slice added after, so a slice earns no revaluation
|
|
@@ -19,8 +20,8 @@
|
|
|
19
20
|
* construction.
|
|
20
21
|
*/
|
|
21
22
|
import { invariant } from '../errors.js';
|
|
22
|
-
import {
|
|
23
|
-
import { openingUpliftFor, phaseAt } from './uplift.js';
|
|
23
|
+
import { dayAfter, monthsCountingPart, MONTHS_PER_YEAR } from '../dates.js';
|
|
24
|
+
import { openingUpliftFor, phaseAt, upliftsFor } from './uplift.js';
|
|
24
25
|
import { firstWalkedYear, schemeYearEndDate, schemeYearEndFor, schemeYearStartDate, } from './seed.js';
|
|
25
26
|
/**
|
|
26
27
|
* 1/54 of pensionable pay, the 2015 CARE accrual rate — NHSBSA
|
|
@@ -44,56 +45,92 @@ const LEDGER_BASES = {
|
|
|
44
45
|
export function flatPay(pay) {
|
|
45
46
|
return () => ({ pay, basis: LEDGER_BASES.assumed });
|
|
46
47
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
|
|
48
|
+
export function buildLedger(req) {
|
|
49
|
+
const { seed, exitDate, retirementDate, through } = req;
|
|
50
|
+
const exitYear = schemeYearEndFor(exitDate);
|
|
51
|
+
const retireYear = schemeYearEndFor(retirementDate);
|
|
52
|
+
const first = firstWalkedYear(seed);
|
|
53
|
+
const years = [];
|
|
54
|
+
let opening = seed.opening;
|
|
55
|
+
for (let year = first; year <= through; year++) {
|
|
56
|
+
const row = rowFor({
|
|
57
|
+
year,
|
|
58
|
+
opening,
|
|
59
|
+
/* No uplift opens a walk that opens the MEMBERSHIP: there
|
|
60
|
+
is no banked balance to revalue. Read off the seed's
|
|
61
|
+
own content — `accruingFrom` is a date only when service
|
|
62
|
+
begins inside the first walked year — never off which
|
|
63
|
+
route produced it, which the seed's own doc forbids
|
|
64
|
+
anything downstream from asking. */
|
|
65
|
+
isFirst: years.length === 0 && seed.accruingFrom !== null,
|
|
66
|
+
req, first, exitYear, retireYear,
|
|
67
|
+
});
|
|
68
|
+
years.push(row);
|
|
69
|
+
opening = row.closing;
|
|
70
|
+
}
|
|
71
|
+
return readerOver(Object.freeze(years), seed);
|
|
53
72
|
}
|
|
54
73
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
74
|
+
* The pension at the drawing, before and after its factor, read off
|
|
75
|
+
* the row the drawing falls in.
|
|
57
76
|
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
77
|
+
* There is no such row when the drawing falls at or before the seed's
|
|
78
|
+
* own year end — a member handing over a balance and drawing it the
|
|
79
|
+
* same day — and there is still an answer: the balance they handed
|
|
80
|
+
* over, with the factor applied here instead of on a row.
|
|
81
|
+
*/
|
|
82
|
+
export function atDrawing(ledger, drawing, factor) {
|
|
83
|
+
const row = ledger.years.find((r) => r.schemeYearEnd === schemeYearEndFor(drawing));
|
|
84
|
+
if (row === undefined) {
|
|
85
|
+
const revalued = ledger.accruedAt(drawing);
|
|
86
|
+
return { revalued, drawn: revalued * factor };
|
|
87
|
+
}
|
|
88
|
+
return { revalued: row.accrued, drawn: row.closing };
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Months served in a scheme year: all twelve, or from the join to
|
|
92
|
+
* the year's end, or from the year's start (or the join) to the end
|
|
93
|
+
* of the last day of service, a part month of 16 days or more
|
|
94
|
+
* counting as one.
|
|
62
95
|
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
96
|
+
* One count, read by the year's pay and its leaver adjustment
|
|
97
|
+
* alike. The adjustment's count is the regulation's (Sch 9 para 3).
|
|
98
|
+
* Using it for pay too is the library's reading: the scheme credits
|
|
99
|
+
* 1/54 of the pay actually earned in a part year (para 28(2)(b)),
|
|
100
|
+
* and pay held as a yearly figure is scaled by the months served.
|
|
67
101
|
*/
|
|
68
|
-
function
|
|
102
|
+
function monthsServedIn(year, req, first) {
|
|
103
|
+
const joinedThisYear = year === first ? req.seed.accruingFrom : null;
|
|
104
|
+
const leftThisYear = year === schemeYearEndFor(req.exitDate);
|
|
105
|
+
if (leftThisYear) {
|
|
106
|
+
const from = joinedThisYear ?? schemeYearStartDate(year);
|
|
107
|
+
invariant(req.exitDate >= from, `left on ${req.exitDate.toDateString()}, before joining on `
|
|
108
|
+
+ from.toDateString());
|
|
109
|
+
return monthsCountingPart(from, dayAfter(req.exitDate));
|
|
110
|
+
}
|
|
111
|
+
if (joinedThisYear !== null) {
|
|
112
|
+
return monthsCountingPart(joinedThisYear, schemeYearStartDate(year + 1));
|
|
113
|
+
}
|
|
114
|
+
return MONTHS_PER_YEAR;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Nominal pay for the months served in a year. The 1/54 divisor is
|
|
118
|
+
* never pro-rated — only the pay is.
|
|
119
|
+
*/
|
|
120
|
+
function payFor({ year, prices, annualPay, months, }) {
|
|
69
121
|
// Today's money in, this year's cash out. One conversion, so
|
|
70
122
|
// the figure cannot pick up growth on the way. At a zero
|
|
71
123
|
// assumption it is the identity, which is what makes the
|
|
72
124
|
// today's-money run credit pay / 54 every year.
|
|
73
125
|
const whole = prices.payAt(annualPay, schemeYearEndDate(year));
|
|
74
|
-
|
|
75
|
-
if (year === first && accruingFrom !== null) {
|
|
76
|
-
months = completeMonths(accruingFrom, schemeYearStartDate(year + 1));
|
|
77
|
-
}
|
|
78
|
-
return (whole * months) / 12;
|
|
126
|
+
return (whole * months) / MONTHS_PER_YEAR;
|
|
79
127
|
}
|
|
80
128
|
/** One row: revalue the pot, add the year's slice, then apply
|
|
81
129
|
* the retirement transform if this is the year it falls in. */
|
|
82
130
|
function rowFor(ctx) {
|
|
83
131
|
const { year, opening, req, exitYear, retireYear } = ctx;
|
|
84
|
-
const { prices
|
|
132
|
+
const { prices } = req;
|
|
85
133
|
const phase = phaseAt(year, exitYear, retireYear);
|
|
86
|
-
/* ONE RULE FOR LEAVING: an exit date names a SCHEME YEAR.
|
|
87
|
-
The member is active for all of it, earns its whole 1/54
|
|
88
|
-
slice, and from its close the in-service rate stops. Both
|
|
89
|
-
halves are the same decision.
|
|
90
|
-
|
|
91
|
-
It is a simplification the LIBRARY makes on the consumer's
|
|
92
|
-
behalf, which is the wrong way round — SI 2015/94 Sch 9
|
|
93
|
-
para 3 is finer on both counts and no caller can reach it.
|
|
94
|
-
See docs/how-it-works.md, "An exit date names a scheme
|
|
95
|
-
year, not a day", for what it costs, and issue #12 for what
|
|
96
|
-
a fix takes. */
|
|
97
134
|
/* The rate is `openingUpliftFor`'s answer, never assembled
|
|
98
135
|
here: the seed inverts this exact step, and the two must ask
|
|
99
136
|
one function rather than each name the phase, the year and
|
|
@@ -104,19 +141,22 @@ function rowFor(ctx) {
|
|
|
104
141
|
const revalued = uplift === null
|
|
105
142
|
? opening
|
|
106
143
|
: opening * (1 + uplift.percent / 100);
|
|
144
|
+
const monthsServed = monthsServedIn(year, req, ctx.first);
|
|
107
145
|
const given = phase === 'active'
|
|
108
146
|
? req.payIn(year)
|
|
109
147
|
: null;
|
|
110
148
|
const pensionableEarnings = given === null
|
|
111
149
|
? null
|
|
112
|
-
: payFor({
|
|
113
|
-
year, prices, first: ctx.first,
|
|
114
|
-
accruingFrom: seed.accruingFrom,
|
|
115
|
-
annualPay: given.pay,
|
|
116
|
-
});
|
|
150
|
+
: payFor({ year, prices, annualPay: given.pay, months: monthsServed });
|
|
117
151
|
const earned = pensionableEarnings === null
|
|
118
152
|
? 0
|
|
119
153
|
: pensionableEarnings * ACCRUAL_RATE;
|
|
154
|
+
const leftThisYear = year === exitYear;
|
|
155
|
+
const leaverAdjustment = leftThisYear
|
|
156
|
+
? leaverAdjustmentFor(year, prices, req.exitDate, monthsServed)
|
|
157
|
+
: null;
|
|
158
|
+
const accrued = (revalued + earned)
|
|
159
|
+
* (1 + (leaverAdjustment?.percent ?? 0) / 100);
|
|
120
160
|
const drawing = year === retireYear
|
|
121
161
|
? req.drawingFor()
|
|
122
162
|
: null;
|
|
@@ -137,34 +177,43 @@ function rowFor(ctx) {
|
|
|
137
177
|
opening,
|
|
138
178
|
uplift: uplift === null ? null : Object.freeze(uplift),
|
|
139
179
|
revalued,
|
|
180
|
+
leaverAdjustment: leaverAdjustment === null
|
|
181
|
+
? null
|
|
182
|
+
: Object.freeze(leaverAdjustment),
|
|
183
|
+
accrued,
|
|
140
184
|
drawing: drawing === null ? null : Object.freeze(drawing),
|
|
141
|
-
closing:
|
|
185
|
+
closing: accrued * factor,
|
|
142
186
|
});
|
|
143
187
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
188
|
+
/**
|
|
189
|
+
* The leaver index adjustment for the year the member leaves in
|
|
190
|
+
* (Sch 9 para 3): the in-service rate for that year's Order, from the
|
|
191
|
+
* same series every other year's uplift reads, times the months
|
|
192
|
+
* served over 12, and never below zero. It applies to the whole
|
|
193
|
+
* accrued balance, the final part-year's slice included (paras 5
|
|
194
|
+
* and 28(2)).
|
|
195
|
+
*/
|
|
196
|
+
function leaverAdjustmentFor(year, prices, exitDate, months) {
|
|
197
|
+
const inService = upliftsFor('active', prices.cpiFor)(year);
|
|
198
|
+
return {
|
|
199
|
+
on: exitDate,
|
|
200
|
+
percent: Math.max(0, inService.percent * months / MONTHS_PER_YEAR),
|
|
201
|
+
months,
|
|
202
|
+
from: inService.from,
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* When a row's accrual is settled: the scheme year end, or for the
|
|
207
|
+
* row a member leaves in, the last day of service. Never before that
|
|
208
|
+
* row's own April uplift, which the accrued figure already carries:
|
|
209
|
+
* a member leaving on 3 April 2025 is read after the 6 April Order.
|
|
210
|
+
*/
|
|
211
|
+
function settlementOf(row) {
|
|
212
|
+
const leftOn = row.leaverAdjustment?.on;
|
|
213
|
+
if (leftOn === undefined)
|
|
214
|
+
return schemeYearEndDate(row.schemeYearEnd);
|
|
215
|
+
const upliftOn = row.uplift?.appliedOn;
|
|
216
|
+
return upliftOn !== undefined && upliftOn > leftOn ? upliftOn : leftOn;
|
|
168
217
|
}
|
|
169
218
|
/**
|
|
170
219
|
* The read side, over rows already walked.
|
|
@@ -182,27 +231,24 @@ function readerOver(frozen, seed) {
|
|
|
182
231
|
* beginning instead — the balance is the seed's, and the seed
|
|
183
232
|
* is a figure at a stated date.
|
|
184
233
|
*
|
|
185
|
-
*
|
|
186
|
-
* earlier
|
|
187
|
-
*
|
|
188
|
-
* January 2024 read £3,849 in today's money where one who
|
|
189
|
-
* left in January 2025 read £3,607, off the same statement.
|
|
190
|
-
* Monotonic nonsense, and in the one regime where it shows —
|
|
191
|
-
* a statement issued after the member had already left.
|
|
234
|
+
* So a date before the seed reads the seed's own year end, and
|
|
235
|
+
* an earlier leaving date cannot read higher off the same
|
|
236
|
+
* statement than a later one.
|
|
192
237
|
*/
|
|
193
238
|
const answerableAt = (date) => date < startsAt ? startsAt : date;
|
|
194
239
|
/** Replay the steps up to `date`. `preDrawing` reads the row
|
|
195
|
-
* carrying the retirement event at its pre-factor value.
|
|
240
|
+
* carrying the retirement event at its pre-factor value. A row
|
|
241
|
+
* the member leaves in settles on the last day of service, not
|
|
242
|
+
* at its scheme year end. */
|
|
196
243
|
const walkTo = (date, preDrawing) => {
|
|
197
244
|
let value = seed.opening;
|
|
198
245
|
for (const row of frozen) {
|
|
199
246
|
if (row.uplift !== null && row.uplift.appliedOn <= date) {
|
|
200
247
|
value = row.revalued;
|
|
201
248
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
: row.closing;
|
|
249
|
+
const settlesOn = settlementOf(row);
|
|
250
|
+
if (settlesOn <= date) {
|
|
251
|
+
value = preDrawing ? row.accrued : row.closing;
|
|
206
252
|
}
|
|
207
253
|
}
|
|
208
254
|
return value;
|
|
@@ -222,21 +268,4 @@ function readerOver(frozen, seed) {
|
|
|
222
268
|
earningsRows: () => frozen.filter((row) => row.pensionableEarnings !== null),
|
|
223
269
|
});
|
|
224
270
|
}
|
|
225
|
-
/**
|
|
226
|
-
* The pension at the drawing, before and after its factor, read off
|
|
227
|
-
* the row the drawing falls in.
|
|
228
|
-
*
|
|
229
|
-
* There is no such row when the drawing falls at or before the seed's
|
|
230
|
-
* own year end — a member handing over a balance and drawing it the
|
|
231
|
-
* same day — and there is still an answer: the balance they handed
|
|
232
|
-
* over, with the factor applied here instead of on a row.
|
|
233
|
-
*/
|
|
234
|
-
export function atDrawing(ledger, drawing, factor) {
|
|
235
|
-
const row = ledger.years.find((r) => r.schemeYearEnd === schemeYearEndFor(drawing));
|
|
236
|
-
if (row === undefined) {
|
|
237
|
-
const revalued = ledger.accruedAt(drawing);
|
|
238
|
-
return { revalued, drawn: revalued * factor };
|
|
239
|
-
}
|
|
240
|
-
return { revalued: row.revalued + row.earned, drawn: row.closing };
|
|
241
|
-
}
|
|
242
271
|
//# sourceMappingURL=ledger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ledger.js","sourceRoot":"","sources":["../../src/pension/ledger.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ledger.js","sourceRoot":"","sources":["../../src/pension/ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AACvC,OAAO,EAAC,QAAQ,EAAE,kBAAkB,EAAE,eAAe,EAAC,MAAM,aAAa,CAAC;AAQ1E,OAAO,EAAC,gBAAgB,EAAE,OAAO,EAAE,UAAU,EAAC,MAAM,aAAa,CAAC;AAElE,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,WAAW,CAAC;AA6KnB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,CAAC;AAEnC;6DAC6D;AAC7D,MAAM,YAAY,GAAG;IACnB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;CACJ,CAAC;AAMX;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,GAAW;IACjC,OAAO,GAAG,EAAE,CAAC,CAAC,EAAC,GAAG,EAAE,KAAK,EAAE,YAAY,CAAC,OAAO,EAAC,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,GAAkB;IAC5C,MAAM,EAAC,IAAI,EAAE,QAAQ,EAAE,cAAc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AAG,EAAE,EAAE,CAAC,GAAG,CAAC,mBAAmB,KAAK,IAAI,CAAC;KAC3D,CAAC,CAAC;AACL,CAAC"}
|
package/dist/pension/prices.d.ts
CHANGED
|
@@ -1,48 +1,40 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* A run's price series: the CPI each scheme year revalues at, and
|
|
3
|
+
* the conversion of the caller's pay into a given year's money.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* scheme year, and expressing the caller's pay in the money of
|
|
7
|
-
* a given scheme year, which is that same rate applied.
|
|
5
|
+
* ── Today's money is a run, not a deflation ─────────
|
|
8
6
|
*
|
|
9
|
-
*
|
|
7
|
+
* Today's money is the SAME projection run with the inflation
|
|
8
|
+
* assumption set to zero, so the pension revalues at 1.5% a year
|
|
9
|
+
* while a member is paying in and not at all once they are
|
|
10
|
+
* deferred. The model runs twice and pairs the two readings;
|
|
11
|
+
* neither one is derived from the other.
|
|
10
12
|
*
|
|
11
|
-
*
|
|
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
|
|
13
|
+
* Dividing a CPI + 1.5 projection by CPI would give
|
|
20
14
|
* 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
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
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.
|
|
15
|
+
* points are added before the growth and then eaten into by the
|
|
16
|
+
* same year's inflation. Running at zero gives 1.5% flat, which
|
|
17
|
+
* is what the scheme's own rule reduces to when inflation is
|
|
18
|
+
* ignored. It also leaves a stated balance exactly as stated, by
|
|
19
|
+
* construction: at zero there is nothing to restate it by.
|
|
33
20
|
*
|
|
34
21
|
* An uplift rule reads whatever entry it is handed and carries
|
|
35
22
|
* it through to its receipt; it never branches on whether the
|
|
36
|
-
* figure was measured or assumed.
|
|
37
|
-
*
|
|
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.
|
|
23
|
+
* figure was measured or assumed. WHICH entry is this module's
|
|
24
|
+
* choice, made once per series:
|
|
42
25
|
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
26
|
+
* - `createPrices` hands out the assumption for every year. The
|
|
27
|
+
* today's-money run is always this series at zero: an Order is
|
|
28
|
+
* a nominal rate, and one applied inside that run puts a whole
|
|
29
|
+
* year of CPI into a reading defined to contain none
|
|
30
|
+
* (https://github.com/casomoltd/nhs-pay/issues/13).
|
|
31
|
+
* - `createPublishedPrices` is the CASH run as a member's Annual
|
|
32
|
+
* Benefit Statement prints it. A year a Revaluation Order
|
|
33
|
+
* covers takes that Order, SI and all, and a past year's pay
|
|
34
|
+
* is carried into its own year's cash by the same Orders' CPI.
|
|
35
|
+
* Both halves are nominal, so the Order applies to a balance
|
|
36
|
+
* in the money it was written for. Beyond the published record
|
|
37
|
+
* it is the assumption, as above.
|
|
46
38
|
*/
|
|
47
39
|
/** One year of the September CPI series, and where it came from. */
|
|
48
40
|
export interface CpiEntry {
|
|
@@ -66,31 +58,28 @@ export interface CpiEntry {
|
|
|
66
58
|
* stays the caller's question and never the rule's. A projection
|
|
67
59
|
* makes that choice exactly once, in `openingUpliftFor`. */
|
|
68
60
|
export type CpiSource = (schemeYearEnd: number) => CpiEntry;
|
|
69
|
-
/** The
|
|
70
|
-
* that follow from it.
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
* answer to a question already answered. */
|
|
61
|
+
/** The CPI a projection revalues at, and the money readings
|
|
62
|
+
* that follow from it. The published record itself is
|
|
63
|
+
* `revaluation.ts`'s: a series here reads it through
|
|
64
|
+
* `revaluationFor` and never holds a copy. */
|
|
74
65
|
export interface Prices {
|
|
75
66
|
/**
|
|
76
|
-
*
|
|
77
|
-
*
|
|
67
|
+
* The CPI a scheme year revalues at in this series: the
|
|
68
|
+
* caller's assumption, or in a published-history series the
|
|
69
|
+
* Order that set it, its SI carried on the entry.
|
|
78
70
|
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* header, and `openingUpliftFor`, which is where a projection
|
|
83
|
-
* reaches for it.
|
|
71
|
+
* The ONLY rate a projection uses, for every uplift after its
|
|
72
|
+
* seed — see the header, and `openingUpliftFor`, which is where
|
|
73
|
+
* a projection reaches for it.
|
|
84
74
|
*/
|
|
85
|
-
|
|
75
|
+
cpiFor: CpiSource;
|
|
86
76
|
/**
|
|
87
77
|
* The caller's pay, given in today's money, expressed in the
|
|
88
78
|
* cash of `asAt`.
|
|
89
79
|
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
* anything having to enforce it.
|
|
80
|
+
* At a zero assumption and no published history it is the
|
|
81
|
+
* identity, which is exactly why the today's-money run credits
|
|
82
|
+
* `pay / 54` every year without anything having to enforce it.
|
|
94
83
|
*/
|
|
95
84
|
payAt(todaysMoney: number, asAt: Date): number;
|
|
96
85
|
/** The date this run's today's-money readings are anchored
|
|
@@ -100,7 +89,10 @@ export interface Prices {
|
|
|
100
89
|
readonly asOf: Date;
|
|
101
90
|
/**
|
|
102
91
|
* An amount stated on one date, expressed in the money of
|
|
103
|
-
* another
|
|
92
|
+
* another, always at the caller's assumption. In `createPrices`
|
|
93
|
+
* `payAt` is this with `from` pinned to the run date; in
|
|
94
|
+
* `createPublishedPrices` it is not, because past pay there
|
|
95
|
+
* steps by the Orders and a fixed amount does not.
|
|
104
96
|
*
|
|
105
97
|
* NARROW BY INTENT, and read the header above before reaching
|
|
106
98
|
* for it. It carries an EXTERNALLY FIXED cash amount — a
|
|
@@ -115,6 +107,9 @@ export interface Prices {
|
|
|
115
107
|
*/
|
|
116
108
|
valueAt(amount: number, from: Date, to: Date): number;
|
|
117
109
|
}
|
|
110
|
+
/** The CPI a today's-money run assumes, as a decimal: none, so every
|
|
111
|
+
* figure is read in the money of the run date. */
|
|
112
|
+
export declare const TODAYS_MONEY_CPI = 0;
|
|
118
113
|
/**
|
|
119
114
|
* How much more a pound of `asAt` money is than a pound of
|
|
120
115
|
* `from` money, under the caller's assumption.
|
|
@@ -123,10 +118,9 @@ export interface Prices {
|
|
|
123
118
|
* a scheme year and the pot moves once a year, so a ruler that
|
|
124
119
|
* compounded smoothly would drift against both inside every
|
|
125
120
|
* year. The steps are the days the Orders actually land, read
|
|
126
|
-
* from the table: 1 April through 2022, 6 April after
|
|
127
|
-
*
|
|
128
|
-
* side of
|
|
129
|
-
* happened.
|
|
121
|
+
* from the table: 1 April through 2022, 6 April after, so a
|
|
122
|
+
* date between the two Aprils of any year is read on the right
|
|
123
|
+
* side of that year's step.
|
|
130
124
|
*
|
|
131
125
|
* Symmetric, so a year behind the run date is divided by
|
|
132
126
|
* exactly what a year ahead is multiplied by, and a caller
|
|
@@ -144,3 +138,26 @@ export declare function inflationFactor(asAt: Date, from: Date, assumedCpi: numb
|
|
|
144
138
|
* date the module needs.
|
|
145
139
|
*/
|
|
146
140
|
export declare function createPrices(assumedCpi: number, asOf: Date): Prices;
|
|
141
|
+
/**
|
|
142
|
+
* The price series of a cash run read the way an Annual Benefit
|
|
143
|
+
* Statement is: the published record wherever it exists, the
|
|
144
|
+
* caller's assumption beyond it.
|
|
145
|
+
*
|
|
146
|
+
* ONE per-year answer, `publishedCpiFor`, serves both halves, so
|
|
147
|
+
* the pot and the pay can never disagree about which years are
|
|
148
|
+
* published:
|
|
149
|
+
*
|
|
150
|
+
* - a year's uplift is its Order's CPI, SI on the entry;
|
|
151
|
+
* - pay is carried between the run date and any other date, in
|
|
152
|
+
* either direction, by the CPI of each Order landing between
|
|
153
|
+
* them, on the days the pot moves. The promotional curve that
|
|
154
|
+
* built the pay path measures growth ABOVE general pay, so the
|
|
155
|
+
* general half is still missing, and prices stand in for it.
|
|
156
|
+
* That reads pay as having kept pace with prices, which the pay
|
|
157
|
+
* awards of these years did not exactly do: it is the one
|
|
158
|
+
* estimate here, and the Orders themselves are the record.
|
|
159
|
+
*
|
|
160
|
+
* `valueAt` stays the assumption's: it carries an externally
|
|
161
|
+
* fixed amount between dates, which is not pay.
|
|
162
|
+
*/
|
|
163
|
+
export declare function createPublishedPrices(assumedCpi: number, asOf: Date): Prices;
|