policyengine-uk 2.40.1__py3-none-any.whl → 2.65.6__py3-none-any.whl

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 (258) hide show
  1. policyengine_uk/__init__.py +5 -3
  2. policyengine_uk/data/__init__.py +1 -0
  3. policyengine_uk/data/dataset_schema.py +70 -18
  4. policyengine_uk/data/economic_assumptions.py +36 -10
  5. policyengine_uk/data/filter_dataset.py +52 -0
  6. policyengine_uk/dynamics/labour_supply.py +343 -0
  7. policyengine_uk/dynamics/participation.py +629 -0
  8. policyengine_uk/dynamics/progression.py +384 -0
  9. policyengine_uk/microsimulation.py +105 -0
  10. policyengine_uk/model_api.py +1 -0
  11. policyengine_uk/parameters/gov/boe/base_rate.yaml +34 -0
  12. policyengine_uk/parameters/gov/boe/index.yaml +2 -0
  13. policyengine_uk/parameters/gov/contrib/behavioral_responses/employee_salary_sacrifice_reduction_rate.yaml +14 -0
  14. policyengine_uk/parameters/gov/contrib/behavioral_responses/salary_sacrifice_broad_base_haircut_rate.yaml +22 -0
  15. policyengine_uk/parameters/gov/contrib/cec/state_pension_increase.yaml +1 -1
  16. policyengine_uk/parameters/gov/contrib/ubi_center/carbon_tax.yaml +2 -2
  17. policyengine_uk/parameters/gov/contrib/ubi_center/land_value_tax.yaml +3 -3
  18. policyengine_uk/parameters/gov/dcms/bbc/tv_licence/colour.yaml +5 -5
  19. policyengine_uk/parameters/gov/dfe/education_spending.yaml +1 -1
  20. policyengine_uk/parameters/gov/dft/rail/fare_index.yaml +32 -0
  21. policyengine_uk/parameters/gov/dft/rail/prior_law_fare_index.yaml +32 -0
  22. policyengine_uk/parameters/gov/dft/rail/ridership_index.yaml +30 -0
  23. policyengine_uk/parameters/gov/dft/spending.yaml +2 -2
  24. policyengine_uk/parameters/gov/dwp/ESA/income/earn_disregard.yaml +1 -1
  25. policyengine_uk/parameters/gov/dwp/ESA/income/income_disregard_couple.yaml +1 -1
  26. policyengine_uk/parameters/gov/dwp/ESA/income/income_disregard_lone_parent.yaml +1 -1
  27. policyengine_uk/parameters/gov/dwp/ESA/income/income_disregard_single.yaml +1 -1
  28. policyengine_uk/parameters/gov/dwp/ESA/income/pension_disregard.yaml +1 -1
  29. policyengine_uk/parameters/gov/dwp/IIDB/maximum.yaml +1 -1
  30. policyengine_uk/parameters/gov/dwp/JSA/contrib/amount_over_25.yaml +1 -1
  31. policyengine_uk/parameters/gov/dwp/JSA/contrib/earn_disregard.yaml +1 -1
  32. policyengine_uk/parameters/gov/dwp/JSA/contrib/pension_disregard.yaml +1 -1
  33. policyengine_uk/parameters/gov/dwp/JSA/income/amount_18_24.yaml +7 -7
  34. policyengine_uk/parameters/gov/dwp/JSA/income/amount_over_25.yaml +7 -7
  35. policyengine_uk/parameters/gov/dwp/JSA/income/income_disregard_couple.yaml +1 -1
  36. policyengine_uk/parameters/gov/dwp/JSA/income/income_disregard_lone_parent.yaml +1 -1
  37. policyengine_uk/parameters/gov/dwp/JSA/income/income_disregard_single.yaml +1 -1
  38. policyengine_uk/parameters/gov/dwp/LHA/shared_accommodation_age_threshold.yaml +12 -0
  39. policyengine_uk/parameters/gov/dwp/attendance_allowance/higher.yaml +7 -7
  40. policyengine_uk/parameters/gov/dwp/attendance_allowance/lower.yaml +7 -7
  41. policyengine_uk/parameters/gov/dwp/benefit_cap.yaml +3 -3
  42. policyengine_uk/parameters/gov/dwp/carer_premium/couple.yaml +2 -2
  43. policyengine_uk/parameters/gov/dwp/carer_premium/single.yaml +6 -6
  44. policyengine_uk/parameters/gov/dwp/carers_allowance/rate.yaml +7 -7
  45. policyengine_uk/parameters/gov/dwp/disability_premia/disability_couple.yaml +1 -1
  46. policyengine_uk/parameters/gov/dwp/disability_premia/enhanced_couple.yaml +1 -1
  47. policyengine_uk/parameters/gov/dwp/disability_premia/enhanced_single.yaml +1 -1
  48. policyengine_uk/parameters/gov/dwp/disability_premia/severe_couple.yaml +1 -1
  49. policyengine_uk/parameters/gov/dwp/dla/mobility/higher.yaml +4 -4
  50. policyengine_uk/parameters/gov/dwp/dla/mobility/lower.yaml +8 -8
  51. policyengine_uk/parameters/gov/dwp/dla/self_care/higher.yaml +7 -7
  52. policyengine_uk/parameters/gov/dwp/dla/self_care/lower.yaml +8 -8
  53. policyengine_uk/parameters/gov/dwp/dla/self_care/middle.yaml +7 -7
  54. policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/lone_parent/aged.yaml +1 -1
  55. policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/lone_parent/older.yaml +3 -3
  56. policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/single/aged.yaml +1 -1
  57. policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/single/older.yaml +3 -3
  58. policyengine_uk/parameters/gov/dwp/housing_benefit/means_test/income_disregard/worker.yaml +1 -1
  59. policyengine_uk/parameters/gov/dwp/housing_benefit/non_dep_deduction/amount.yaml +1 -1
  60. policyengine_uk/parameters/gov/dwp/housing_benefit/takeup.yaml +7 -7
  61. policyengine_uk/parameters/gov/dwp/income_support/amounts/amount_16_24.yaml +1 -1
  62. policyengine_uk/parameters/gov/dwp/income_support/amounts/amount_couples_over_18.yaml +1 -1
  63. policyengine_uk/parameters/gov/dwp/income_support/means_test/earn_disregard.yaml +1 -1
  64. policyengine_uk/parameters/gov/dwp/income_support/means_test/income_disregard_couple.yaml +1 -1
  65. policyengine_uk/parameters/gov/dwp/income_support/means_test/income_disregard_lone_parent.yaml +1 -1
  66. policyengine_uk/parameters/gov/dwp/income_support/means_test/income_disregard_single.yaml +1 -1
  67. policyengine_uk/parameters/gov/dwp/income_support/means_test/pension_disregard.yaml +1 -1
  68. policyengine_uk/parameters/gov/dwp/income_support/takeup.yaml +7 -7
  69. policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/carer/addition.yaml +4 -4
  70. policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/minimum_guarantee.yaml +9 -9
  71. policyengine_uk/parameters/gov/dwp/pension_credit/guarantee_credit/severe_disability/addition.yaml +3 -3
  72. policyengine_uk/parameters/gov/dwp/pension_credit/savings_credit/threshold.yaml +5 -5
  73. policyengine_uk/parameters/gov/dwp/pip/daily_living/enhanced.yaml +7 -7
  74. policyengine_uk/parameters/gov/dwp/pip/daily_living/standard.yaml +8 -8
  75. policyengine_uk/parameters/gov/dwp/pip/mobility/enhanced.yaml +4 -4
  76. policyengine_uk/parameters/gov/dwp/pip/mobility/standard.yaml +9 -9
  77. policyengine_uk/parameters/gov/dwp/sda/maximum.yaml +7 -7
  78. policyengine_uk/parameters/gov/dwp/state_pension/basic_state_pension/amount.yaml +11 -11
  79. policyengine_uk/parameters/gov/dwp/state_pension/new_state_pension/amount.yaml +4 -4
  80. policyengine_uk/parameters/gov/dwp/tax_credits/child_tax_credit/limit/child_count.yaml +10 -1
  81. policyengine_uk/parameters/gov/dwp/tax_credits/child_tax_credit/takeup.yaml +7 -7
  82. policyengine_uk/parameters/gov/dwp/tax_credits/working_tax_credit/takeup.yaml +7 -7
  83. policyengine_uk/parameters/gov/dwp/universal_credit/elements/carer/amount.yaml +3 -3
  84. policyengine_uk/parameters/gov/dwp/universal_credit/elements/child/amount.yaml +2 -4
  85. policyengine_uk/parameters/gov/dwp/universal_credit/elements/child/disabled/amount.yaml +2 -4
  86. policyengine_uk/parameters/gov/dwp/universal_credit/elements/child/first/higher_amount.yaml +6 -8
  87. policyengine_uk/parameters/gov/dwp/universal_credit/elements/child/limit/child_count.yaml +6 -1
  88. policyengine_uk/parameters/gov/dwp/universal_credit/elements/child/severely_disabled/amount.yaml +3 -5
  89. policyengine_uk/parameters/gov/dwp/universal_credit/elements/childcare/cap.yaml +2 -6
  90. policyengine_uk/parameters/gov/dwp/universal_credit/elements/disabled/amount.yaml +4 -6
  91. policyengine_uk/parameters/gov/dwp/universal_credit/elements/housing/non_dep_deduction/amount.yaml +4 -1
  92. policyengine_uk/parameters/gov/dwp/universal_credit/rebalancing/active.yaml +9 -0
  93. policyengine_uk/parameters/gov/dwp/universal_credit/rebalancing/new_claimant_health_element.yaml +9 -0
  94. policyengine_uk/parameters/gov/dwp/universal_credit/rebalancing/standard_allowance_uplift.yaml +13 -0
  95. policyengine_uk/parameters/gov/dwp/universal_credit/standard_allowance/amount.yaml +5 -5
  96. policyengine_uk/parameters/gov/dwp/winter_fuel_payment/eligibility/taxable_income_test/maximum_taxable_income.yaml +2 -1
  97. policyengine_uk/parameters/gov/dwp/winter_fuel_payment/eligibility/taxable_income_test/use_maximum_taxable_income.yaml +1 -0
  98. policyengine_uk/parameters/gov/dynamic/obr_labour_supply_assumptions.yaml +9 -0
  99. policyengine_uk/parameters/gov/economic_assumptions/create_economic_assumption_indices.py +1 -1
  100. policyengine_uk/parameters/gov/economic_assumptions/yoy_growth.yaml +522 -153
  101. policyengine_uk/parameters/gov/hmrc/cgt/additional_rate.yaml +5 -0
  102. policyengine_uk/parameters/gov/hmrc/cgt/basic_rate.yaml +5 -0
  103. policyengine_uk/parameters/gov/hmrc/cgt/higher_rate.yaml +4 -0
  104. policyengine_uk/parameters/gov/hmrc/child_benefit/amount/additional.yaml +6 -6
  105. policyengine_uk/parameters/gov/hmrc/child_benefit/amount/eldest.yaml +8 -8
  106. policyengine_uk/parameters/gov/hmrc/child_benefit/takeup/by_age.yaml +1 -1
  107. policyengine_uk/parameters/gov/hmrc/fuel_duty/calculate_fuel_duty_rates.py +464 -0
  108. policyengine_uk/parameters/gov/hmrc/fuel_duty/petrol_and_diesel.yaml +86 -10
  109. policyengine_uk/parameters/gov/hmrc/income_tax/allowances/personal_allowance/amount.yaml +6 -0
  110. policyengine_uk/parameters/gov/hmrc/income_tax/earned_taxable_income_exclusions.yaml +2 -1
  111. policyengine_uk/parameters/gov/hmrc/income_tax/income_tax_additions.yaml +1 -0
  112. policyengine_uk/parameters/gov/hmrc/income_tax/rates/dividends.yaml +12 -0
  113. policyengine_uk/parameters/gov/hmrc/income_tax/rates/property.yaml +46 -0
  114. policyengine_uk/parameters/gov/hmrc/income_tax/rates/savings.yaml +46 -0
  115. policyengine_uk/parameters/gov/hmrc/income_tax/rates/scotland/rates.yaml +2 -2
  116. policyengine_uk/parameters/gov/hmrc/income_tax/rates/uk.yaml +14 -2
  117. policyengine_uk/parameters/gov/hmrc/national_insurance/class_1/rates/employee/additional.yaml +4 -6
  118. policyengine_uk/parameters/gov/hmrc/national_insurance/class_1/rates/employer.yaml +3 -3
  119. policyengine_uk/parameters/gov/hmrc/national_insurance/class_1/thresholds/secondary_threshold.yaml +14 -4
  120. policyengine_uk/parameters/gov/hmrc/national_insurance/class_2/flat_rate.yaml +2 -2
  121. policyengine_uk/parameters/gov/hmrc/national_insurance/salary_sacrifice_pension_cap.yaml +16 -0
  122. policyengine_uk/parameters/gov/hmrc/student_loans/interest_rates/index.yaml +12 -0
  123. policyengine_uk/parameters/gov/hmrc/student_loans/interest_rates/plan_1/boe_margin.yaml +11 -0
  124. policyengine_uk/parameters/gov/hmrc/student_loans/interest_rates/plan_2/additional_rate.yaml +27 -0
  125. policyengine_uk/parameters/gov/hmrc/student_loans/interest_rates/plan_2/index.yaml +16 -0
  126. policyengine_uk/parameters/gov/hmrc/student_loans/interest_rates/plan_2/upper_threshold.yaml +48 -0
  127. policyengine_uk/parameters/gov/hmrc/student_loans/interest_rates/postgraduate_additional_rate.yaml +11 -0
  128. policyengine_uk/parameters/gov/hmrc/student_loans/postgraduate_repayment_rate.yaml +9 -0
  129. policyengine_uk/parameters/gov/hmrc/student_loans/repayment_rate.yaml +9 -0
  130. policyengine_uk/parameters/gov/hmrc/student_loans/thresholds/plan_1.yaml +25 -0
  131. policyengine_uk/parameters/gov/hmrc/student_loans/thresholds/plan_2.yaml +58 -0
  132. policyengine_uk/parameters/gov/hmrc/student_loans/thresholds/plan_4.yaml +19 -0
  133. policyengine_uk/parameters/gov/hmrc/student_loans/thresholds/plan_5.yaml +16 -0
  134. policyengine_uk/parameters/gov/hmrc/student_loans/thresholds/postgraduate.yaml +21 -0
  135. policyengine_uk/parameters/gov/hmrc/vat/reduced_rate_share.yaml +3 -3
  136. policyengine_uk/parameters/gov/indices/private_rent_index.yaml +9 -9
  137. policyengine_uk/parameters/gov/revenue_scotland/lbtt/non_residential.yaml +2 -2
  138. policyengine_uk/parameters/gov/revenue_scotland/lbtt/rent.yaml +2 -2
  139. policyengine_uk/parameters/gov/revenue_scotland/lbtt/residential/first_time_buyer_rate.yaml +2 -2
  140. policyengine_uk/parameters/gov/revenue_scotland/lbtt/residential/rate.yaml +2 -2
  141. policyengine_uk/parameters/gov/wra/land_transaction_tax/non_residential.yaml +2 -2
  142. policyengine_uk/parameters/gov/wra/land_transaction_tax/rent.yaml +2 -2
  143. policyengine_uk/parameters/gov/wra/land_transaction_tax/residential/higher_rate.yaml +1 -1
  144. policyengine_uk/parameters/gov/wra/land_transaction_tax/residential/primary.yaml +2 -2
  145. policyengine_uk/parameters/household/consumption/carbon/consumption.yaml +8 -6
  146. policyengine_uk/parameters/household/consumption/carbon/intensity.yaml +4 -1
  147. policyengine_uk/parameters/household/consumption/carbon/production.yaml +12 -7
  148. policyengine_uk/parameters/household/consumption/carbon/production_by_source.yaml +76 -41
  149. policyengine_uk/parameters/household/consumption/fuel/prices/petrol.yaml +1 -1
  150. policyengine_uk/parameters/household/poverty/absolute_poverty_threshold_bhc.yaml +1 -1
  151. policyengine_uk/reforms/policyengine/adjust_budgets.py +0 -1
  152. policyengine_uk/scenarios/__init__.py +4 -0
  153. policyengine_uk/scenarios/pip_reform.py +23 -0
  154. policyengine_uk/scenarios/reindex_benefit_cap.py +32 -0
  155. policyengine_uk/scenarios/repeal_two_child_limit.py +10 -0
  156. policyengine_uk/scenarios/uc_reform.py +50 -0
  157. policyengine_uk/simulation.py +619 -0
  158. policyengine_uk/system.py +3 -257
  159. policyengine_uk/tax_benefit_system.py +141 -0
  160. policyengine_uk/tests/behavioral_responses/test_labor_supply_responses.yaml +183 -0
  161. policyengine_uk/tests/microsimulation/reforms_config.yaml +8 -8
  162. policyengine_uk/tests/microsimulation/test_reform_impacts.py +2 -2
  163. policyengine_uk/tests/microsimulation/test_salary_sacrifice_cap_reform.py +401 -0
  164. policyengine_uk/tests/microsimulation/test_validity.py +2 -3
  165. policyengine_uk/tests/microsimulation/update_reform_impacts.py +104 -40
  166. policyengine_uk/tests/policy/baseline/contrib/policyengine/employer_ni/employer_ni_fixed_employer_cost_change.yaml +105 -0
  167. policyengine_uk/tests/policy/baseline/finance/benefit/family/child_benefit.yaml +2 -0
  168. policyengine_uk/tests/policy/baseline/finance/benefit/family/income_support.yaml +0 -23
  169. policyengine_uk/tests/policy/baseline/gov/dcms/bbc/tv-licence/tv_licence.yaml +3 -0
  170. policyengine_uk/tests/policy/baseline/gov/dfe/extended_childcare_entitlement/extended_childcare_entitlement.yaml +17 -17
  171. policyengine_uk/tests/policy/baseline/gov/dwp/basic_state_pension.yaml +44 -0
  172. policyengine_uk/tests/policy/baseline/gov/hmrc/income_tax/allowances/gift_aid.yaml +71 -0
  173. policyengine_uk/tests/policy/baseline/gov/hmrc/income_tax/allowances/personal_allowance.yaml +161 -0
  174. policyengine_uk/tests/policy/baseline/gov/hmrc/national_insurance/salary_sacrifice_pension_ni_employee.yaml +107 -0
  175. policyengine_uk/tests/policy/baseline/gov/hmrc/national_insurance/salary_sacrifice_pension_ni_employer.yaml +95 -0
  176. policyengine_uk/tests/policy/baseline/gov/hmrc/student_loans/student_loan_interest_rate.yaml +153 -0
  177. policyengine_uk/tests/policy/baseline/gov/hmrc/student_loans/student_loan_repayment.yaml +130 -0
  178. policyengine_uk/tests/policy/baseline/household/wealth/vehicle.yaml +27 -0
  179. policyengine_uk/tests/policy/reforms/nov_2025_budget/income_source_tax_rates.yaml +235 -0
  180. policyengine_uk/tests/policy/reforms/nov_2025_budget/income_tax_freeze.yaml +83 -0
  181. policyengine_uk/tests/policy/reforms/parametric/basic_income/basic_income.yaml +1 -0
  182. policyengine_uk/tests/test_behavioral_responses.py +215 -0
  183. policyengine_uk/tests/test_fiscal_year_parameters.py +131 -0
  184. policyengine_uk/utils/__init__.py +1 -0
  185. policyengine_uk/utils/compare.py +28 -0
  186. policyengine_uk/utils/create_ahc_deflator.py +169 -0
  187. policyengine_uk/utils/create_triple_lock.py +1 -1
  188. policyengine_uk/utils/dependencies.py +259 -0
  189. policyengine_uk/utils/parameters.py +12 -1
  190. policyengine_uk/utils/scenario.py +225 -0
  191. policyengine_uk/utils/solve_private_school_attendance_factor.py +4 -6
  192. policyengine_uk/variables/contrib/policyengine/education_budget_change.py +0 -1
  193. policyengine_uk/variables/contrib/policyengine/employer_ni/baseline_employer_cost.py +5 -1
  194. policyengine_uk/variables/contrib/policyengine/employer_ni/employer_ni_fixed_employer_cost_change.py +23 -23
  195. policyengine_uk/variables/contrib/policyengine/employer_ni/employer_ni_response_capital_incidence.py +1 -1
  196. policyengine_uk/variables/contrib/policyengine/employer_ni/employer_ni_response_consumer_incidence.py +1 -1
  197. policyengine_uk/variables/contrib/policyengine/other_public_spending_budget_change.py +0 -1
  198. policyengine_uk/variables/gov/dfe/targeted_childcare_entitlement/targeted_childcare_entitlement_eligible.py +0 -1
  199. policyengine_uk/variables/gov/dft/rail_subsidy_spending.py +16 -1
  200. policyengine_uk/variables/gov/dft/rail_usage.py +16 -0
  201. policyengine_uk/variables/gov/dwp/BRMA_LHA_rate.py +7 -2
  202. policyengine_uk/variables/gov/dwp/LHA_category.py +4 -2
  203. policyengine_uk/variables/gov/dwp/additional_state_pension.py +4 -2
  204. policyengine_uk/variables/gov/dwp/basic_state_pension.py +26 -8
  205. policyengine_uk/variables/gov/dwp/is_CTC_eligible.py +1 -1
  206. policyengine_uk/variables/gov/dwp/is_benefit_cap_exempt.py +9 -13
  207. policyengine_uk/variables/gov/dwp/is_benefit_cap_exempt_earnings.py +66 -0
  208. policyengine_uk/variables/gov/dwp/is_benefit_cap_exempt_health_disability.py +75 -0
  209. policyengine_uk/variables/gov/dwp/is_benefit_cap_exempt_other.py +66 -0
  210. policyengine_uk/variables/gov/dwp/winter_fuel_allowance.py +5 -4
  211. policyengine_uk/variables/gov/gov_tax.py +0 -2
  212. policyengine_uk/variables/gov/hmrc/household_tax.py +0 -1
  213. policyengine_uk/variables/gov/hmrc/income_tax/allowances/gift_aid.py +23 -0
  214. policyengine_uk/variables/gov/hmrc/income_tax/allowances/personal_allowance.py +9 -2
  215. policyengine_uk/variables/gov/hmrc/income_tax/income_tax_pre_charges.py +1 -0
  216. policyengine_uk/variables/gov/hmrc/income_tax/liability/property_income_tax.py +75 -0
  217. policyengine_uk/variables/gov/hmrc/income_tax/liability/savings_income_tax.py +4 -4
  218. policyengine_uk/variables/gov/hmrc/national_insurance/salary_sacrifice_broad_base_haircut.py +43 -0
  219. policyengine_uk/variables/gov/hmrc/national_insurance/salary_sacrifice_pension_ni_employee.py +38 -0
  220. policyengine_uk/variables/gov/hmrc/national_insurance/salary_sacrifice_pension_ni_employer.py +27 -0
  221. policyengine_uk/variables/gov/hmrc/pensions/pension_contributions_via_salary_sacrifice_adjusted.py +31 -0
  222. policyengine_uk/variables/gov/hmrc/pensions/salary_sacrifice_returned_to_income.py +41 -0
  223. policyengine_uk/variables/gov/hmrc/student_loans/__init__.py +2 -0
  224. policyengine_uk/variables/gov/hmrc/student_loans/plan_1_interest_rate.py +23 -0
  225. policyengine_uk/variables/gov/hmrc/student_loans/plan_2_interest_rate.py +31 -0
  226. policyengine_uk/variables/gov/hmrc/student_loans/plan_4_interest_rate.py +22 -0
  227. policyengine_uk/variables/gov/hmrc/student_loans/plan_5_interest_rate.py +18 -0
  228. policyengine_uk/variables/gov/hmrc/student_loans/postgraduate_interest_rate.py +23 -0
  229. policyengine_uk/variables/gov/hmrc/student_loans/student_loan_plan.py +27 -0
  230. policyengine_uk/variables/gov/hmrc/student_loans/student_loan_repayment.py +91 -0
  231. policyengine_uk/variables/gov/hmrc/student_loans/student_loan_repayment_rate.py +31 -0
  232. policyengine_uk/variables/gov/hmrc/would_claim_child_benefit.py +5 -1
  233. policyengine_uk/variables/household/demographic/benunit/benunit_count_adults.py +11 -0
  234. policyengine_uk/variables/household/demographic/is_disabled_for_benefits.py +13 -1
  235. policyengine_uk/variables/household/income/hbai_household_net_income.py +29 -1
  236. policyengine_uk/variables/household/income/hbai_household_net_income_ahc.py +13 -0
  237. policyengine_uk/variables/household/income/household_net_income.py +5 -1
  238. policyengine_uk/variables/household/income/inflation_adjustment.py +24 -0
  239. policyengine_uk/variables/household/post_tax_income.py +12 -0
  240. policyengine_uk/variables/household/wealth/num_vehicles.py +9 -0
  241. policyengine_uk/variables/household/wealth/owns_vehicle.py +17 -0
  242. policyengine_uk/variables/input/consumption/property/council_tax.py +0 -35
  243. policyengine_uk/variables/input/consumption/property/employee_pension_contributions.py +8 -1
  244. policyengine_uk/variables/input/consumption/property/employee_pension_contributions_reported.py +16 -0
  245. policyengine_uk/variables/input/consumption/property/pension_contributions_via_salary_sacrifice.py +16 -0
  246. policyengine_uk/variables/input/employment_income.py +2 -0
  247. policyengine_uk/variables/input/rent.py +0 -40
  248. policyengine_uk/variables/input/savings_interest_income.py +3 -1
  249. {policyengine_uk-2.40.1.dist-info → policyengine_uk-2.65.6.dist-info}/METADATA +17 -8
  250. {policyengine_uk-2.40.1.dist-info → policyengine_uk-2.65.6.dist-info}/RECORD +252 -173
  251. {policyengine_uk-2.40.1.dist-info → policyengine_uk-2.65.6.dist-info}/WHEEL +1 -1
  252. policyengine_uk/repo.py +0 -3
  253. policyengine_uk/tests/policy/baseline/gov/abolitions/abolition_parameters.yaml +0 -250
  254. policyengine_uk/variables/contrib/policyengine/high_income_incident_tax_change.py +0 -22
  255. policyengine_uk-2.40.1.data/data/share/openfisca/openfisca-country-template/CHANGELOG.md +0 -2285
  256. policyengine_uk-2.40.1.data/data/share/openfisca/openfisca-country-template/README.md +0 -37
  257. policyengine_uk-2.40.1.dist-info/licenses/LICENSE +0 -661
  258. {policyengine_uk-2.40.1.data/data/share/openfisca/openfisca-country-template → policyengine_uk-2.65.6.dist-info/licenses}/LICENSE +0 -0
