@casomoltd/nhs-pay 0.10.4 → 0.11.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/dist/format.d.ts CHANGED
@@ -15,5 +15,13 @@ export declare function fmtMoney(n: number): string;
15
15
  export declare function fmtPct(n: number): string;
16
16
  /** Format as 8.3% (Intl, input is whole %). */
17
17
  export declare function formatPct(n: number): string;
18
+ /**
19
+ * Format to two decimal places where they carry signal,
20
+ * trailing zeros trimmed — 0.08%, 23.7% (Intl, input is
21
+ * whole %). The 1dp formatters round the NHS employer
22
+ * admin levy (0.08%) up to 0.1%, misstating a published
23
+ * rate; small rates format through this one.
24
+ */
25
+ export declare function formatPctPrecise(n: number): string;
18
26
  /** '2025-26' → '2025/26' */
19
27
  export declare function yearLabel(year: TaxYear): string;
package/dist/format.js CHANGED
@@ -19,6 +19,10 @@ const pctFormat = new Intl.NumberFormat('en-GB', {
19
19
  minimumFractionDigits: 1,
20
20
  maximumFractionDigits: 1,
21
21
  });
22
+ const pctPreciseFormat = new Intl.NumberFormat('en-GB', {
23
+ style: 'percent',
24
+ maximumFractionDigits: 2,
25
+ });
22
26
  // ── Currency ────────────────────────────────────
23
27
  /** Exact salary with £ sign — £31,049 */
