@equisoft/tax-us 0.0.1-snapshot.20250723132536

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 (82) hide show
  1. package/.eslintrc.json +42 -0
  2. package/.tool-versions +1 -0
  3. package/Makefile +28 -0
  4. package/README.md +113 -0
  5. package/RELEASE.md +29 -0
  6. package/babel.config.js +1 -0
  7. package/dist/index.d.ts +5 -0
  8. package/dist/index.js +21 -0
  9. package/dist/investments/index.d.ts +6 -0
  10. package/dist/investments/index.js +22 -0
  11. package/dist/investments/life-income-fund.d.ts +11 -0
  12. package/dist/investments/life-income-fund.js +291 -0
  13. package/dist/investments/non-registered-savings-plan.d.ts +3 -0
  14. package/dist/investments/non-registered-savings-plan.js +30 -0
  15. package/dist/investments/registered-education-savings-plan/beneficiary.d.ts +4 -0
  16. package/dist/investments/registered-education-savings-plan/beneficiary.js +16 -0
  17. package/dist/investments/registered-education-savings-plan/british-columbia-training-and-education-savings-grant.d.ts +10 -0
  18. package/dist/investments/registered-education-savings-plan/british-columbia-training-and-education-savings-grant.js +21 -0
  19. package/dist/investments/registered-education-savings-plan/canada-education-savings-grant.d.ts +2 -0
  20. package/dist/investments/registered-education-savings-plan/canada-education-savings-grant.js +23 -0
  21. package/dist/investments/registered-education-savings-plan/canada-learning-bond.d.ts +12 -0
  22. package/dist/investments/registered-education-savings-plan/canada-learning-bond.js +19 -0
  23. package/dist/investments/registered-education-savings-plan/income-level.d.ts +11 -0
  24. package/dist/investments/registered-education-savings-plan/income-level.js +32 -0
  25. package/dist/investments/registered-education-savings-plan/index.d.ts +7 -0
  26. package/dist/investments/registered-education-savings-plan/index.js +23 -0
  27. package/dist/investments/registered-education-savings-plan/quebec-education-savings-incentive.d.ts +2 -0
  28. package/dist/investments/registered-education-savings-plan/quebec-education-savings-incentive.js +17 -0
  29. package/dist/investments/registered-education-savings-plan/savings-grant.d.ts +25 -0
  30. package/dist/investments/registered-education-savings-plan/savings-grant.js +51 -0
  31. package/dist/investments/registered-education-savings-plan/tuition-fees.d.ts +6 -0
  32. package/dist/investments/registered-education-savings-plan/tuition-fees.js +33 -0
  33. package/dist/investments/registered-retirement-income-fund.d.ts +7 -0
  34. package/dist/investments/registered-retirement-income-fund.js +68 -0
  35. package/dist/investments/registered-retirement-savings-plan.d.ts +9 -0
  36. package/dist/investments/registered-retirement-savings-plan.js +20 -0
  37. package/dist/investments/tax-free-savings-account.d.ts +7 -0
  38. package/dist/investments/tax-free-savings-account.js +21 -0
  39. package/dist/misc/code-types.d.ts +11 -0
  40. package/dist/misc/code-types.js +19 -0
  41. package/dist/misc/consumer-price-index.d.ts +34 -0
  42. package/dist/misc/consumer-price-index.js +240 -0
  43. package/dist/misc/index.d.ts +5 -0
  44. package/dist/misc/index.js +21 -0
  45. package/dist/misc/ipf-stats.d.ts +18 -0
  46. package/dist/misc/ipf-stats.js +25 -0
  47. package/dist/misc/life-expectancy.d.ts +28 -0
  48. package/dist/misc/life-expectancy.js +58 -0
  49. package/dist/misc/ppp-increase-factor.d.ts +10 -0
  50. package/dist/misc/ppp-increase-factor.js +25 -0
  51. package/dist/pension/canada-pension-plan.d.ts +2 -0
  52. package/dist/pension/canada-pension-plan.js +176 -0
  53. package/dist/pension/index.d.ts +5 -0
  54. package/dist/pension/index.js +21 -0
  55. package/dist/pension/old-age-security.d.ts +21 -0
  56. package/dist/pension/old-age-security.js +70 -0
  57. package/dist/pension/public-pension-plan.d.ts +63 -0
  58. package/dist/pension/public-pension-plan.js +2 -0
  59. package/dist/pension/quebec-pension-plan.d.ts +2 -0
  60. package/dist/pension/quebec-pension-plan.js +176 -0
  61. package/dist/pension/supplemental-pension-plan.d.ts +5 -0
  62. package/dist/pension/supplemental-pension-plan.js +14 -0
  63. package/dist/taxes/dividend-credit.d.ts +8 -0
  64. package/dist/taxes/dividend-credit.js +45 -0
  65. package/dist/taxes/employment-insurance.d.ts +9 -0
  66. package/dist/taxes/employment-insurance.js +20 -0
  67. package/dist/taxes/income-tax.d.ts +39 -0
  68. package/dist/taxes/income-tax.js +593 -0
  69. package/dist/taxes/index.d.ts +4 -0
  70. package/dist/taxes/index.js +20 -0
  71. package/dist/taxes/quebec-parental-insurance-plan.d.ts +9 -0
  72. package/dist/taxes/quebec-parental-insurance-plan.js +17 -0
  73. package/dist/utils/collections.d.ts +1 -0
  74. package/dist/utils/collections.js +7 -0
  75. package/dist/utils/date.d.ts +3 -0
  76. package/dist/utils/date.js +18 -0
  77. package/dist/utils/index.d.ts +3 -0
  78. package/dist/utils/index.js +19 -0
  79. package/dist/utils/math.d.ts +2 -0
  80. package/dist/utils/math.js +16 -0
  81. package/package.json +68 -0
  82. package/tsconfig.json +21 -0