@@ -0,0 +1,105 @@
1
+ - name: Baseline scenario returns zero
2
+ period: 2023
3
+ absolute_error_margin: 0
4
+ input:
5
+ employment_income_before_lsr: 50000
6
+ employment_income_behavioral_response: 0
7
+ employer_pension_contributions: 0
8
+ output:
9
+ employer_ni_fixed_employer_cost_change: 0
10
+
11
+ - name: Low income below threshold returns zero
12
+ period: 2023
13
+ absolute_error_margin: 0
14
+ input:
15
+ employment_income_before_lsr: 8000
16
+ employment_income_behavioral_response: 0
17
+ employer_pension_contributions: 0
18
+ output:
19
+ employer_ni_fixed_employer_cost_change: 0
20
+
21
+ - name: Zero employee incidence returns zero
22
+ period: 2023
23
+ absolute_error_margin: 0
24
+ input:
25
+ employment_income_before_lsr: 50000
26
+ employment_income_behavioral_response: 0
27
+ employer_pension_contributions: 0
28
+ gov.contrib.policyengine.employer_ni.employee_incidence: 0
29
+ output:
30
+ employer_ni_fixed_employer_cost_change: 0
31
+
32
+ - name: High income baseline scenario returns zero
33
+ period: 2023
34
+ absolute_error_margin: 0
35
+ input:
36
+ employment_income_before_lsr: 100000
37
+ employment_income_behavioral_response: 0
38
+ employer_pension_contributions: 0
39
+ output:
40
+ employer_ni_fixed_employer_cost_change: 0
41
+
42
+ - name: With employer pension contributions baseline returns zero
43
+ period: 2023
44
+ absolute_error_margin: 0
45
+ input:
46
+ employment_income_before_lsr: 50000
47
+ employment_income_behavioral_response: 0
48
+ employer_pension_contributions: 5000
49
+ output:
50
+ employer_ni_fixed_employer_cost_change: 0
51
+
52
+ - name: With statutory benefits baseline returns zero
53
+ period: 2023
54
+ absolute_error_margin: 0
55
+ input:
56
+ employment_income_before_lsr: 45000
57
+ employment_income_behavioral_response: 0
58
+ employer_pension_contributions: 0
59
+ statutory_sick_pay: 2000
60
+ statutory_maternity_pay: 3000
61
+ statutory_paternity_pay: 0
62
+ output:
63
+ employer_ni_fixed_employer_cost_change: 0
64
+
65
+ - name: Income exactly at threshold baseline returns zero
66
+ period: 2023
67
+ absolute_error_margin: 0
68
+ input:
69
+ employment_income_before_lsr: 9100
70
+ employment_income_behavioral_response: 0
71
+ employer_pension_contributions: 0
72
+ output:
73
+ employer_ni_fixed_employer_cost_change: 0
74
+
75
+ - name: Income slightly above threshold baseline returns zero
76
+ period: 2023
77
+ absolute_error_margin: 0
78
+ input:
79
+ employment_income_before_lsr: 9500
80
+ employment_income_behavioral_response: 0
81
+ employer_pension_contributions: 0
82
+ output:
83
+ employer_ni_fixed_employer_cost_change: 0
84
+
85
+ - name: Pension contribution exemption disabled baseline returns zero
86
+ period: 2023
87
+ absolute_error_margin: 0
88
+ input:
89
+ employment_income_before_lsr: 50000
90
+ employment_income_behavioral_response: 0
91
+ employer_pension_contributions: 5000
92
+ gov.contrib.policyengine.employer_ni.exempt_employer_pension_contributions: false
93
+ output:
94
+ employer_ni_fixed_employer_cost_change: 0
95
+
96
+ - name: Different incidence rate baseline returns zero
97
+ period: 2023
98
+ absolute_error_margin: 0
99
+ input:
100
+ employment_income_before_lsr: 50000
101
+ employment_income_behavioral_response: 0
102
+ employer_pension_contributions: 0
103
+ gov.contrib.policyengine.employer_ni.employee_incidence: 0.5
104
+ output:
105
+ employer_ni_fixed_employer_cost_change: 0
@@ -26,6 +26,7 @@
26
26
  benunits:
