Skip to content

Commit 8fa4fe2

Browse files
committed
start test case for SS
1 parent 11ea38e commit 8fa4fe2

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

tests/test_pensions.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,15 +445,31 @@ def test_deriv_NDC(args, d_NDC_expected):
445445
pension_expected_ps = [0, 0, 0, 0, 0.004164689, 0.004041603, 0.003922156]
446446
args_ps = (r, w_db, n_db, Y, theta, t, j, shift, method, e_db, factor, p3)
447447

448+
## SS ##
449+
p4 = Specifications()
450+
p4.pension_system = "US-Style Social Security"
451+
p4.S = 7
452+
p4.retire = 4
453+
w_ss = np.array([1.2, 1.1, 1.21, 1.0, 1.01, 0.99, 0.8])
454+
e_ss = np.array([1.1, 1.11, 0.9, 0.87, 0.87, 0.7, 0.6])
455+
n_ss = np.array([0.4, 0.45, 0.4, 0.42, 0.3, 0.2, 0.2])
456+
omegas = (1 / p4.S) * np.ones(p4.S)
457+
theta = 0.4
458+
p.replacement_rate_adjust = np.ones(p4.T)
459+
pension_expected_ss = [0, 0, 0, 0, 0.004164689, 0.004041603, 0.003922156]
460+
args_ss = (r, w_ss, n_ss, Y, theta, t, j, shift, method, e_ss, factor, p4)
461+
462+
448463
test_data = [
449464
(args_pb, pension_expected_db),
450465
(args_ndc, pension_expected_ndc),
451466
(args_ps, pension_expected_ps),
467+
(args_ss, pension_expected_ss),
452468
]
453469

454470

455471
@pytest.mark.parametrize(
456-
"args,pension_expected", test_data, ids=["DB", "NDC", "PS"]
472+
"args,pension_expected", test_data, ids=["DB", "NDC", "PS", "SS"]
457473
)
458474
def test_pension_amount(args, pension_expected):
459475
"""

0 commit comments

Comments
 (0)