|
50 | 50 | "pre_tax_contributions", |
51 | 51 | "taxable_ira_distributions", |
52 | 52 | "self_employment_income", |
| 53 | + "sstb_self_employment_income", |
53 | 54 | "w2_wages_from_qualified_business", |
54 | 55 | "unadjusted_basis_qualified_property", |
55 | 56 | "business_is_sstb", |
| 57 | + "sstb_w2_wages_from_qualified_business", |
| 58 | + "sstb_unadjusted_basis_qualified_property", |
56 | 59 | "short_term_capital_gains", |
57 | 60 | "qualified_dividend_income", |
58 | 61 | "charitable_cash_donations", |
|
122 | 125 | "w2_wages_from_qualified_business", |
123 | 126 | "unadjusted_basis_qualified_property", |
124 | 127 | "business_is_sstb", |
| 128 | + "sstb_w2_wages_from_qualified_business", |
| 129 | + "sstb_unadjusted_basis_qualified_property", |
125 | 130 | "charitable_cash_donations", |
126 | 131 | "self_employed_pension_contribution_ald", |
127 | 132 | "unrecaptured_section_1250_gain", |
@@ -693,6 +698,11 @@ def _impute_retirement_contributions( |
693 | 698 | X_test[income_var] = puf_imputations[income_var] |
694 | 699 | else: |
695 | 700 | X_test[income_var] = cps_sim.calculate(income_var).values |
| 701 | + if "sstb_self_employment_income" in puf_imputations: |
| 702 | + X_test["self_employment_income"] = ( |
| 703 | + X_test["self_employment_income"] |
| 704 | + + puf_imputations["sstb_self_employment_income"] |
| 705 | + ) |
696 | 706 |
|
697 | 707 | del cps_sim |
698 | 708 |
|
@@ -723,13 +733,13 @@ def _impute_retirement_contributions( |
723 | 733 | catch_up_eligible = age >= 50 |
724 | 734 | limit_401k = limits["401k"] + catch_up_eligible * limits["401k_catch_up"] |
725 | 735 | limit_ira = limits["ira"] + catch_up_eligible * limits["ira_catch_up"] |
| 736 | + se_income = X_test["self_employment_income"].values |
726 | 737 | se_pension_cap = np.minimum( |
727 | | - X_test["self_employment_income"].values * limits["se_pension_rate"], |
| 738 | + se_income * limits["se_pension_rate"], |
728 | 739 | limits["se_pension_dollar_limit"], |
729 | 740 | ) |
730 | 741 |
|
731 | 742 | emp_income = X_test["employment_income"].values |
732 | | - se_income = X_test["self_employment_income"].values |
733 | 743 |
|
734 | 744 | result = {} |
735 | 745 | for var in CPS_RETIREMENT_VARIABLES: |
|
0 commit comments