27
27
  benunit:
28
28
  members: [parent1, parent2, child1]
29
+ would_claim_child_benefit: true
29
30
  output:
30
31
  child_benefit: 1098
31
32
  - name: Child Benefit with two children, one over 16
@@ -45,5 +46,6 @@
45
46
  benunits:
46
47
  benunit:
47
48
  members: [parent1, parent2, child1, child2]
49
+ would_claim_child_benefit: true
48
50
  output:
49
51
  child_benefit: 1825.20
@@ -1,26 +1,3 @@
1
- - name: Lone parent, two children
2
- period: 2021
3
- absolute_error_margin: 1_000 # Temporarily for now
4
- input:
5
- people:
6
- p1:
7
- age: 26
8
- income_support_reported: true
9
- working_tax_credit_reported: true
10
- child_tax_credit_reported: true
11
- c1:
12
- age: 4
13
- c2:
14
- age: 4
15
- benunits:
16
- b1:
17
- members: [p1, c1, c2]
18
- would_claim_child_benefit: true
19
- output:
20
- child_tax_credit: 6205
21
- child_benefit: 35 * 52
22
- income_support_eligible: true
23
- income_support: 81 * 52
24
1
  - name: Lone parent, two children, earnings
25
2
  period: 2021
26
3
  absolute_error_margin: 5
