Skip to content

Commit

Permalink
Add economic assumptions
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilwoodruff committed Jul 24, 2024
1 parent d5d4d7f commit a8acbca
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: Raise energy spending by this percentage.
values:
2000-01-01: 0
metadata:
unit: /1
label: Change to energy spending
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: Raise all market incomes by this percentage.
values:
2000-01-01: 0
metadata:
unit: /1
label: Change to GDP per capita
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: Raise the interest rate on mortgages by this percentage.
values:
2000-01-01: 0
metadata:
unit: /1
label: Change to interest rates
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: Raise rental expenses by this percentage.
values:
2000-01-01: 0
metadata:
unit: /1
label: Change to rents
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: Raise transport expenses by this percentage.
values:
2000-01-01: 0
metadata:
unit: /1
label: Change to transport spending
7 changes: 6 additions & 1 deletion policyengine_uk/variables/household/income/income.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class inflation_adjustment(Variable):
def formula(household, period, parameters):
cpi = parameters.calibration.uprating.CPI
current_period_cpi = cpi(period)
now_cpi = cpi(datetime.datetime.now().strftime("%Y-%m-%d"))
now_cpi = cpi(datetime.datetime.now().strftime("%Y-01-01"))
return now_cpi / current_period_cpi


Expand Down Expand Up @@ -360,6 +360,11 @@ class household_market_income(Variable):
"capital_gains",
]

def formula(person, period, parameters):
total = add(person, period, household_market_income.adds)
contrib = parameters(period).gov.contrib.policyengine.economy.gdp_per_capita
return total * (contrib + 1)


class household_income_decile(Variable):
label = "household income decile"
Expand Down

0 comments on commit a8acbca

Please sign in to comment.