You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Weekly FRS amounts are annualised with 365.25/7 but policyengine-uk's weekly rules divide by 52 #531
policyengine-uk converts annual amounts back to weekly with WEEKS_IN_YEAR = 52 (policyengine-core commons/formulas.py) before applying weekly rules. Examples are the Housing Benefit and council tax reduction earnings and income disregards, the £20 sub-tenant and board-and-lodging disregards, and non-dependant deduction bands.
So any weekly FRS amount reaches the model's weekly tests about 0.34% (365.25 / 364) higher than the survey recorded. A lodger paying exactly £20 a week, which the law disregards in full (HB Regs 2006 Sch 5 para 22), is counted at about £0.07 a week (£3.57 a year). Independent review of policyengine-uk#2002 and policyengine-uk-data#506 raised this.
Options
Agree one producer/consumer contract. For example, uk-data could annualise amounts that feed weekly tests with 52, or policyengine-uk could convert with 365.25 / 7 where a rule is weekly.
Keep the gap and document it as a known approximation, with its size.
Either way, the choice should apply across all weekly-tested inputs, not just #506's two columns. Measure the effect on HB, CTR, Pension Credit and non-dependant deductions with a real build before choosing.
Problem
policyengine-uk-data and policyengine-uk use different weeks-per-year factors for the same amounts.
WEEKS_IN_YEAR = 365.25 / 7(about 52.18;policyengine_uk_data/datasets/frs.py). That covers earnings, benefits, rents and, from Carry the rent boarders and lodgers pay the householder as person inputs #506, the rent boarders and lodgers pay.WEEKS_IN_YEAR = 52(policyengine-corecommons/formulas.py) before applying weekly rules. Examples are the Housing Benefit and council tax reduction earnings and income disregards, the £20 sub-tenant and board-and-lodging disregards, and non-dependant deduction bands.So any weekly FRS amount reaches the model's weekly tests about 0.34% (365.25 / 364) higher than the survey recorded. A lodger paying exactly £20 a week, which the law disregards in full (HB Regs 2006 Sch 5 para 22), is counted at about £0.07 a week (£3.57 a year). Independent review of policyengine-uk#2002 and policyengine-uk-data#506 raised this.
Options
Either way, the choice should apply across all weekly-tested inputs, not just #506's two columns. Measure the effect on HB, CTR, Pension Credit and non-dependant deductions with a real build before choosing.
🤖 Generated with Claude Code