@@ -1,6 +1,7 @@
1
1
  - name: TV Licence full price - ineligible for aged or blind discount.
2
2
  period: 2023
3
3
  input:
4
+ household_owns_tv: true
4
5
  tv_licence_discount: 0
5
6
  would_evade_tv_licence_fee: false
6
7
  output:
@@ -9,6 +10,7 @@
9
10
  - name: TV Licence half price - eligible for blind discount but not aged.
10
11
  period: 2023
11
12
  input:
13
+ household_owns_tv: true
12
14
  tv_licence_discount: 0.5
13
15
  would_evade_tv_licence_fee: false
14
16
  output:
@@ -17,6 +19,7 @@
17
19
  - name: Free TV Licence - eligible for aged discount.
18
20
  period: 2023
19
21
  input:
22
+ household_owns_tv: true
20
23
  tv_licence_discount: 1
21
24
  would_evade_tv_licence_fee: false
22
25
  output:
@@ -1,6 +1,6 @@
1
1
  - name: Eligible for 30 hours - All conditions met
2
2
  period: 2025
3
- absolute_error_margin: 1
3
+ absolute_error_margin: 3
4
4
  input:
5
5
  people:
6
6
  child1:
@@ -10,11 +10,11 @@
10
10
  members: [child1]
11
11
  extended_childcare_entitlement_eligible: true