24
28
  export function fmtSalary(n) {
@@ -47,6 +51,16 @@ export function fmtPct(n) {
47
51
  export function formatPct(n) {
48
52
  return pctFormat.format(n / 100);
49
53
  }
54
+ /**
55
+ * Format to two decimal places where they carry signal,
56
+ * trailing zeros trimmed — 0.08%, 23.7% (Intl, input is
57
+ * whole %). The 1dp formatters round the NHS employer
58
+ * admin levy (0.08%) up to 0.1%, misstating a published
59
+ * rate; small rates format through this one.
60
+ */
61
+ export function formatPctPrecise(n) {
62
+ return pctPreciseFormat.format(n / 100);
63
+ }
50
64
  // ── Tax year labels ─────────────────────────────
51
65
  /** '2025-26' → '2025/26' */
52
66
  export function yearLabel(year) {
@@ -1 +1 @@
1
- {"version":3,"file":"format.js","sourceRoot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AC7C,MAAM,UAAU,SAAS,CAAC,CAAS;IACjC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAC7B,CAAC;AAED,yCAAyC;AACzC,MAAM,UAAU,gBAAgB,CAC9B,CAAS;IAET,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,8BAA8B;AAC9B,MAAM,UAAU,QAAQ,CAAC,CAAS;IAChC,OAAO,CACL,QAAQ;UACN,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CACxC,CAAC;AACJ,CAAC;AAED,mDAAmD;AAEnD,sCAAsC;AACtC,MAAM,UAAU,MAAM,CAAC,CAAS;IAC9B,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;AAC5B,CAAC;AAED,+CAA+C;AAC/C,MAAM,UAAU,SAAS,CAAC,CAAS;IACjC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;AACnC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,CAAS;IACxC,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;AAC1C,CAAC;AAED,mDAAmD;AAEnD,4BAA4B;AAC5B,MAAM,UAAU,SAAS,CAAC,IAAa;IACrC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAChC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -15,9 +15,12 @@ export { DENTAL_GRADES, DENTAL_GRADE_IDS, DENTAL_TAX_YEARS, getDentalScales, } f
15
15
  export type { DentalGradeId, DentalGradeMeta, } from './dental-scales.js';
16
16
  export { AwardUnavailable, PensionTiersUnavailable, RetirementFactorOutOfRange, ScaleUnavailable, } from './errors.js';
17
17
  export { afcAward } from './award.js';
18
- export { ACCRUAL_RATE, COMMUTATION_FACTOR, commute, maxLumpSum, projectPension, retirementFactor, yearlyAccrual, } from './pension-projection.js';
19
- export type { FactorTableKind, } from './gad/factor-table.js';
20
- export type { CommutationResult, PensionEstimationInput, PensionProjectionInput, PensionProjectionResult, PensionStatementInput, ProjectionPoint, } from './pension-projection.js';
18
+ export { ACTIVE_REVAL_BONUS_PCT, IN_SERVICE_REVALUATION, revaluationFor, } from './revaluation.js';
19
+ export type { RevaluationYear } from './revaluation.js';
20
+ export { ACCRUAL_RATE, COMMUTATION_FACTOR, commute, factorProvenance, maxLumpSum, projectPension, retirementFactor, yearlyAccrual, } from './pension-projection.js';
21
+ export type { FactorProvenance, FactorTableKind, } from './gad/factor-table.js';
22
+ export { normalPensionAge } from './npa.js';
23
+ export type { CommutationResult, PensionEstimationInput, PensionProjectionInput, PensionProjectionResult, PensionStatementInput, ProjectionMoney, ProjectionPoint, } from './pension-projection.js';
21
24
  export { HCAS_ZONE_IDS, calculateHcasSupplement, grossSalary, isHcasZoneId, } from './hcas.js';
22
25
  export type { HcasZoneId } from './hcas.js';
23
26
  export { getHcasPcts, getHcasZone, } from './hcas-pcts.js';
@@ -28,6 +31,6 @@ export { AFC_CURRENT_YEAR, AFC_PREVIOUS_YEAR, getAfcScales, } from './bands.js';
28
31
  export type { AfcBandMeta, AfcScaleData, } from './bands.js';
29
32
  export { nhsTakeHome } from './take-home.js';
30
33
  export type { NhsTakeHomeOptions } from './take-home.js';
31
- export { fmtMoney, fmtPct, fmtSalary, formatGBP, formatGBPPrecise, formatPct, yearLabel, } from './format.js';
34
+ export { fmtMoney, fmtPct, fmtSalary, formatGBP, formatGBPPrecise, formatPct, formatPctPrecise, yearLabel, } from './format.js';
32
35
  export { TAX_REGIONS, TAX_YEARS, NATIONS, NATION_KEYS, TakeHomePay, GrossAnnual, PensionBasis, PensionPercent, StudentLoanPlan, nationToTaxRegion, getTaxYearConfig, hoursPerYear, } from '@casomoltd/paye-calc';
33
36
  export type { Nation, TaxRegion, TaxYear, } from '@casomoltd/paye-calc';
package/dist/index.js CHANGED
@@ -12,15 +12,20 @@ export { DENTAL_GRADES, DENTAL_GRADE_IDS, DENTAL_TAX_YEARS, getDentalScales, } f
12
12
  export { AwardUnavailable, PensionTiersUnavailable, RetirementFactorOutOfRange, ScaleUnavailable, } from './errors.js';
13
13
  // ── AfC pay award ────────────────────────────────
14
14
  export { afcAward } from './award.js';
15
+ export { ACTIVE_REVAL_BONUS_PCT, IN_SERVICE_REVALUATION, revaluationFor, } from './revaluation.js';
15
16
  // ── Pension Projection ─────────────────────────────
16
17
  // Deliberate surface: the scenario-level API plus
17
18
  // yearlyAccrual (hub-site builds its pension-growth
18
19
  // chart from it). Date plumbing (periodInYearsMonths,
19
20
  // npaDate), raw maths (revalue), and factor-table
20
- // internals stay private — factors are reachable solely
21
- // through retirementFactor/projectPension, which own
22
- // the GAD rounding rules.
23
- export { ACCRUAL_RATE, COMMUTATION_FACTOR, commute, maxLumpSum, projectPension, retirementFactor, yearlyAccrual, } from './pension-projection.js';
21
+ // internals stay private — factor VALUES are reachable
22
+ // solely through retirementFactor/projectPension, which
23
+ // own the GAD rounding rules; factor PROVENANCE is data
24
+ // (factorProvenance), so consumers cite it, never
25
+ // hand-type it.
26
+ export { ACCRUAL_RATE, COMMUTATION_FACTOR, commute, factorProvenance, maxLumpSum, projectPension, retirementFactor, yearlyAccrual, } from './pension-projection.js';
27
+ // ── Normal pension age ───────────────────────────────
28
+ export { normalPensionAge } from './npa.js';
24
29
  // ── HCAS ─────────────────────────────────────────
25
30
  export { HCAS_ZONE_IDS, calculateHcasSupplement, grossSalary, isHcasZoneId, } from './hcas.js';
26
31
  // ── HCAS PCTs ────────────────────────────────────
@@ -32,7 +37,7 @@ export { AFC_CURRENT_YEAR, AFC_PREVIOUS_YEAR, getAfcScales, } from './bands.js';
32
37
  // ── Take-home ────────────────────────────────────
33
38
  export { nhsTakeHome } from './take-home.js';
34
39
  // ── Format ───────────────────────────────────────
35
- export { fmtMoney, fmtPct, fmtSalary, formatGBP, formatGBPPrecise, formatPct, yearLabel, } from './format.js';
40
+ export { fmtMoney, fmtPct, fmtSalary, formatGBP, formatGBPPrecise, formatPct, formatPctPrecise, yearLabel, } from './format.js';
36
41
  // ── Re-exports from paye-calc ────────────────────
37
42
  // Types that appear in our public API so consumers
38
43
  // don't need a direct paye-calc import for NHS work.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,OAAO,EACL,SAAS,EACT,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,cAAc,EACd,eAAe,EACf,eAAe,GAChB,MAAM,aAAa,CAAC;AAQrB,oDAAoD;AACpD,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,MAAM,cAAc,CAAC;AAStB,oDAAoD;AACpD,OAAO,EAAC,IAAI,EAAE,cAAc,EAAC,MAAM,WAAW,CAAC;AAU/C,OAAO,EAAC,WAAW,EAAE,cAAc,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAS3E,oDAAoD;AACpD,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAK5B,oDAAoD;AACpD,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,0BAA0B,EAC1B,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB,oDAAoD;AACpD,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEpC,sDAAsD;AACtD,kDAAkD;AAClD,oDAAoD;AACpD,sDAAsD;AACtD,kDAAkD;AAClD,wDAAwD;AACxD,qDAAqD;AACrD,0BAA0B;AAC1B,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,OAAO,EACP,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,aAAa,GACd,MAAM,yBAAyB,CAAC;AAajC,oDAAoD;AACpD,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,WAAW,EACX,YAAY,GACb,MAAM,WAAW,CAAC;AAGnB,oDAAoD;AACpD,OAAO,EACL,WAAW,EACX,WAAW,GACZ,MAAM,gBAAgB,CAAC;AAGxB,oDAAoD;AACpD,OAAO,EACL,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,QAAQ,EACR,aAAa,GACd,MAAM,cAAc,CAAC;AAMtB,oDAAoD;AACpD,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,GACb,MAAM,YAAY,CAAC;AAMpB,oDAAoD;AACpD,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAG3C,oDAAoD;AACpD,OAAO,EACL,QAAQ,EACR,MAAM,EACN,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,SAAS,GACV,MAAM,aAAa,CAAC;AAErB,oDAAoD;AACpD,mDAAmD;AACnD,qDAAqD;AACrD,OAAO,EACL,WAAW,EACX,SAAS,EACT,OAAO,EACP,WAAW,EACX,WAAW,EACX,WAAW,EACX,YAAY,EACZ,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,GACb,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,OAAO,EACL,SAAS,EACT,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,cAAc,EACd,eAAe,EACf,eAAe,GAChB,MAAM,aAAa,CAAC;AAQrB,oDAAoD;AACpD,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,MAAM,c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R,aAAa,GACd,MAAM,cAAc,CAAC;AAMtB,oDAAoD;AACpD,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,GACb,MAAM,YAAY,CAAC;AAMpB,oDAAoD;AACpD,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAG3C,oDAAoD;AACpD,OAAO,EACL,QAAQ,EACR,MAAM,EACN,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,gBAAgB,EAChB,SAAS,GACV,MAAM,aAAa,CAAC;AAErB,oDAAoD;AACpD,mDAAmD;AACnD,qDAAqD;AACrD,OAAO,EACL,WAAW,EACX,SAAS,EACT,OAAO,EACP,WAAW,EACX,WAAW,EACX,WAAW,EACX,YAAY,EACZ,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,GACb,MAAM,sBAAsB,CAAC"}
package/dist/npa.d.ts ADDED
@@ -0,0 +1,28 @@
1
+ /**
2
+ * NHS 2015 scheme normal pension age.
3
+ *
4
+ * NPA = the member's State Pension age, with a floor of 65
5
+ * (NHSBSA 2015 Members' Guide V13, May 2024). The SPA timetable
6
+ * is legislated — Pensions Acts 1995/2007/2011/2014 — and
7
+ * reproduced in gov.uk's "State Pension age timetable"
8
+ * (last updated 15 May 2014; the legislated dates have not
9
+ * changed since — the 2023 SPA review left them as enacted).
10
+ *
11
+ * Whole years only. The Acts phase each rise through narrow
12
+ * transitional birth cohorts whose exact SPA is 65/66/67 plus
13
+ * some months; this function returns the NEXT whole year for
14
+ * those cohorts (66/67/68). Rounding up is member-conservative,
15
+ * in the same spirit as the ERF part-month round-up (GAD 2019
16
+ * guidance §2.3): a projection anchored on the later NPA can
17
+ * understate early-retirement pension by a few months' factor,
18
+ * never overstate it. Callers needing month-exact SPA for the
19
+ * transitional cohorts need the per-cohort tables in the Acts,
20
+ * which this library deliberately does not transcribe.
21
+ */
22
+ /**
23
+ * Normal pension age for a 2015-scheme member born on
24
+ * `dateOfBirth`, in whole years (see the module header for the
25
+ * transitional-cohort rounding). The result is what
26
+ * `projectPension` expects as its `npa` input.
27
+ */
28
+ export declare function normalPensionAge(dateOfBirth: Date): number;
package/dist/npa.js ADDED
@@ -0,0 +1,60 @@
1
+ /**
2
+ * NHS 2015 scheme normal pension age.
3
+ *
4
+ * NPA = the member's State Pension age, with a floor of 65
5
+ * (NHSBSA 2015 Members' Guide V13, May 2024). The SPA timetable
6
+ * is legislated — Pensions Acts 1995/2007/2011/2014 — and
7
+ * reproduced in gov.uk's "State Pension age timetable"
8
+ * (last updated 15 May 2014; the legislated dates have not
9
+ * changed since — the 2023 SPA review left them as enacted).
10
+ *
11
+ * Whole years only. The Acts phase each rise through narrow
12
+ * transitional birth cohorts whose exact SPA is 65/66/67 plus
13
+ * some months; this function returns the NEXT whole year for
14
+ * those cohorts (66/67/68). Rounding up is member-conservative,
15
+ * in the same spirit as the ERF part-month round-up (GAD 2019
16
+ * guidance §2.3): a projection anchored on the later NPA can
17
+ * understate early-retirement pension by a few months' factor,
18
+ * never overstate it. Callers needing month-exact SPA for the
19
+ * transitional cohorts need the per-cohort tables in the Acts,
20
+ * which this library deliberately does not transcribe.
21
+ */
22
+ import { invariant } from './errors.js';
23
+ /**
24
+ * 2015 scheme floor (Members' Guide V13). Everyone born before
25
+ * the first band below has SPA ≤ 65 (women's pre-equalisation
26
+ * SPA was lower still), so the floor is their NPA.
27
+ */
28
+ const NPA_FLOOR = 65;
29
+ /**
30
+ * Each band starts where the timetable first exceeds the
31
+ * previous whole year; the value is that rise's target age.
32
+ * Boundaries are dates of birth from gov.uk's timetable:
33
+ * - 6 Dec 1953 — first cohort with SPA above 65
34
+ * (Pensions Act 2011; phased to 6 Oct 1954, then exactly 66)
35
+ * - 6 Apr 1960 — first cohort above 66, "66 years and 1 month"
36
+ * (Pensions Act 2014; phased to 5 Mar 1961, then exactly 67)
37
+ * - 6 Apr 1977 — first cohort above 67
38
+ * (Pensions Act 2007; phased to 5 Apr 1978, then exactly 68)
39
+ */
40
+ const SPA_BANDS = [
41
+ { from: new Date(1953, 11, 6), npa: 66 },
42
+ { from: new Date(1960, 3, 6), npa: 67 },
43
+ { from: new Date(1977, 3, 6), npa: 68 },
44
+ ];
45
+ /**
46
+ * Normal pension age for a 2015-scheme member born on
47
+ * `dateOfBirth`, in whole years (see the module header for the
48
+ * transitional-cohort rounding). The result is what
49
+ * `projectPension` expects as its `npa` input.
50
+ */
51
+ export function normalPensionAge(dateOfBirth) {
52
+ invariant(!Number.isNaN(dateOfBirth.getTime()), 'normalPensionAge: invalid dateOfBirth');
53
+ let npa = NPA_FLOOR;
54
+ for (const band of SPA_BANDS) {
55
+ if (dateOfBirth >= band.from)
56
+ npa = band.npa;
57
+ }
58
+ return npa;
59
+ }
60
+ //# sourceMappingURL=npa.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"npa.js","sourceRoot":"","sources":["../src/npa.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC;;;;GAIG;AACH,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB;;;;;;;;;;GAUG;AACH,MAAM,SAAS,GAAG;IAChB,EAAC,IAAI,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAC;IACtC,EAAC,IAAI,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAC;IACrC,EAAC,IAAI,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAC;CAC7B,CAAC;AAEX;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,WAAiB;IAChD,SAAS,CACP,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,EACpC,uCAAuC,CACxC,CAAC;IACF,IAAI,GAAG,GAAG,SAAS,CAAC;IACpB,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;QAC7B,IAAI,WAAW,IAAI,IAAI,CAAC,IAAI;YAAE,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;IAC/C,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -26,18 +26,95 @@
26
26
  * → Deferred revaluation: CPI only
27
27
  * → In-payment revaluation: CPI (Pensions Increase Order)
28
28
  *
29
+ * ── Which ruler this projects in ────────────────────
30
+ *
31
+ * Everything here is computed in TODAY'S MONEY, and cash
32
+ * terms are that figure scaled by CPI. This is not a
33
+ * presentation choice: every promise the 2015 scheme makes is
34
+ * expressed RELATIVE to CPI (in service CPI + 1.5%, deferred
35
+ * and in payment CPI exactly), so with pay holding its value
36
+ * the scheme's real behaviour is CPI-free — +1.5% a year
37
+ * while you pay in, flat once you stop. Only the translation
38
+ * to cash reads `assumedCpi`.
39
+ *
40
+ * Projecting in cash instead requires growing pay at CPI to
41
+ * stay self-consistent. Holding pay flat in CASH while
42
+ * revaluing the pot at CPI + 1.5% — the shape this module
43
+ * used to have — counts inflation twice on historic service:
44
+ * it treats a salary from ten years ago as worth today's
45
+ * number in today's prices, then revalues the pension it
46
+ * bought as though it were not.
47
+ *
48
+ * The scaling between the two rulers is exact, not an
49
+ * approximation. In service the cash pot grows (1+cpi)(1.015)
50
+ * while the slice it adds grows (1+cpi); deferred and in
51
+ * payment both grow at CPI. The (1+cpi)^t factor therefore
52
+ * divides out of every term, so ONE projection serves both
53
+ * rulers and the two can never disagree.
54
+ *
29
55
  * NHSBSA Key Notes — 2015 Scheme Estimates (V2), March 2025
30
56
  * → Commutation rate: £12 lump sum per £1 pension
31
57
  * → HMRC 25% cap on lump sum
58
+ *
59
+ * ── Checked against a real statement ────────────────
60
+ *
61
+ * Reconciled line by line against a member's NHS Annual
62
+ * Benefit Statement (2015 Section, updated to 31/03/2025;
63
+ * name and membership number redacted):
64
+ * https://drive.google.com/file/d/1UJ8FIXC-6JbLOHIHZ3fbvqBLyTG-noL3/view
65
+ *
66
+ * The accrual rate, the in-service revaluation, the HMRC
67
+ * lump-sum cap and the commutation residual all reproduced
68
+ * it. No figure from it is recorded here — the earnings
69
+ * beside those rates are the member's and stay out.
70
+ *
71
+ * It settled the ORDER of the accrual loop, previously an
72
+ * untested assumption: a year's slice is added AFTER the pot
73
+ * is revalued, never before, so a slice earns no revaluation
74
+ * in the scheme year it is earned. The other order overstated
75
+ * that statement by 3.2%, and every internal test still
76
+ * passed. `simulateAccrual` is written in that order and
77
+ * `revaluation never touches the year's own slice` holds it
78
+ * there.
79
+ *
80
+ * ── Added, not compounded ───────────────────────────
81
+ *
82
+ * The scheme ADDS CPI and 1.5 PERCENTAGE POINTS: 3.1% CPI
83
+ * gives 4.6%, which is what the Treasury Order made and what
84
+ * the statement above shows. revaluation.ts carries every
85
+ * published year with its SI.
86
+ *
87
+ * This module compounds — a flat real rate of 1.5%, which is
88
+ * the multiplicative reading of the same rule and runs about
89
+ * 0.6% high over a full career at 2% CPI. Correcting it makes
90
+ * the real rate cpi-dependent and so costs the property this
91
+ * whole module rests on, which is why it is a decision rather
92
+ * than a fix, taken in the open at
93
+ * https://github.com/casomoltd/nhs-pay/issues/10
94
+ */
95
+ import type { FactorProvenance, FactorTableKind } from './gad/factor-table.js';
96
+ /**
97
+ * One figure in both rulers. Every scalar the projection
98
+ * reports is a pair, so a consumer picks a ruler rather than
99
+ * doing CPI arithmetic of its own — and so it can never apply
100
+ * the wrong horizon to a figure, because each pair was scaled
101
+ * against the date its own figure falls on.
32
102
  */
33
- import type { FactorTableKind } from './gad/factor-table.js';
103
+ export interface ProjectionMoney {
104
+ /** Today's money — the projection's native ruler. */
105
+ readonly real: number;
106
+ /** Actual pounds, at the date this figure falls on. */
107
+ readonly nominal: number;
108
+ }
34
109
  /** A point on the projection curve */
35
110
  export interface ProjectionPoint {
36
111
  /** Age in years (can be fractional) */
37
112
  age: number;
38
- /** Annual pension in nominal £ */
113
+ /** Annual pension in actual £ of that year. Below today's
114
+ * age this is SMALLER than `real`: past pounds bought more. */
39
115
  nominal: number;
40
- /** Annual pension in today's £ (CPI-deflated) */
116
+ /** Annual pension in today's £ — what the projection
117
+ * computes; `nominal` is this scaled by CPI. */
41
118
  real: number;
42
119
  /** Whether this is accrued (known) or projected */
43
120
  accrued: boolean;
@@ -47,6 +124,15 @@ export interface PensionStatementInput {
47
124
  kind: 'statement';
48
125
  /** Accrued pension from Annual Benefit Statement (£/yr) */
49
126
  accruedPension: number;
127
+ /**
128
+ * The date the statement valued that figure at — an ABS
129
+ * carries one ("updated to 31/03/2025"), and it is
130
+ * typically months behind whenever the member reads it.
131
+ * Omit only when the figure really is current: defaulting
132
+ * to `today` silently throws away every month of accrual
133
+ * and revaluation since the statement was issued.
134
+ */
135
+ statementDate?: Date;
50
136
  /** Current pensionable pay */
51
137
  currentSalary: number;
52
138
  dateOfBirth: Date;
@@ -86,17 +172,17 @@ export interface CommutationResult {
86
172
  }
87
173
  /** Full projection result */
88
174
  export interface PensionProjectionResult {
89
- /** Accrued pension at exit date (nominal) */
90
- accruedAtExit: number;
91
- /** After revaluation, before ERF/LRF (nominal) */
92
- revaluedAtRetirement: number;
93
- /** After ERF/LRF (nominal) */
94
- annualPension: number;
175
+ /** Accrued pension at exit date, scaled at the EXIT date */
176
+ accruedAtExit: ProjectionMoney;
177
+ /** After revaluation, before ERF/LRF, at retirement */
178
+ revaluedAtRetirement: ProjectionMoney;
179
+ /** After ERF/LRF, at retirement */
180
+ annualPension: ProjectionMoney;
95
181
  /** ERF or LRF factor applied */
96
182
  factor: number;
97
183
  factorType: FactorTableKind | 'none';
98
- /** Gap between revalued and drawn pension */
99
- adjustmentAmount: number;
184
+ /** Gap between revalued and drawn pension, at retirement */
185
+ adjustmentAmount: ProjectionMoney;
100
186
  /** Curve data for chart (both views) */
101
187
  curve: ProjectionPoint[];
102
188
  /** Whether estimation path was used */
@@ -106,6 +192,14 @@ export interface PensionProjectionResult {
106
192
  export declare const ACCRUAL_RATE: number;
107
193
  /** Commutation: £12 lump sum per £1 pension */
108
194
  export declare const COMMUTATION_FACTOR = 12;
195
+ /**
196
+ * Provenance of the in-force table behind a factor kind — the
197
+ * citation facts (table ref, guidance name, issue date, source
198
+ * PDF) consumers render instead of hand-typing them, so a page
199
+ * showing "GAD factors issued 30 June 2023" updates itself when
200
+ * a later issue supersedes the table above.
201
+ */
202
+ export declare function factorProvenance(kind: FactorTableKind): FactorProvenance;
109
203
  /**
110
204
  * Determine whether ERF or LRF applies and return the
111
205
  * factor. The rounding rules (ERF up §2.3, LRF down §3.4)
@@ -26,9 +26,71 @@
26
26
  * → Deferred revaluation: CPI only
27
27
  * → In-payment revaluation: CPI (Pensions Increase Order)
28
28
  *
29
+ * ── Which ruler this projects in ────────────────────
30
+ *
31
+ * Everything here is computed in TODAY'S MONEY, and cash
32
+ * terms are that figure scaled by CPI. This is not a
33
+ * presentation choice: every promise the 2015 scheme makes is
34
+ * expressed RELATIVE to CPI (in service CPI + 1.5%, deferred
35
+ * and in payment CPI exactly), so with pay holding its value
36
+ * the scheme's real behaviour is CPI-free — +1.5% a year
37
+ * while you pay in, flat once you stop. Only the translation
38
+ * to cash reads `assumedCpi`.
39
+ *
40
+ * Projecting in cash instead requires growing pay at CPI to
41
+ * stay self-consistent. Holding pay flat in CASH while
42
+ * revaluing the pot at CPI + 1.5% — the shape this module
43
+ * used to have — counts inflation twice on historic service:
44
+ * it treats a salary from ten years ago as worth today's
45
+ * number in today's prices, then revalues the pension it
46
+ * bought as though it were not.
47
+ *
48
+ * The scaling between the two rulers is exact, not an
49
+ * approximation. In service the cash pot grows (1+cpi)(1.015)
50
+ * while the slice it adds grows (1+cpi); deferred and in
51
+ * payment both grow at CPI. The (1+cpi)^t factor therefore
52
+ * divides out of every term, so ONE projection serves both
53
+ * rulers and the two can never disagree.
54
+ *
29
55
  * NHSBSA Key Notes — 2015 Scheme Estimates (V2), March 2025
30
56
  * → Commutation rate: £12 lump sum per £1 pension
31
57
  * → HMRC 25% cap on lump sum
58
+ *
59
+ * ── Checked against a real statement ────────────────
60
+ *
61
+ * Reconciled line by line against a member's NHS Annual
62
+ * Benefit Statement (2015 Section, updated to 31/03/2025;
63
+ * name and membership number redacted):
64
+ * https://drive.google.com/file/d/1UJ8FIXC-6JbLOHIHZ3fbvqBLyTG-noL3/view
65
+ *
66
+ * The accrual rate, the in-service revaluation, the HMRC
67
+ * lump-sum cap and the commutation residual all reproduced
68
+ * it. No figure from it is recorded here — the earnings
69
+ * beside those rates are the member's and stay out.
70
+ *
71
+ * It settled the ORDER of the accrual loop, previously an
72
+ * untested assumption: a year's slice is added AFTER the pot
73
+ * is revalued, never before, so a slice earns no revaluation
74
+ * in the scheme year it is earned. The other order overstated
75
+ * that statement by 3.2%, and every internal test still
76
+ * passed. `simulateAccrual` is written in that order and
77
+ * `revaluation never touches the year's own slice` holds it
78
+ * there.
79
+ *
80
+ * ── Added, not compounded ───────────────────────────
81
+ *
82
+ * The scheme ADDS CPI and 1.5 PERCENTAGE POINTS: 3.1% CPI
83
+ * gives 4.6%, which is what the Treasury Order made and what
84
+ * the statement above shows. revaluation.ts carries every
85
+ * published year with its SI.
86
+ *
87
+ * This module compounds — a flat real rate of 1.5%, which is
88
+ * the multiplicative reading of the same rule and runs about
89
+ * 0.6% high over a full career at 2% CPI. Correcting it makes
90
+ * the real rate cpi-dependent and so costs the property this
91
+ * whole module rests on, which is why it is a decision rather
92
+ * than a fix, taken in the open at
93
+ * https://github.com/casomoltd/nhs-pay/issues/10
32
94
  */
33
95
  import { invariant } from './errors.js';
34
96
  import { npaDate, periodInYearsMonths, yearsBetween, } from './dates.js';
@@ -42,12 +104,38 @@ export const ACCRUAL_RATE = 1 / 54;
42
104
  export const COMMUTATION_FACTOR = 12;
43
105
  /** In-service revaluation bonus above CPI */
44
106
  const ACTIVE_REVAL_BONUS = 0.015;
107
+ /**
108
+ * The scheme's promises in today's money. Each is the headline
109
+ * rate MINUS the CPI it is quoted against, which is why none
110
+ * of them mentions `assumedCpi`:
111
+ * - paying in: CPI + 1.5% ⇒ 1.5% real
112
+ * - deferred: CPI ⇒ flat
113
+ * - in payment: CPI ⇒ flat
114
+ * The two flat rates are named rather than inlined because
115
+ * "the pension holds its value" is the scheme's actual
116
+ * guarantee, and a bare 0 reads like an omission.
117
+ */
118
+ const ACTIVE_REAL_RATE = ACTIVE_REVAL_BONUS;
119
+ const DEFERRED_REAL_RATE = 0;
120
+ const IN_PAYMENT_REAL_RATE = 0;
45
121
  // ── Factor Tables ───────────────────────────────────
46
122
  // Which issue is in force is exactly these two constructions —
47
123
  // swap the import when GAD supersedes a table (the two tables
48
124
  // change on different dates, hence one issue file per table).
49
125
  const ERF1 = new FactorTable(ERF_0_420);
50
126
  const LRF1 = new FactorTable(LRF_0_421);
127
+ /**
128
+ * Provenance of the in-force table behind a factor kind — the
129
+ * citation facts (table ref, guidance name, issue date, source
130
+ * PDF) consumers render instead of hand-typing them, so a page
131
+ * showing "GAD factors issued 30 June 2023" updates itself when
132
+ * a later issue supersedes the table above.
133
+ */
134
+ export function factorProvenance(kind) {
135
+ return kind === 'erf'
136
+ ? ERF1.provenance
137
+ : LRF1.provenance;
138
+ }
51
139
  // ── Retirement Factor ───────────────────────────────
52
140
  /**
53
141
  * Determine whether ERF or LRF applies and return the
@@ -120,23 +208,54 @@ export function commute(adjustedPension, fraction) {
120
208
  */
121
209
  export function projectPension(input, today = new Date()) {
122
210
  const resolved = resolveProjection(input, today);
123
- const adjustmentAmount = resolved.revaluedAtRetirement
124
- - resolved.annualPension;
211
+ // Each figure is scaled against ITS OWN date: the exit
212
+ // figure is cash at exit, the retirement ones cash at
213
+ // retirement. Handing consumers a horizon to apply is what
214
+ // let one of them deflate the exit figure over the years to
215
+ // retirement.
216
+ const atExit = (real) => money(resolved, real, resolved.exitDate);
217
+ const atRetirement = (real) => money(resolved, real, resolved.retirementDate);
125
218
  return {
126
- accruedAtExit: resolved.accruedAtExit,
127
- revaluedAtRetirement: resolved.revaluedAtRetirement,
128
- annualPension: resolved.annualPension,
219
+ accruedAtExit: atExit(resolved.accruedAtExit),
220
+ revaluedAtRetirement: atRetirement(resolved.revaluedAtRetirement),
221
+ annualPension: atRetirement(resolved.annualPension),
129
222
  factor: resolved.factor,
130
223
  factorType: resolved.factorType,
131
- adjustmentAmount,
224
+ adjustmentAmount: atRetirement(resolved.revaluedAtRetirement - resolved.annualPension),
132
225
  curve: buildCurve(resolved),
133
226
  isEstimation: resolved.isEstimation,
134
227
  };
135
228
  }
136
229
  // ── Internal Helpers ────────────────────────────────
230
+ /**
231
+ * Today's money → actual pounds at `date`. The exponent is
232
+ * SIGNED: a date in the past scales the figure down, because
233
+ * the same real pension was fewer actual pounds back then.
234
+ */
235
+ function money(resolved, real, date) {
236
+ const years = yearsBetween(resolved.today, date);
237
+ return {
238
+ real,
239
+ nominal: real * Math.pow(1 + resolved.assumedCpi, years),
240
+ };
241
+ }
242
+ /**
243
+ * The inverse of `money`: a figure quoted in the cash of
244
+ * `date`, read in today's money. A date in the PAST scales
245
+ * the figure UP — the same pounds bought more back then.
246
+ */
247
+ function realAt(nominal, date, today, assumedCpi) {
248
+ return nominal
249
+ / Math.pow(1 + assumedCpi, yearsBetween(today, date));
250
+ }
137
251
  /**
138
252
  * Simulate year-by-year accrual with in-service
139
253
  * revaluation over a fractional number of years.
254
+ *
255
+ * The order is load-bearing: the pot is revalued FIRST and
256
+ * the year's slice added after, so a slice earns nothing in
257
+ * the year it is earned. See the statement reconciliation in
258
+ * the module header.
140
259
  */
141
260
  function simulateAccrual(startPension, salary, activeRate, years) {
142
261
  let pension = startPension;
@@ -153,13 +272,13 @@ function simulateAccrual(startPension, salary, activeRate, years) {
153
272
  return pension;
154
273
  }
155
274
  /**
156
- * Nominal accrued pension at a date in the active phase.
157
- * A date at or before the origin degrades to zero years,
158
- * which simulateAccrual returns untouched — so the
275
+ * Accrued pension in today's money at a date in the active
276
+ * phase. A date at or before the origin degrades to zero
277
+ * years, which simulateAccrual returns untouched — so the
159
278
  * statement path's "already past exit" case needs no
160
279
  * special branch.
161
280
  */
162
- function accruedNominalAt(anchor, date) {
281
+ function accruedRealAt(anchor, date) {
163
282
  const years = Math.max(0, yearsBetween(anchor.accrualOrigin, date));
164
283
  return simulateAccrual(anchor.accrualBase, anchor.currentSalary, anchor.activeRate, years);
165
284
  }
@@ -168,18 +287,33 @@ function resolveProjection(input, today) {
168
287
  const { currentSalary, dateOfBirth, exitDate, retirementDate, npa, assumedCpi, } = input;
169
288
  const isEstimation = input.kind === 'estimation';
170
289
  // The accrual anchor is the only residue of kind:
171
- // statement = (ABS figure, today);
290
+ // statement = (ABS figure, the date the ABS valued it);
172
291
  // estimation = (nothing banked, scheme join date).
292
+ //
293
+ // A statement figure is CASH at its own date, so it is read
294
+ // back into today's money before the simulation — which
295
+ // works in today's money throughout — rather than being
296
+ // dropped in as though the two rulers were the same. With
297
+ // the date omitted the conversion is a no-op, so the
298
+ // default costs nothing.
299
+ const statementOrigin = isEstimation
300
+ ? today
301
+ : input.statementDate ?? today;
173
302
  const anchor = {
174
- accrualBase: isEstimation ? 0 : input.accruedPension,
175
- accrualOrigin: isEstimation ? input.joinDate : today,
303
+ accrualBase: isEstimation
304
+ ? 0
305
+ : realAt(input.accruedPension, statementOrigin, today, assumedCpi),
306
+ accrualOrigin: isEstimation
307
+ ? input.joinDate
308
+ : statementOrigin,
176
309
  currentSalary,
177
- activeRate: assumedCpi + ACTIVE_REVAL_BONUS,
310
+ activeRate: ACTIVE_REAL_RATE,
178
311
  };
179
- const accruedAtExit = accruedNominalAt(anchor, exitDate);
180
- // Revalue from exit to retirement (deferred = CPI
181
- // only); revalue self-guards non-positive periods
182
- const revaluedAtRetirement = revalue(accruedAtExit, assumedCpi, yearsBetween(exitDate, retirementDate));
312
+ const accruedAtExit = accruedRealAt(anchor, exitDate);
313
+ // Deferred revaluation is CPI exactly, so in today's money
314
+ // the pension simply holds its value. The call stays to
315
+ // name the phase; revalue self-guards non-positive periods.
316
+ const revaluedAtRetirement = revalue(accruedAtExit, DEFERRED_REAL_RATE, yearsBetween(exitDate, retirementDate));
183
317
  // Apply ERF/LRF
184
318
  const { factor, type: factorType } = retirementFactor(retirementDate, npaDate(dateOfBirth, npa));
185
319
  const annualPension = revaluedAtRetirement * factor;
@@ -199,43 +333,50 @@ function resolveProjection(input, today) {
199
333
  annualPension,
200
334
  };
201
335
  }
202
- /** Build the projection curve at yearly intervals */
336
+ /**
337
+ * Build the projection curve at yearly intervals. The curve
338
+ * begins at the accrual origin — the scheme join date on the
339
+ * estimation path — so the built-up history is on the curve,
340
+ * not just the projection forward (a statement's accrual
341
+ * origin is today: an ABS figure carries no join history).
342
+ */
203
343
  function buildCurve(resolved) {
204
- const { today, dateOfBirth, retirementDate, npa, assumedCpi, } = resolved;
344
+ const { today, dateOfBirth, retirementDate, npa, } = resolved;
205
345
  const points = [];
206
346
  const currentAge = yearsBetween(dateOfBirth, today);
347
+ const originAge = yearsBetween(dateOfBirth, resolved.accrualOrigin);
207
348
  const endAge = Math.max(npa + 5, yearsBetween(dateOfBirth, retirementDate) + 5);
208
- const startAge = Math.floor(currentAge);
349
+ const startAge = Math.floor(Math.min(currentAge, originAge));
209
350
  for (let age = startAge; age <= Math.ceil(endAge); age++) {
210
351
  const pointDate = new Date(dateOfBirth.getFullYear() + age, dateOfBirth.getMonth(), dateOfBirth.getDate());
211
- const yearsFromToday = yearsBetween(today, pointDate);
212
- const { nominal, accrued } = curvePointValue(resolved, pointDate);
213
- const deflator = Math.pow(1 + assumedCpi, Math.max(0, yearsFromToday));
214
- const real = nominal / deflator;
352
+ const { real, accrued } = curvePointValue(resolved, pointDate);
353
+ const { nominal } = money(resolved, real, pointDate);
215
354
  points.push({ age, nominal, real, accrued });
216
355
  }
217
356
  return points;
218
357
  }
219
358
  /**
220
- * Nominal value and accrued flag for one curve point —
359
+ * Today's-money value and accrued flag for one curve point —
221
360
  * names the three lifecycle phases (active, deferred,
222
- * in payment) and nothing else.
361
+ * in payment) and nothing else. The two revalue calls are
362
+ * flat in this ruler, which IS the shape the reader sees:
363
+ * the line rises only while you are paying in.
223
364
  */
224
365
  function curvePointValue(resolved, pointDate) {
225
- const { today, exitDate, retirementDate, assumedCpi, } = resolved;
366
+ const { today, exitDate, retirementDate } = resolved;
226
367
  if (pointDate <= exitDate) {
227
- const nominal = accruedNominalAt(resolved, pointDate);
228
- return { nominal, accrued: pointDate <= today };
368
+ const real = accruedRealAt(resolved, pointDate);
369
+ return { real, accrued: pointDate <= today };
229
370
  }
230
371
  if (pointDate <= retirementDate) {
231
372
  const yrsDeferred = yearsBetween(exitDate, pointDate);
232
- const nominal = revalue(resolved.accruedAtExit, assumedCpi, yrsDeferred);
233
- return { nominal, accrued: false };
373
+ const real = revalue(resolved.accruedAtExit, DEFERRED_REAL_RATE, yrsDeferred);
374
+ return { real, accrued: false };
234
375
  }
235
376
  // In payment — grows from the annualPension the
236
377
  // projection reports, never a re-derivation of it
237
378
  const yrsInPayment = yearsBetween(retirementDate, pointDate);
238
- const nominal = revalue(resolved.annualPension, assumedCpi, yrsInPayment);
239
- return { nominal, accrued: false };
379
+ const real = revalue(resolved.annualPension, IN_PAYMENT_REAL_RATE, yrsInPayment);
380
+ return { real, accrued: false };
240
381
  }
241
382
  //# sourceMappingURL=pension-projection.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pension-projection.js","sourceRoot":"","sources":["../src/pension-projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EACL,OAAO,EACP,mBAAmB,EACnB,YAAY,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAC,SAAS,EAAC,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAC,SAAS,EAAC,MAAM,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ChB,CAAC;AAED;;;;;;GAMG;AACH,SAAS,eAAe,CACtB,QAA4B,EAC5B,SAAe;IAEf,MAAM,EAAC,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAC,GAAG,QAAQ,CAAC;IAEnD,IAAI,SAAS,IAAI,QAAQ,EAAE,CAAC;QAC1B,MAAM,IAAI,GAAG,aAAa,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;QAChD,OAAO,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,IAAI,KAAK,EAAC,CAAC;IAC7C,CAAC;IACD,IAAI,SAAS,IAAI,cAAc,EAAE,CAAC;QAChC,MAAM,WAAW,GAAG,YAAY,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;QACtD,MAAM,IAAI,GAAG,OAAO,CAClB,QAAQ,CAAC,aAAa,EAAE,kBAAkB,EAAE,WAAW,CACxD,CAAC;QACF,OAAO,EAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAC,CAAC;IAChC,CAAC;IACD,gDAAgD;IAChD,kDAAkD;IAClD,MAAM,YAAY,GAAG,YAAY,CAC/B,cAAc,EAAE,SAAS,CAC1B,CAAC;IACF,MAAM,IAAI,GAAG,OAAO,CAClB,QAAQ,CAAC,aAAa,EAAE,oBAAoB,EAAE,YAAY,CAC3D,CAAC;IACF,OAAO,EAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAC,CAAC;AAChC,CAAC"}
@@ -0,0 +1,100 @@
1
+ /**
2
+ * In-service (CARE) revaluation for the NHS 2015 Scheme.
3
+ *
4
+ * An active member's accrued pension is revalued each year at
5
+ * **CPI + 1.5 percentage points**, where CPI is the Treasury
6
+ * Order figure (September to September). The emphasis is the
7
+ * point: it is ADDED, not compounded. 3.1% CPI gives 4.6%,
8
+ * not the 4.6465% that (1.031 x 1.015) would produce.
9
+ *
10
+ * Sources — the legal one first:
11
+ *
12
+ * HM Treasury Public Service Pensions Revaluation Orders, made
13
+ * under s.9(2) Public Service Pensions Act 2013. These are the
14
+ * legal source of the prices figure; each row below carries
15
+ * the SI that made it.
16
+ * https://www.legislation.gov.uk/secondary/public+service+pensions
17
+ *
18
+ * Chief Secretary's annual written ministerial statement,
19
+ * which publishes a per-scheme active revaluation table.
20
+ * https://questions-statements.parliament.uk/written-statements/detail/2025-02-11/hcws437
21
+ *
22
+ * SPPA NHS circulars — the clearest annual statement of the
23
+ * exact NHS in-service rate. Scotland, but the same CPI + 1.5%
24
+ * rule and the same rate as England and Wales.
25
+ * https://pensions.gov.scot/sites/default/files/2023-02/2023-01_-_NHS_Circular_-_Pension_Indexation_and_CARE_Revaluation.pdf
26
+ *
27
+ * NHSBSA, on how it is applied to members and on the date
28
+ * change below.
29
+ * https://faq.nhsbsa.nhs.uk/knowledgebase/article/KA-02728/en-us
30
+ *
31
+ * Cross-checked against the "Revaluation" column of a member's
32
+ * Annual Benefit Statement (2015 Section, updated to
33
+ * 31/03/2025; name and membership number redacted), which
34
+ * quoted 4.6, 11.6, 8.2 and 3.2 for the years to 2025 — the
35
+ * rates above as actually applied to a real record, rather
36
+ * than as legislated. Nothing else from that document is used
37
+ * here: the earnings beside that column are the member's.
38
+ * https://drive.google.com/file/d/1UJ8FIXC-6JbLOHIHZ3fbvqBLyTG-noL3/view
39
+ *
40
+ * ── Two facts this data carries ─────────────────────
41
+ *
42
+ * **The revaluation date moved.** It was 1 April; from 2023 it
43
+ * is 6 April, changed to manage the interaction with the
44
+ * annual allowance. `appliedOn` records it per year rather
45
+ * than letting a scheme-year boundary be assumed.
46
+ *
47
+ * **CPI is sourced independently of the rate**, never derived
48
+ * from it. Taking `septemberCpiPct = ratePct - 1.5` would make
49
+ * the test that checks the +1.5 rule agree with itself, which
50
+ * is no test at all. Years whose CPI could not be sourced
51
+ * separately are omitted rather than back-computed — the 2019,
52
+ * 2020 and 2021 revaluations (3.9%, 3.2%, 2.0%, per the 2020
53
+ * scheme valuation report) are out for exactly that reason.
54
+ *
55
+ * ── This table is INCOMPLETE ────────────────────────
56
+ *
57
+ * The 2015 Scheme began on 1 April 2015, so the first
58
+ * in-service revaluation was applied in April 2016 and there
59
+ * are eleven years to 2026. Five are here. Do not read the
60
+ * absence of a year as an absence of revaluation — use
61
+ * `revaluationFor`, which returns null for a year not held,
62
+ * rather than iterating this array as though it were the
63
+ * scheme's whole history. Completing it back to 2016 is
64
+ * tracked at https://github.com/casomoltd/nhs-pay/issues/10
65
+ *
66
+ * The projection in pension-projection.ts compounds rather
67
+ * than adds — https://github.com/casomoltd/nhs-pay/issues/10
68
+ *
69
+ * ── Not this table ──────────────────────────────────
70
+ *
71
+ * Deferred 2015 benefits and all pensions in payment rise by
72
+ * CPI ALONE, under the Pensions Increase (Review) Orders — a
73
+ * different instrument. For 1995/2008 practitioners the
74
+ * equivalent uplift is earnings dynamisation, not this.
75
+ */
76
+ /** One scheme year's revaluation, and what set it. */
77
+ export interface RevaluationYear {
78
+ /** Scheme year END, e.g. 2022 for the 2021/22 year. */
79
+ readonly yearEnd: number;
80
+ /** The Treasury Order prices figure — the previous
81
+ * September's CPI, as a percentage. Sourced, not derived. */
82
+ readonly septemberCpiPct: number;
83
+ /** The in-service revaluation applied, as a percentage. */
84
+ readonly ratePct: number;
85
+ /** ISO date the revaluation was applied. 1 April through
86
+ * 2022, 6 April from 2023. */
87
+ readonly appliedOn: string;
88
+ /** The statutory instrument that made it. */
89
+ readonly si: string;
90
+ }
91
+ /** The bonus the scheme adds to CPI while a member is paying
92
+ * in, in PERCENTAGE POINTS. Added, never compounded. */
93
+ export declare const ACTIVE_REVAL_BONUS_PCT = 1.5;
94
+ /** In-service revaluation, oldest first. Extend when the next
95
+ * Revaluation Order is made — a year's rate is known months
96
+ * before the year it applies to ends. */
97
+ export declare const IN_SERVICE_REVALUATION: readonly RevaluationYear[];
98
+ /** The published rate for a scheme year, or null where the
99
+ * year isn't published — never a silent fallback. */
100
+ export declare function revaluationFor(yearEnd: number): RevaluationYear | null;
@@ -0,0 +1,124 @@
1
+ /**
2
+ * In-service (CARE) revaluation for the NHS 2015 Scheme.
3
+ *
4
+ * An active member's accrued pension is revalued each year at
5
+ * **CPI + 1.5 percentage points**, where CPI is the Treasury
6
+ * Order figure (September to September). The emphasis is the
7
+ * point: it is ADDED, not compounded. 3.1% CPI gives 4.6%,
8
+ * not the 4.6465% that (1.031 x 1.015) would produce.
9
+ *
10
+ * Sources — the legal one first:
11
+ *
12
+ * HM Treasury Public Service Pensions Revaluation Orders, made
13
+ * under s.9(2) Public Service Pensions Act 2013. These are the
14
+ * legal source of the prices figure; each row below carries
15
+ * the SI that made it.
16
+ * https://www.legislation.gov.uk/secondary/public+service+pensions
17
+ *
18
+ * Chief Secretary's annual written ministerial statement,
19
+ * which publishes a per-scheme active revaluation table.
20
+ * https://questions-statements.parliament.uk/written-statements/detail/2025-02-11/hcws437
21
+ *
22
+ * SPPA NHS circulars — the clearest annual statement of the
23
+ * exact NHS in-service rate. Scotland, but the same CPI + 1.5%
24
+ * rule and the same rate as England and Wales.
25
+ * https://pensions.gov.scot/sites/default/files/2023-02/2023-01_-_NHS_Circular_-_Pension_Indexation_and_CARE_Revaluation.pdf
26
+ *
27
+ * NHSBSA, on how it is applied to members and on the date
28
+ * change below.
29
+ * https://faq.nhsbsa.nhs.uk/knowledgebase/article/KA-02728/en-us
30
+ *
31
+ * Cross-checked against the "Revaluation" column of a member's
32
+ * Annual Benefit Statement (2015 Section, updated to
33
+ * 31/03/2025; name and membership number redacted), which
34
+ * quoted 4.6, 11.6, 8.2 and 3.2 for the years to 2025 — the
35
+ * rates above as actually applied to a real record, rather
36
+ * than as legislated. Nothing else from that document is used
37
+ * here: the earnings beside that column are the member's.
38
+ * https://drive.google.com/file/d/1UJ8FIXC-6JbLOHIHZ3fbvqBLyTG-noL3/view
39
+ *
40
+ * ── Two facts this data carries ─────────────────────
41
+ *
42
+ * **The revaluation date moved.** It was 1 April; from 2023 it
43
+ * is 6 April, changed to manage the interaction with the
44
+ * annual allowance. `appliedOn` records it per year rather
45
+ * than letting a scheme-year boundary be assumed.
46
+ *
47
+ * **CPI is sourced independently of the rate**, never derived
48
+ * from it. Taking `septemberCpiPct = ratePct - 1.5` would make
49
+ * the test that checks the +1.5 rule agree with itself, which
50
+ * is no test at all. Years whose CPI could not be sourced
51
+ * separately are omitted rather than back-computed — the 2019,
52
+ * 2020 and 2021 revaluations (3.9%, 3.2%, 2.0%, per the 2020
53
+ * scheme valuation report) are out for exactly that reason.
54
+ *
55
+ * ── This table is INCOMPLETE ────────────────────────
56
+ *
57
+ * The 2015 Scheme began on 1 April 2015, so the first
58
+ * in-service revaluation was applied in April 2016 and there
59
+ * are eleven years to 2026. Five are here. Do not read the
60
+ * absence of a year as an absence of revaluation — use
61
+ * `revaluationFor`, which returns null for a year not held,
62
+ * rather than iterating this array as though it were the
63
+ * scheme's whole history. Completing it back to 2016 is
64
+ * tracked at https://github.com/casomoltd/nhs-pay/issues/10
65
+ *
66
+ * The projection in pension-projection.ts compounds rather
67
+ * than adds — https://github.com/casomoltd/nhs-pay/issues/10
68
+ *
69
+ * ── Not this table ──────────────────────────────────
70
+ *
71
+ * Deferred 2015 benefits and all pensions in payment rise by
72
+ * CPI ALONE, under the Pensions Increase (Review) Orders — a
73
+ * different instrument. For 1995/2008 practitioners the
74
+ * equivalent uplift is earnings dynamisation, not this.
75
+ */
76
+ /** The bonus the scheme adds to CPI while a member is paying
77
+ * in, in PERCENTAGE POINTS. Added, never compounded. */
78
+ export const ACTIVE_REVAL_BONUS_PCT = 1.5;
79
+ /** In-service revaluation, oldest first. Extend when the next
80
+ * Revaluation Order is made — a year's rate is known months
81
+ * before the year it applies to ends. */
82
+ export const IN_SERVICE_REVALUATION = [
83
+ {
84
+ yearEnd: 2022,
85
+ septemberCpiPct: 3.1,
86
+ ratePct: 4.6,
87
+ appliedOn: '2022-04-11',
88
+ si: 'SI 2022/215',
89
+ },
90
+ {
91
+ yearEnd: 2023,
92
+ septemberCpiPct: 10.1,
93
+ ratePct: 11.6,
94
+ appliedOn: '2023-04-06',
95
+ si: 'SI 2023/252',
96
+ },
97
+ {
98
+ yearEnd: 2024,
99
+ septemberCpiPct: 6.7,
100
+ ratePct: 8.2,
101
+ appliedOn: '2024-04-06',
102
+ si: 'SI 2024/290',
103
+ },
104
+ {
105
+ yearEnd: 2025,
106
+ septemberCpiPct: 1.7,
107
+ ratePct: 3.2,
108
+ appliedOn: '2025-04-06',
109
+ si: 'SI 2025/252',
110
+ },
111
+ {
112
+ yearEnd: 2026,
113
+ septemberCpiPct: 3.8,
114
+ ratePct: 5.3,
115
+ appliedOn: '2026-04-06',
116
+ si: 'SI 2026/254',
117
+ },
118
+ ];
119
+ /** The published rate for a scheme year, or null where the
120
+ * year isn't published — never a silent fallback. */
121
+ export function revaluationFor(yearEnd) {
122
+ return IN_SERVICE_REVALUATION.find((year) => year.yearEnd === yearEnd) ?? null;
123
+ }
124
+ //# sourceMappingURL=revaluation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revaluation.js","sourceRoot":"","sources":["../src/revaluation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AAkBH;wDACwD;AACxD,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAE1C;;yCAEyC;AACzC,MAAM,CAAC,MAAM,sBAAsB,GAA+B;IAChE;QACE,OAAO,EAAE,IAAI;QACb,eAAe,EAAE,GAAG;QACpB,OAAO,EAAE,GAAG;QACZ,SAAS,EAAE,YAAY;QACvB,EAAE,EAAE,aAAa;KAClB;IACD;QACE,OAAO,EAAE,IAAI;QACb,eAAe,EAAE,IAAI;QACrB,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,YAAY;QACvB,EAAE,EAAE,aAAa;KAClB;IACD;QACE,OAAO,EAAE,IAAI;QACb,eAAe,EAAE,GAAG;QACpB,OAAO,EAAE,GAAG;QACZ,SAAS,EAAE,YAAY;QACvB,EAAE,EAAE,aAAa;KAClB;IACD;QACE,OAAO,EAAE,IAAI;QACb,eAAe,EAAE,GAAG;QACpB,OAAO,EAAE,GAAG;QACZ,SAAS,EAAE,YAAY;QACvB,EAAE,EAAE,aAAa;KAClB;IACD;QACE,OAAO,EAAE,IAAI;QACb,eAAe,EAAE,GAAG;QACpB,OAAO,EAAE,GAAG;QACZ,SAAS,EAAE,YAAY;QACvB,EAAE,EAAE,aAAa;KAClB;CACF,CAAC;AAEF;qDACqD;AACrD,MAAM,UAAU,cAAc,CAC5B,OAAe;IAEf,OAAO,sBAAsB,CAAC,IAAI,CAChC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,KAAK,OAAO,CACnC,IAAI,IAAI,CAAC;AACZ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@casomoltd/nhs-pay",
3
- "version": "0.10.4",
3
+ "version": "0.11.0",
4
4
  "description": "NHS Agenda for Change pay scales, pension tiers, regions, and take-home calculator",
5
5
  "homepage": "https://github.com/casomoltd/nhs-pay#readme",
6
6
  "bugs": "https://github.com/casomoltd/nhs-pay/issues",
@@ -56,7 +56,7 @@
56
56
  "@casomoltd/paye-calc": ">=0.5.9"
57
57
  },
58
58
  "devDependencies": {
59
- "@casomoltd/paye-calc": "^0.5.11",
59
+ "@casomoltd/paye-calc": "^0.5.24",
60
60
  "@casomoltd/tooling": "^0.21.1",
61
61
  "@commitlint/cli": "^20.0.0",
62
62
  "@js-temporal/polyfill": "^0.5.1",