Skip to content

Commit

Permalink
start test case for SS
Browse files Browse the repository at this point in the history
  • Loading branch information
jdebacker committed Jul 10, 2024
1 parent 11ea38e commit 8fa4fe2
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion tests/test_pensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,15 +445,31 @@ def test_deriv_NDC(args, d_NDC_expected):
pension_expected_ps = [0, 0, 0, 0, 0.004164689, 0.004041603, 0.003922156]
args_ps = (r, w_db, n_db, Y, theta, t, j, shift, method, e_db, factor, p3)

## SS ##
p4 = Specifications()
p4.pension_system = "US-Style Social Security"
p4.S = 7
p4.retire = 4
w_ss = np.array([1.2, 1.1, 1.21, 1.0, 1.01, 0.99, 0.8])
e_ss = np.array([1.1, 1.11, 0.9, 0.87, 0.87, 0.7, 0.6])
n_ss = np.array([0.4, 0.45, 0.4, 0.42, 0.3, 0.2, 0.2])
omegas = (1 / p4.S) * np.ones(p4.S)
theta = 0.4
p.replacement_rate_adjust = np.ones(p4.T)
pension_expected_ss = [0, 0, 0, 0, 0.004164689, 0.004041603, 0.003922156]
args_ss = (r, w_ss, n_ss, Y, theta, t, j, shift, method, e_ss, factor, p4)


test_data = [
(args_pb, pension_expected_db),
(args_ndc, pension_expected_ndc),
(args_ps, pension_expected_ps),
(args_ss, pension_expected_ss),
]


@pytest.mark.parametrize(
"args,pension_expected", test_data, ids=["DB", "NDC", "PS"]
"args,pension_expected", test_data, ids=["DB", "NDC", "PS", "SS"]
)
def test_pension_amount(args, pension_expected):
"""
Expand Down

0 comments on commit 8fa4fe2

Please sign in to comment.