12
12
  output:
13
- extended_childcare_entitlement: 6857.356
13
+ extended_childcare_entitlement: 6872.805
14
14
 
15
15
  - name: Eligible for 15 hours - All first conditions met
16
16
  period: 2025
17
- absolute_error_margin: 1
17
+ absolute_error_margin: 2
18
18
  input:
19
19
  people:
20
20
  child1:
@@ -24,7 +24,7 @@
24
24
  members: [child1]
25
25
  extended_childcare_entitlement_eligible: true
26
26
  output:
27
- extended_childcare_entitlement: 4828.138
27
+ extended_childcare_entitlement: 4839.016
28
28
 
29
29
  - name: Not eligible (one condition not met)
30
30
  period: 2025
@@ -42,7 +42,7 @@
42
42
 
43
43
  - name: Eligible for mixed hours - Family with multiple children
44
44
  period: 2025
45
- absolute_error_margin: 1
45
+ absolute_error_margin: 4
46
46
  input:
47
47
  people:
48
48
  child1:
@@ -54,7 +54,7 @@
54
54
  members: [child1, child2]
55
55
  extended_childcare_entitlement_eligible: true
56
56
  output:
57
- extended_childcare_entitlement: 11685.494
57
+ extended_childcare_entitlement: 11711.82
58
58
 
