`inflation_adjustment` prices to the year the simulation runs

Aperta
#2,875 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@MaxGhenis ci sta già lavorando.

Dal 5/11/2026.

  • #2876 di @MaxGhenis — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
data

Direzione di ricerca

Start with policyengine_uk/variables/household/income/inflation_adjustment.py, especially lines 16 and 38, and trace how its CPI parameters feed the four real income variables named in the issue. Check how policyengine-core handles identical inputs and formulas, then inspect the labels that read the clock. The issue is resolved when a configurable price base year makes reruns stable and the AHC adjustment uses a consistent CPI ratio.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

inflation_adjustment (policyengine_uk/variables/household/income/inflation_adjustment.py:16) divides CPI in the year datetime.datetime.now() returns by CPI in the period. So real_household_net_income, real_household_net_income_ahc, real_hbai_household_net_income and real_hbai_household_net_income_ahc give different answers for the same inputs in 2026 and 2027, although policyengine-core holds a formula to identical outputs for identical inputs (PolicyEngine/policyengine-core#500). The labels of inflation_adjustment, inflation_adjustment_ahc, real_household_net_income and real_household_net_income_ahc read the clock too.

A price base year in the parameters would give a rerun next year this year's answer, and a reform could change it.

Nothing in policyengine-uk reads inflation_adjustment_ahc. It reads the clock as well (:38), and it divides consumer_price_index in that year by consumer_price_index_ahc in the period, so its ratio mixes two indices.

Lingua principale
Python
Stelle
53
Fork
34
Merge medio
3g 8h
PR unite (30g)
323

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PolicyEngine/policyengine-uk

Tutte le issue di PolicyEngine/policyengine-uk

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.