@@ -0,0 +1,240 @@
1
+ "use strict";
2
+ /*
3
+ Sources
4
+ https://www.bankofcanada.ca/rates/price-indexes/cpi/
5
+ Use column v41690973
6
+
7
+ NOT USED BY FNA-ENGINE
8
+
9
+ Revised
10
+ 2024-12-23
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.CONSUMER_PRICE_INDEX = void 0;
14
+ exports.CONSUMER_PRICE_INDEX = {
15
+ 2009: {
16
+ JAN: 113.0,
17
+ FEB: 113.8,
18
+ MAR: 114.0,
19
+ APR: 113.9,
20
+ MAY: 114.7,
21
+ JUN: 115.1,
22
+ JUL: 114.7,
23
+ AUG: 114.7,
24
+ SEP: 114.7,
25
+ OCT: 114.6,
26
+ NOV: 115.2,
27
+ DEC: 114.8,
28
+ },
29
+ 2010: {
30
+ JAN: 115.1,
31
+ FEB: 115.6,
32
+ MAR: 115.6,
33
+ APR: 116.0,
34
+ MAY: 116.3,
35
+ JUN: 116.2,
36
+ JUL: 116.8,
37
+ AUG: 116.7,
38
+ SEP: 116.9,
39
+ OCT: 117.4,
40
+ NOV: 117.5,
41
+ DEC: 117.5,
42
+ },
43
+ 2011: {
44
+ JAN: 117.8,
45
+ FEB: 118.1,
46
+ MAR: 119.4,
47
+ APR: 119.8,
48
+ MAY: 120.6,
49
+ JUN: 119.8,
50
+ JUL: 120.0,
51
+ AUG: 120.3,
52
+ SEP: 120.6,
53
+ OCT: 120.8,
54
+ NOV: 120.9,
55
+ DEC: 120.2,
56
+ },
57
+ 2012: {
58
+ JAN: 120.7,
59
+ FEB: 121.2,
60
+ MAR: 121.7,
61
+ APR: 122.2,
62
+ MAY: 122.1,
63
+ JUN: 121.6,
64
+ JUL: 121.5,
65
+ AUG: 121.8,
66
+ SEP: 122.0,
67
+ OCT: 122.2,
68
+ NOV: 121.9,
69
+ DEC: 121.2,
70
+ },
71
+ 2013: {
72
+ JAN: 121.3,
73
+ FEB: 122.7,
74
+ MAR: 122.9,
75
+ APR: 122.7,
76
+ MAY: 123.0,
77
+ JUN: 123.0,
78
+ JUL: 123.1,
79
+ AUG: 123.1,
80
+ SEP: 123.3,
81
+ OCT: 123.0,
82
+ NOV: 123.0,
83
+ DEC: 122.7,
84
+ },
85
+ 2014: {
86
+ JAN: 123.1,
87
+ FEB: 124.1,
88
+ MAR: 124.8,
89
+ APR: 125.2,
90
+ MAY: 125.8,
91
+ JUN: 125.9,
92
+ JUL: 125.7,
93
+ AUG: 125.7,
94
+ SEP: 125.8,
95
+ OCT: 125.9,
96
+ NOV: 125.4,
97
+ DEC: 124.5,
98
+ },
99
+ 2015: {
100
+ JAN: 124.3,
101
+ FEB: 125.4,
102
+ MAR: 126.3,
103
+ APR: 126.2,
104
+ MAY: 126.9,
105
+ JUN: 127.2,
106
+ JUL: 127.3,
107
+ AUG: 127.3,
108
+ SEP: 127.1,
109
+ OCT: 127.2,
110
+ NOV: 127.1,
111
+ DEC: 126.5,
112
+ },
113
+ 2016: {
114
+ JAN: 126.8,
115
+ FEB: 127.1,
116
+ MAR: 127.9,
117
+ APR: 128.3,
118
+ MAY: 128.8,
119
+ JUN: 129.1,
120
+ JUL: 128.9,
121
+ AUG: 128.7,
122
+ SEP: 128.8,
123
+ OCT: 129.1,
124
+ NOV: 128.6,
125
+ DEC: 128.4,
126
+ },
127
+ 2017: {
128
+ JAN: 129.5,
129
+ FEB: 129.7,
130
+ MAR: 129.9,
131
+ APR: 130.4,
132
+ MAY: 130.5,
133
+ JUN: 130.4,
134
+ JUL: 130.4,
135
+ AUG: 130.5,
136
+ SEP: 130.8,
137
+ OCT: 130.9,
138
+ NOV: 131.3,
139
+ DEC: 130.8,
140
+ },
141
+ 2018: {
142
+ JAN: 131.7,
143
+ FEB: 132.5,
144
+ MAR: 132.9,
145
+ APR: 133.3,
146
+ MAY: 133.4,
147
+ JUN: 133.6,
148
+ JUL: 134.3,
149
+ AUG: 134.2,
150
+ SEP: 134.3,
151
+ OCT: 134.1,
152
+ NOV: 133.5,
153
+ DEC: 133.4,
154
+ },
155
+ 2019: {
156
+ JAN: 133.6,
157
+ FEB: 134.5,
158
+ MAR: 135.4,
159
+ APR: 136.0,
160
+ MAY: 136.6,
161
+ JUN: 136.3,
162
+ JUL: 137.0,
163
+ AUG: 136.8,
164
+ SEP: 136.2,
165
+ OCT: 136.6,
166
+ NOV: 136.4,
167
+ DEC: 136.4,
168
+ },
169
+ 2020: {
170
+ JAN: 136.8,
171
+ FEB: 137.4,
172
+ MAR: 136.6,
173
+ APR: 135.7,
174
+ MAY: 136.1,
175
+ JUN: 137.2,
176
+ JUL: 137.2,
177
+ AUG: 137.0,
178
+ SEP: 136.9,
179
+ OCT: 137.5,
180
+ NOV: 137.7,
181
+ DEC: 137.4,
182
+ },
183
+ 2021: {
184
+ JAN: 138.2,
185
+ FEB: 138.9,
186
+ MAR: 139.6,
187
+ APR: 140.3,
188
+ MAY: 141.0,
189
+ JUN: 141.4,
190
+ JUL: 142.3,
191
+ AUG: 142.6,
192
+ SEP: 142.9,
193
+ OCT: 143.9,
194
+ NOV: 144.2,
195
+ DEC: 144.0,
196
+ },
197
+ 2022: {
198
+ JAN: 145.3,
199
+ FEB: 146.8,
200
+ MAR: 148.9,
201
+ APR: 149.8,
202
+ MAY: 151.9,
203
+ JUN: 152.9,
204
+ JUL: 153.1,
205
+ AUG: 152.6,
206
+ SEP: 152.7,
207
+ OCT: 153.8,
208
+ NOV: 154.0,
209
+ DEC: 153.1,
210
+ },
211
+ 2023: {
212
+ JAN: 153.9,
213
+ FEB: 154.5,
214
+ MAR: 155.3,
215
+ APR: 156.4,
216
+ MAY: 157.0,
217
+ JUN: 157.2,
218
+ JUL: 158.1,
219
+ AUG: 158.7,
220
+ SEP: 158.5,
221
+ OCT: 158.6,
222
+ NOV: 158.8,
223
+ DEC: 158.3,
224
+ },
225
+ 2024: {
226
+ JAN: 158.3,
227
+ FEB: 158.8,
228
+ MAR: 159.8,
229
+ APR: 160.6,
230
+ MAY: 161.5,
231
+ JUN: 161.4,
232
+ JUL: 162.1,
233
+ AUG: 161.8,
234
+ SEP: 161.1,
235
+ OCT: 161.8,
236
+ NOV: 161.8,
237
+ // DEC is estimated using NOV
238
+ DEC: 161.8,
239
+ },
240
+ };
@@ -0,0 +1,5 @@
1
+ export * from './code-types';
2
+ export * from './consumer-price-index';
3
+ export * from './ipf-stats';
4
+ export * from './life-expectancy';
5
+ export * from './ppp-increase-factor';
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./code-types"), exports);
18
+ __exportStar(require("./consumer-price-index"), exports);
19
+ __exportStar(require("./ipf-stats"), exports);
20
+ __exportStar(require("./life-expectancy"), exports);
21
+ __exportStar(require("./ppp-increase-factor"), exports);
@@ -0,0 +1,18 @@
1
+ export interface ReturnRates {
2
+ SHORT_TERM: number;
3
+ FIXED_INCOME: number;
4
+ CANADIAN_EQUITIES: number;
5
+ US_EQUITIES: number;
6
+ INTL_DEVELOPED_MARKET_EQUITIES: number;
7
+ EMERGING_MARKET_EQUITIES: number;
8
+ CONSERVATIVE_PORTFOLIO: number;
9
+ BALANCED_PORTFOLIO: number;
10
+ DYNAMIC_PORTFOLIO: number;
11
+ }
12
+ export interface IPFStatistics {
13
+ INFLATION: number;
14
+ PERFORMANCE_RATE: number;
15
+ RETURN_RATES: ReturnRates;
16
+ BORROWING_RATE: number;
17
+ }
18
+ export declare const IPF: IPFStatistics;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /*
3
+ Sources
4
+ https://institutpf.org/assets/Documents/Normes-projection/InstitutPF-NHP-2024.pdf
5
+ Revised
6
+ 2023-04-25
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.IPF = void 0;
10
+ exports.IPF = {
11
+ INFLATION: 0.021,
12
+ PERFORMANCE_RATE: 0.01,
13
+ RETURN_RATES: {
14
+ SHORT_TERM: 0.024,
15
+ FIXED_INCOME: 0.034,
16
+ CANADIAN_EQUITIES: 0.066,
17
+ US_EQUITIES: 0.066,
18
+ INTL_DEVELOPED_MARKET_EQUITIES: 0.069,
19
+ EMERGING_MARKET_EQUITIES: 0.08,
20
+ CONSERVATIVE_PORTFOLIO: 0.028,
21
+ BALANCED_PORTFOLIO: 0.035,
22
+ DYNAMIC_PORTFOLIO: 0.045,
23
+ },
24
+ BORROWING_RATE: 0.044,
25
+ };
@@ -0,0 +1,28 @@
1
+ export interface IndividualLifeExpectancy {
2
+ 0: number;
3
+ 5: number;
4
+ 10: number;
5
+ 15: number;
6
+ 20: number;
7
+ 25: number;
8
+ 30: number;
9
+ 35: number;
10
+ 40: number;
11
+ 45: number;
12
+ 50: number;
13
+ 55: number;
14
+ 60: number;
15
+ 65: number;
16
+ 70: number;
17
+ 75: number;
18
+ 80: number;
19
+ 85: number;
20
+ 90: number;
21
+ 95: number;
22
+ 100: number;
23
+ }
24
+ export interface CombinedLifeExpectancy {
25
+ MALE: IndividualLifeExpectancy;
26
+ FEMALE: IndividualLifeExpectancy;
27
+ }
28
+ export declare const LIFE_EXPECTANCY: CombinedLifeExpectancy;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ /*
3
+ Sources
4
+ http://app.iqpf.org/?locale=en#/guidelines/life-expectancy
5
+
6
+ Revised
7
+ 2022-04-30
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.LIFE_EXPECTANCY = void 0;
11
+ exports.LIFE_EXPECTANCY = {
12
+ MALE: {
13
+ 0: 95,
14
+ 5: 95,
15
+ 10: 95,
16
+ 15: 95,
17
+ 20: 95,
18
+ 25: 95,
19
+ 30: 95,
20
+ 35: 94,
21
+ 40: 94,
22
+ 45: 94,
23
+ 50: 94,
24
+ 55: 94,
25
+ 60: 94,
26
+ 65: 94,
27
+ 70: 94,
28
+ 75: 94,
29
+ 80: 94,
30
+ 85: 95,
31
+ 90: 96,
32
+ 95: 99,
33
+ 100: 102,
34
+ },
35
+ FEMALE: {
36
+ 0: 97,
37
+ 5: 97,
38
+ 10: 97,
39
+ 15: 97,
40
+ 20: 97,
41
+ 25: 97,
42
+ 30: 97,
43
+ 35: 97,
44
+ 40: 97,
45
+ 45: 96,
46
+ 50: 96,
47
+ 55: 96,
48
+ 60: 96,
49
+ 65: 96,
50
+ 70: 96,
51
+ 75: 96,
52
+ 80: 96,
53
+ 85: 97,
54
+ 90: 98,
55
+ 95: 100,
56
+ 100: 103,
57
+ },
58
+ };
@@ -0,0 +1,10 @@
1
+ export interface PPPIncreaseFactor {
2
+ FIRST_YEAR: number;
3
+ SECOND_YEAR: number;
4
+ THIRD_YEAR: number;
5
+ FOURTH_YEAR: number;
6
+ FIFTH_YEAR: number;
7
+ SIXTH_YEAR: number;
8
+ SEVENTH_YEAR: number;
9
+ }
10
+ export declare const PPP_INCREASE_FACTOR: PPPIncreaseFactor;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /*
3
+ Sources
4
+ https://www.finance-investissement.com/zone-experts_/martin-dupras/la-valeur-reelle-de-reporter-la-rente-du-rrq-mise-a-jour-2024/
5
+ https://www.finance-investissement.com/zone-experts_/martin-dupras/la-valeur-reelle-de-reporter-la-rente-du-rrq/
6
+
7
+ Note
8
+ Cumulative difference in %, according to the table calculated by Martin Dupras,
9
+ from the reference age of 65, after 40 years of contributions, divided by 12 months.
10
+ The formula consuming these values is only utilized by kronos-fna.
11
+
12
+ Revised
13
+ 2024-12
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.PPP_INCREASE_FACTOR = void 0;
17
+ exports.PPP_INCREASE_FACTOR = {
18
+ FIRST_YEAR: 0.791,
19
+ SECOND_YEAR: 0.733,
20
+ THIRD_YEAR: 0.683,
21
+ FOURTH_YEAR: 0.65,
22
+ FIFTH_YEAR: 0.608,
23
+ SIXTH_YEAR: 0.583,
24
+ SEVENTH_YEAR: 0.55,
25
+ };
@@ -0,0 +1,2 @@
1
+ import { PublicPensionPlan } from './public-pension-plan';
2
+ export declare const CPP: PublicPensionPlan;
@@ -0,0 +1,176 @@
1
+ "use strict";
2
+ /*
3
+ Sources
4
+ https://www.canada.ca/en/revenue-agency/services/tax/registered-plans-administrators/pspa/mp-rrsp-dpsp-tfsa-limits-ympe.html
5
+ https://www.canada.ca/en/services/benefits/publicpensions/cpp/payment-amounts.html
6
+ https://www.canada.ca/en/services/benefits/publicpensions/cpp/old-age-security/cpp-price.html
7
+
8
+ Revised
9
+ 2025-01-02
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CPP = void 0;
13
+ const date_1 = require("../utils/date");
14
+ const math_1 = require("../utils/math");
15
+ exports.CPP = {
16
+ PENSIONABLE_EARNINGS: {
17
+ BASIC_EXEMPTION: 3500,
18
+ // Year's maximum pensionable earnings (YMPE)
19
+ YMPE: 71300,
20
+ // Average YMPE of the last 5 year (including current year)
21
+ YMPE_AVG_5: 66580,
22
+ // Year's additional maximum pensionable earnings (YAMPE)
23
+ YAMPE: 81200,
24
+ // Year's additional maximum pensionable earnings (YAMPE) of the last 5 year (including current year)
25
+ // YAMPE * 0.942 (Temporary factor suggested by Martin Dupras, used to estimate until we have the right value)
26
+ YAMPE_AVG_5: 76490,
27
+ },
28
+ CONTRIBUTION_RATES: {
29
+ BASE: 0.0595,
30
+ ENHANCEMENT_STEP_2: 0.04,
31
+ },
32
+ DEATH_BENEFIT: { RATE: 0.5 },
33
+ DEFAULT_REFERENCE_AGE: 65,
34
+ FLAT_BENEFIT: {
35
+ // Survivors' benefits
36
+ ORPHAN: 3621.24,
37
+ // Disability benefits
38
+ DISABILITY: 19281.36,
39
+ // Surviving spouse's pension
40
+ UNDER_45: 9250.56,
41
+ UNDER_45_WITH_CHILD: 9250.56,
42
+ UNDER_45_DISABLED: 9250.56,
43
+ FROM_45_TO_64: 9250.56,
44
+ OVER_64_WITHOUT_PENSION: 10317.60,
45
+ },
46
+ INDEXATION_RATE_REFERENCES: [
47
+ [2007, 0.020],
48
+ [2008, 0.022],
49
+ [2009, 0.023],
50
+ [2010, 0.003],
51
+ [2011, 0.018],
52
+ [2012, 0.029],
53
+ [2013, 0.015],
54
+ [2014, 0.009],
55
+ [2015, 0.020],
56
+ [2016, 0.011],
57
+ [2017, 0.014],
58
+ [2018, 0.016],
59
+ [2019, 0.023],
60
+ [2020, 0.019],
61
+ [2021, 0.010],
62
+ [2022, 0.027],
63
+ [2023, 0.065],
64
+ // Decommissionned functionnality
65
+ ],
66
+ MAX_INCOME: {
67
+ 1966: 5000,
68
+ 1967: 5000,
69
+ 1968: 5100,
70
+ 1969: 5200,
71
+ 1970: 5300,
72
+ 1971: 5400,
73
+ 1972: 5500,
74
+ 1973: 5900,
75
+ 1974: 6600,
76
+ 1975: 7400,
77
+ 1976: 8300,
78
+ 1977: 9300,
79
+ 1978: 10400,
80
+ 1979: 11700,
81
+ 1980: 13100,
82
+ 1981: 14700,
83
+ 1982: 16500,
84
+ 1983: 18500,
85
+ 1984: 20800,
86
+ 1985: 23400,
87
+ 1986: 25800,
88
+ 1987: 25900,
89
+ 1988: 26500,
90
+ 1989: 27700,
91
+ 1990: 28900,
92
+ 1991: 30500,
93
+ 1992: 32200,
94
+ 1993: 33400,
95
+ 1994: 34400,
96
+ 1995: 34900,
97
+ 1996: 35400,
98
+ 1997: 35800,
99
+ 1998: 36900,
100
+ 1999: 37400,
101
+ 2000: 37600,
102
+ 2001: 38300,
103
+ 2002: 39100,
104
+ 2003: 39900,
105
+ 2004: 40500,
106
+ 2005: 41100,
107
+ 2006: 42100,
108
+ 2007: 43700,
109
+ 2008: 44900,
110
+ 2009: 46300,
111
+ 2010: 47200,
112
+ 2011: 48300,
113
+ 2012: 50100,
114
+ 2013: 51100,
115
+ 2014: 52500,
116
+ 2015: 53600,
117
+ 2016: 54900,
118
+ 2017: 55300,
119
+ 2018: 55900,
120
+ 2019: 57400,
121
+ 2020: 58700,
122
+ 2021: 61600,
123
+ 2022: 64900,
124
+ 2023: 66600,
125
+ 2024: 68500,
126
+ 2025: 71300,
127
+ },
128
+ MAX_PENSION: {
129
+ RETIREMENT: 17196, // Max amount at age 65
130
+ COMBINED_RETIREMENT_SURVIVOR: 17394.36,
131
+ DEATH_BENEFIT: 2500,
132
+ },
133
+ MAX_REQUEST_AGE: 70,
134
+ MIN_REQUEST_AGE: 60,
135
+ MONTHLY_DELAY: {
136
+ BONUS: 0.0070,
137
+ PENALTY: 0.0060,
138
+ },
139
+ REPLACEMENT_FACTOR: 0.25,
140
+ SURVIVOR_RATES: {
141
+ OVER_64: 0.6,
142
+ UNDER_65: 0.375,
143
+ },
144
+ YEARS_TO_FULL_PENSION: 40,
145
+ getRequestDateFactor(birthDate, requestDate, customReferenceDate) {
146
+ const { BONUS, PENALTY } = this.MONTHLY_DELAY;
147
+ const minRequestDate = (0, date_1.addYearsToDate)(birthDate, this.MIN_REQUEST_AGE);
148
+ const maxRequestDate = (0, date_1.addYearsToDate)(birthDate, this.MAX_REQUEST_AGE);
149
+ const referenceDate = customReferenceDate || (0, date_1.addYearsToDate)(birthDate, this.DEFAULT_REFERENCE_AGE);
150
+ const monthsToToday = (0, date_1.getMonthsDiff)(birthDate, (0, date_1.now)());
151
+ const monthsToMinRequestDate = (0, date_1.getMonthsDiff)(birthDate, minRequestDate);
152
+ const monthsToMaxRequestDate = (0, date_1.getMonthsDiff)(birthDate, maxRequestDate);
153
+ const monthsToReferenceDate = (0, date_1.getMonthsDiff)(birthDate, referenceDate);
154
+ const monthsToRequestDate = (0, date_1.getMonthsDiff)(birthDate, requestDate);
155
+ const monthsToLastBirthDay = monthsToToday - (monthsToToday % 12);
156
+ // Request date is before minimum request date
157
+ if (monthsToRequestDate < monthsToMinRequestDate) {
158
+ return 0;
159
+ }
160
+ // Analysis date is after the maximum request date
161
+ if (monthsToMaxRequestDate < monthsToToday) {
162
+ return 1;
163
+ }
164
+ // Analysis date is after reference date and request date is before last birthday
165
+ if (monthsToToday > monthsToReferenceDate && monthsToRequestDate < monthsToLastBirthDay) {
166
+ return 1;
167
+ }
168
+ let monthsDelta = (0, math_1.clamp)(monthsToRequestDate, monthsToMinRequestDate, monthsToMaxRequestDate);
169
+ monthsDelta -= Math.max(monthsToLastBirthDay, monthsToReferenceDate);
170
+ return 1 + (monthsDelta * (monthsDelta >= 0 ? BONUS : PENALTY));
171
+ },
172
+ getAverageIndexationRate() {
173
+ const sum = this.INDEXATION_RATE_REFERENCES.reduce((previous, current) => previous + current[1], 0);
174
+ return (0, math_1.roundToPrecision)(sum / this.INDEXATION_RATE_REFERENCES.length, 3);
175
+ },
176
+ };
@@ -0,0 +1,5 @@
1
+ export * from './canada-pension-plan';
2
+ export * from './old-age-security';
3
+ export * from './public-pension-plan';
4
+ export * from './quebec-pension-plan';
5
+ export * from './supplemental-pension-plan';
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./canada-pension-plan"), exports);
18
+ __exportStar(require("./old-age-security"), exports);
19
+ __exportStar(require("./public-pension-plan"), exports);
20
+ __exportStar(require("./quebec-pension-plan"), exports);
21
+ __exportStar(require("./supplemental-pension-plan"), exports);
@@ -0,0 +1,21 @@
1
+ export interface Repayment {
2
+ MAX: number;
3
+ MIN: number;
4
+ RATIO: number;
5
+ }
6
+ export interface OldAgeSecurity {
7
+ INCREASE: {
8
+ AGE: number;
9
+ RATE: number;
10
+ REPAYMENT_MAX: number;
11
+ };
12
+ MAX_AGE: number;
13
+ MIN_AGE: number;
14
+ MONTHLY_PAYMENT_MAX: number;
15
+ MONTHLY_DELAY_BONUS: number;
16
+ REPAYMENT: Repayment;
17
+ getMinRequestDateFactor(birthDate: Date, requestDate: Date): number;
18
+ getRequestDateFactor(birthDate: Date, requestDate: Date): number;
19
+ getRepaymentMax(startOfYearAge: number): number;
20
+ }
21
+ export declare const OAS: OldAgeSecurity;