59
59
  - name: Not eligible - Family with multiple children but conditions not met
60
60
  period: 2025
@@ -74,7 +74,7 @@
74
74
 
75
75
  - name: Eligible with one working parent and one disabled parent
76
76
  period: 2025
77
- absolute_error_margin: 1
77
+ absolute_error_margin: 6
78
78
  input:
79
79
  people:
80
80
  child1:
@@ -89,7 +89,7 @@
89
89
  family_type: COUPLE_WITH_CHILDREN
90
90
  extended_childcare_entitlement_eligible: true
91
91
  output:
92
- extended_childcare_entitlement: 18542.85
92
+ extended_childcare_entitlement: 18584.625
93
93
 
94
94
  - name: No expenses for zero hours
95
95
  period: 2025
@@ -107,7 +107,7 @@
107
107
 
108
108
  - name: Child using fewer hours than maximum entitlement
109
109
  period: 2025
110
- absolute_error_margin: 1
110
+ absolute_error_margin: 2
111
111
  input:
112
112
  people:
113
113
  child1:
@@ -118,11 +118,11 @@
118
118
  members: [child1]
119
119
  extended_childcare_entitlement_eligible: true
120
120
  output:
121
- extended_childcare_entitlement: 4571.5703 # 20 hours * 38 weeks * £6.07 per hour (2025 rate)
121
+ extended_childcare_entitlement: 4581.87 # 20 hours * 38 weeks * £6.07 per hour (2025 rate)
122
122
 
123
123
  - name: Child using fewer hours than maximum entitlement - multiple children
124
124
  period: 2025
125
- absolute_error_margin: 1
125
+ absolute_error_margin: 2
126
126
  input:
127
127
  people:
128
128
  child1:
@@ -136,11 +136,11 @@
136
136
  members: [child1, child2]
137
137
  extended_childcare_entitlement_eligible: true
138
138
  output:
139
- extended_childcare_entitlement: 6647.4365
139
+ extended_childcare_entitlement: 6662.413
140
140
 
141
141
  - name: Benefit unit maximum hours cap applied
142
142
  period: 2025
143
- absolute_error_margin: 1
143
+ absolute_error_margin: 5
144
144
  input:
145
145
  people:
146
146
  child1:
@@ -155,7 +155,7 @@
155
155
  extended_childcare_entitlement_eligible: true
156
156
  maximum_extended_childcare_hours_usage: 40
157
157
  output:
158
- extended_childcare_entitlement: 13714.712
158
+ extended_childcare_entitlement: 13745.609
159
159
 
160
160
 
161
161
  - name: Benefit unit without maximum hours cap applied
@@ -172,12 +172,12 @@
172
172
  extended_childcare_entitlement_eligible: true
173
173
  maximum_extended_childcare_hours_usage: 10
174
174
  output:
175
- extended_childcare_entitlement: 2285.7852
175
+ extended_childcare_entitlement: 2290.935
176
176
 
177
177
 
178
178
  - name: Benefit unit without maximum hours cap applied with 3 years old child
179
179
  period: 2025
180
- absolute_error_margin: 1
180
+ absolute_error_margin: 2
181
181
  input:
182
182
  people:
183
183
  child1:
@@ -189,4 +189,4 @@
189
189
  extended_childcare_entitlement_eligible: true
190
190
  maximum_extended_childcare_hours_usage: 18
191
191
  output:
