@@ -445,15 +445,31 @@ def test_deriv_NDC(args, d_NDC_expected):
445
445
pension_expected_ps = [0 , 0 , 0 , 0 , 0.004164689 , 0.004041603 , 0.003922156 ]
446
446
args_ps = (r , w_db , n_db , Y , theta , t , j , shift , method , e_db , factor , p3 )
447
447
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
+
448
463
test_data = [
449
464
(args_pb , pension_expected_db ),
450
465
(args_ndc , pension_expected_ndc ),
451
466
(args_ps , pension_expected_ps ),
467
+ (args_ss , pension_expected_ss ),
452
468
]
453
469
454
470
455
471
@pytest .mark .parametrize (
456
- "args,pension_expected" , test_data , ids = ["DB" , "NDC" , "PS" ]
472
+ "args,pension_expected" , test_data , ids = ["DB" , "NDC" , "PS" , "SS" ]
457
473
)
458
474
def test_pension_amount (args , pension_expected ):
459
475
"""
0 commit comments