192
- extended_childcare_entitlement: 3428.678
192
+ extended_childcare_entitlement: 3436.402
@@ -0,0 +1,44 @@
1
+ - name: Basic state pension calculation with normal parameters
2
+ period: 2021
3
+ input:
4
+ people:
5
+ person1:
6
+ state_pension_reported: 5000
7
+ state_pension_type: BASIC
8
+ age: 70
9
+ output:
10
+ basic_state_pension: 5000 # Reported amount (under maximum)
11
+
12
+ - name: Basic state pension caps at maximum when reported exceeds maximum
13
+ period: 2021
14
+ input:
15
+ people:
16
+ person1:
17
+ state_pension_reported: 10000 # Higher than maximum
18
+ state_pension_type: BASIC
19
+ age: 70
20
+ output:
21
+ basic_state_pension: 7155.2 # Capped at maximum (137.60 * 52)
22
+
23
+ - name: Non-basic state pension type returns zero for basic_state_pension
24
+ period: 2021
25
+ input:
26
+ people:
27
+ person1:
28
+ state_pension_reported: 5000
29
+ state_pension_type: NEW # Not basic pension
30
+ age: 70
31
+ output:
32
+ basic_state_pension: 0 # basic_state_pension is only for BASIC type
33
+
34
+ - name: Basic state pension should be zero when maximum is zero
35
+ period: 2021
36
+ input:
37
+ gov.dwp.state_pension.basic_state_pension.amount: 0
38
+ people:
39
+ person1:
40
+ state_pension_reported: 5000
41
+ state_pension_type: BASIC
42
+ age: 70
43
+ output:
44
+ basic_state_pension: 0
@@ -0,0 +1,71 @@
1
+ # Gift Aid tests
2
+ # ITA 2007 s.58 requires grossed-up Gift Aid to be deducted from ANI
3
+ # when calculating Personal Allowance taper
4
+
5
+ - name: Higher rate taxpayer gets 40% relief
6
+ period: 2025
7
+ absolute_error_margin: 1
8
+ input:
9
+ employment_income: 60000
10
+ gift_aid: 1000
11
+ output:
12
+ # Basic rate band is £37,700, PA is £12,570
13
+ # Higher rate threshold = £50,270
14
+ # £60k income means in 40% band
15
+ # £1k gift aid reduces taxable income by £1k, saving 40%
16
+ income_tax: 11032
17
+
18
+ - name: Basic rate taxpayer gets 20% relief
19
+ period: 2025
20
+ absolute_error_margin: 1
21
+ input:
22
+ employment_income: 30000
23
+ gift_aid: 1000
24
+ output:
25
+ # In basic rate band, £1k gift aid saves 20%
26
+ income_tax: 3286
27
+
28
+ - name: Gift Aid reduces ANI for PA taper - full PA restored
29
+ period: 2025
30
+ absolute_error_margin: 1
31
+ input:
32
+ employment_income: 110000
33
+ gift_aid: 10000
34
+ output:
35
+ # Per ITA 2007 s.58, Gift Aid (grossed up) reduces ANI for PA taper
36
+ # £10k net = £12,500 gross
37
+ # ANI for PA taper = £110k - £12.5k = £97,500
38
+ # This is below £100k threshold, so full PA restored
39
+ personal_allowance: 12570
40
+
41
+ - name: Gift Aid partially restores PA in taper zone
42
+ period: 2025
43
+ absolute_error_margin: 1
44
+ input:
45
+ employment_income: 115000
46
+ gift_aid: 4000
47
+ output:
48
+ # £4k net = £5k gross
49
+ # ANI for PA taper = £115k - £5k = £110k
50
+ # Excess over £100k = £10k
51
+ # PA reduction = £10k * 0.5 = £5k
52
+ # PA = £12,570 - £5k = £7,570
53
+ personal_allowance: 7570
54
+
55
+ - name: PA taper zone effective relief is ~60%
56
+ period: 2025
57
+ absolute_error_margin: 50
58
+ input:
59
+ employment_income: 110000
60
+ gift_aid: 10000
61
+ output:
62
+ # Without gift aid: PA = £7,570, tax ~£33,432
63
+ # With £10k gift aid (£12.5k gross):
64
+ # - ANI for PA taper reduced to £97,500 (below £100k)
65
+ # - Full PA £12,570 restored
66
+ # - Taxable = £110k - £12,570 (PA) - £10k (gift aid) = £87,430
67
+ # - Tax at basic rate (£37,700): £7,540
68
+ # - Tax at higher rate (£87,430 - £37,700 = £49,730): £19,892
69
+ # - Total: £27,432
70
+ # Tax savings: ~£6,000 = 60% effective relief on £10k donation
71
+ income_tax: 27432
@@ -0,0 +1,161 @@
1
+ # Personal Allowance tests
2
+ # ITA 2007 s.35: Personal Allowance
3
+ # ITA 2007 s.58: ANI for PA taper excludes grossed-up Gift Aid
4
+
5
+ # ============================================
6
+ # Basic PA tests (no Gift Aid)
7
+ # ============================================
8
+
9
+ - name: Full PA below taper threshold
10
+ period: 2025
11
+ absolute_error_margin: 1
12
+ input:
13
+ employment_income: 50000
14
+ output:
15
+ # Below £100k threshold, full PA
16
+ personal_allowance: 12570
17
+
18
+ - name: Full PA at exactly taper threshold
19
+ period: 2025
20
+ absolute_error_margin: 1
21
+ input:
22
+ employment_income: 100000
23
+ output:
24
+ # At exactly £100k, no taper yet
25
+ personal_allowance: 12570
26
+
27
+ - name: PA taper begins above £100k
28
+ period: 2025
29
+ absolute_error_margin: 1
30
+ input:
31
+ employment_income: 105000
32
+ output:
33
+ # £5k over threshold, lose £2.5k PA (50% taper)
34
+ # PA = £12,570 - £2,500 = £10,070
35
+ personal_allowance: 10070
36
+
37
+ - name: PA fully tapered at £125,140
38
+ period: 2025
39
+ absolute_error_margin: 1
40
+ input:
41
+ employment_income: 125140
42
+ output:
43
+ # £25,140 over threshold, lose all PA (50% of £25,140 = £12,570)
44
+ personal_allowance: 0
45
+
46
+ - name: PA remains zero above full taper
47
+ period: 2025
48
+ absolute_error_margin: 1
49
+ input:
50
+ employment_income: 150000
51
+ output:
52
+ personal_allowance: 0
53
+
54
+ # ============================================
55
+ # PA taper with Gift Aid (ITA 2007 s.58)
56
+ # These tests verify the fix for grossed-up Gift Aid deduction
57
+ # ============================================
58
+
59
+ - name: Gift Aid does not affect PA below taper threshold
60
+ period: 2025
61
+ absolute_error_margin: 1
62
+ input:
63
+ employment_income: 50000
64
+ gift_aid: 5000
65
+ output:
66
+ # Already below £100k, Gift Aid doesn't change PA
67
+ personal_allowance: 12570
68
+
69
+ - name: Gift Aid reduces ANI for taper - partial restoration
70
+ period: 2025
71
+ absolute_error_margin: 1
72
+ input:
73
+ employment_income: 105000
74
+ gift_aid: 4000
75
+ output:
76
+ # Without Gift Aid: ANI = £105k, PA = £10,070
77
+ # Gift Aid = £4k, grossed up = £5k
78
+ # ANI for taper = £105k - £5k = £100k (at threshold)
79
+ # Full PA restored
80
+ personal_allowance: 12570
81
+
82
+ - name: Gift Aid partially restores PA in deep taper
83
+ period: 2025
84
+ absolute_error_margin: 1
85
+ input:
86
+ employment_income: 120000
87
+ gift_aid: 8000
88
+ output:
89
+ # Without Gift Aid: ANI = £120k, excess = £20k, PA reduction = £10k
90
+ # Gift Aid = £8k, grossed up = £10k
91
+ # ANI for taper = £120k - £10k = £110k
92
+ # Excess = £10k, PA reduction = £5k
93
+ # PA = £12,570 - £5,000 = £7,570
94
+ personal_allowance: 7570
95
+
96
+ - name: Gift Aid fully restores PA from zero
97
+ period: 2025
98
+ absolute_error_margin: 1
99
+ input:
100
+ employment_income: 130000
101
+ gift_aid: 24000
102
+ output:
103
+ # Without Gift Aid: ANI = £130k, PA = £0
104
+ # Gift Aid = £24k, grossed up = £30k
105
+ # ANI for taper = £130k - £30k = £100k (at threshold)
106
+ # Full PA restored
107
+ personal_allowance: 12570
108
+
109
+ # ============================================
110
+ # Edge cases with zero Gift Aid
111
+ # Verify the fix doesn't break anything when gift_aid = 0
112
+ # ============================================
113
+
114
+ - name: Zero Gift Aid - PA taper works normally at £110k
115
+ period: 2025
116
+ absolute_error_margin: 1
117
+ input:
118
+ employment_income: 110000
119
+ gift_aid: 0
120
+ output:
121
+ # ANI = £110k, excess = £10k, PA reduction = £5k
122
+ # PA = £12,570 - £5,000 = £7,570
123
+ personal_allowance: 7570
124
+
125
+ - name: Zero Gift Aid - PA taper works normally at £115k
126
+ period: 2025
127
+ absolute_error_margin: 1
128
+ input:
129
+ employment_income: 115000
130
+ gift_aid: 0
131
+ output:
132
+ # ANI = £115k, excess = £15k, PA reduction = £7.5k
133
+ # PA = £12,570 - £7,500 = £5,070
134
+ personal_allowance: 5070
135
+
136
+ - name: Zero Gift Aid - PA fully tapered
137
+ period: 2025
138
+ absolute_error_margin: 1
139
+ input:
140
+ employment_income: 150000
141
+ gift_aid: 0
142
+ output:
143
+ personal_allowance: 0
144
+
145
+ # ============================================
146
+ # Scottish taxpayer tests
147
+ # PA taper should work the same regardless of region
148
+ # ============================================
149
+
150
+ - name: Scottish taxpayer - PA taper with Gift Aid
151
+ period: 2025
152
+ absolute_error_margin: 1
153
+ input:
154
+ employment_income: 110000
155
+ gift_aid: 10000
156
+ country: "SCOTLAND"
157
+ output:
158
+ # Gift Aid = £10k, grossed up = £12.5k
159
+ # ANI for taper = £110k - £12.5k = £97.5k (below £100k)
160
+ # Full PA restored
161
+ personal_allowance: 12570
@@ -0,0 +1,107 @@
1
+ - name: No employee NI charge when salary sacrifice below £2,000 cap
2
+ period: 2025
3
+ absolute_error_margin: 0.01
4
+ input:
5
+ employment_income: 40_000
6
+ pension_contributions_via_salary_sacrifice: 1_500
7
+ gov.hmrc.national_insurance.salary_sacrifice_pension_cap: 2_000
8
+ gov.contrib.behavioral_responses.salary_sacrifice_broad_base_haircut_rate: 0
9
+ output:
10
+ salary_sacrifice_pension_ni_employee: 0
11
+
12
+ - name: Employee NI charge at 8% main rate for moderate earner above cap
13
+ period: 2025
14
+ absolute_error_margin: 0.01
15
+ input:
16
+ employment_income: 45_000
17
+ pension_contributions_via_salary_sacrifice: 2_250
18
+ gov.hmrc.national_insurance.salary_sacrifice_pension_cap: 2_000
19
+ gov.contrib.behavioral_responses.salary_sacrifice_broad_base_haircut_rate: 0
20
+ output:
21
+ # £250 excess * 8% = £20
22
+ salary_sacrifice_pension_ni_employee: (2_250 - 2_000) * 0.08
23
+
24
+ - name: Employee NI charge at 8% main rate for earner just below UEL
25
+ period: 2025
26
+ absolute_error_margin: 0.01
27
+ input:
28
+ employment_income: 50_000
29
+ pension_contributions_via_salary_sacrifice: 10_000
30
+ gov.hmrc.national_insurance.salary_sacrifice_pension_cap: 2_000
31
+ gov.contrib.behavioral_responses.salary_sacrifice_broad_base_haircut_rate: 0
32
+ output:
33
+ # £8,000 excess * 8% = £640
34
+ salary_sacrifice_pension_ni_employee: (10_000 - 2_000) * 0.08
35
+
36
+ - name: Employee NI charge at 2% additional rate for high earner above UEL
37
+ period: 2025
38
+ absolute_error_margin: 0.01
39
+ input:
40
+ employment_income: 125_000
41
+ pension_contributions_via_salary_sacrifice: 25_000
42
+ gov.hmrc.national_insurance.salary_sacrifice_pension_cap: 2_000
43
+ gov.contrib.behavioral_responses.salary_sacrifice_broad_base_haircut_rate: 0
44
+ output:
45
+ # £23,000 excess * 2% = £460
46
+ salary_sacrifice_pension_ni_employee: (25_000 - 2_000) * 0.02
47
+
48
+ - name: Employee NI charge at 2% for earner well above UEL
49
+ period: 2025
50
+ absolute_error_margin: 0.01
51
+ input:
52
+ employment_income: 80_000
53
+ pension_contributions_via_salary_sacrifice: 5_000
54
+ gov.hmrc.national_insurance.salary_sacrifice_pension_cap: 2_000
55
+ gov.contrib.behavioral_responses.salary_sacrifice_broad_base_haircut_rate: 0
56
+ output:
57
+ # £3,000 excess * 2% = £60
58
+ salary_sacrifice_pension_ni_employee: (5_000 - 2_000) * 0.02
59
+
60
+ - name: No employee NI charge when exactly at cap
61
+ period: 2025
62
+ absolute_error_margin: 0.01
63
+ input:
64
+ employment_income: 60_000
65
+ pension_contributions_via_salary_sacrifice: 2_000
66
+ gov.hmrc.national_insurance.salary_sacrifice_pension_cap: 2_000
67
+ gov.contrib.behavioral_responses.salary_sacrifice_broad_base_haircut_rate: 0
68
+ output:
69
+ salary_sacrifice_pension_ni_employee: 0
70
+
71
+ - name: Employee NI charge for small excess over cap
72
+ period: 2025
73
+ absolute_error_margin: 0.01
74
+ input:
75
+ employment_income: 35_000
76
+ pension_contributions_via_salary_sacrifice: 2_100
77
+ gov.hmrc.national_insurance.salary_sacrifice_pension_cap: 2_000
78
+ gov.contrib.behavioral_responses.salary_sacrifice_broad_base_haircut_rate: 0
79
+ output:
80
+ # £100 excess * 8% = £8
81
+ salary_sacrifice_pension_ni_employee: 100 * 0.08
82
+
83
+ - name: Employee NI on full redirected excess
84
+ period: 2025
85
+ absolute_error_margin: 0.01
86
+ input:
87
+ employment_income: 45_000
88
+ pension_contributions_via_salary_sacrifice: 3_000
89
+ gov.hmrc.national_insurance.salary_sacrifice_pension_cap: 2_000
90
+ gov.contrib.behavioral_responses.salary_sacrifice_broad_base_haircut_rate: 0
91
+ output:
92
+ # £1,000 excess * 8% = £80
93
+ salary_sacrifice_pension_ni_employee: (3_000 - 2_000) * 0.08
94
+ # Full excess is redirected (no targeted haircut)
95
+ salary_sacrifice_returned_to_income: 1_000
96
+
97
+ - name: Broad-base haircut reduces all workers employment income
98
+ period: 2025
99
+ absolute_error_margin: 1
100
+ input:
101
+ employment_income_before_lsr: 50_000
102
+ pension_contributions_via_salary_sacrifice: 0
103
+ gov.hmrc.national_insurance.salary_sacrifice_pension_cap: 2_000
104
+ gov.contrib.behavioral_responses.salary_sacrifice_broad_base_haircut_rate: 0.0016
105
+ output:
106
+ # Worker with no salary sacrifice still has employment income reduced by 0.16%
107
+ salary_sacrifice_broad_base_haircut: -80 # -50_000 * 0.0016