Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/net-wealth.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added `net_wealth` (total wealth net of mortgage, consumer, and student loan debt) and the `mortgage_debt` and `consumer_debt` household inputs. Unlike gross `total_wealth`, net wealth can be negative when a household's debts exceed its assets.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
- name: Net wealth subtracts mortgage, consumer and student-loan debt
period: 2026
absolute_error_margin: 1
input:
total_wealth: 500_000
mortgage_debt: 200_000
consumer_debt: 10_000
student_loan_balance: 15_000
output:
net_wealth: 275_000

- name: Net wealth is negative when debts exceed assets
period: 2026
absolute_error_margin: 1
input:
total_wealth: 50_000
mortgage_debt: 120_000
output:
net_wealth: -70_000

- name: Net wealth equals total wealth with no debt
period: 2026
absolute_error_margin: 1
input:
total_wealth: 300_000
output:
net_wealth: 300_000
22 changes: 22 additions & 0 deletions policyengine_uk/variables/household/wealth/net_wealth.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from policyengine_uk.model_api import *


class net_wealth(Variable):
label = "Net wealth"
documentation = (
"Total wealth less mortgage, consumer, and student loan debt. Unlike "
"total_wealth (gross assets), net wealth can be negative when a "
"household's debts exceed its assets."
)
entity = Household
definition_period = YEAR
value_type = float
unit = GBP
quantity_type = STOCK

def formula(household, period, parameters):
total_wealth = household("total_wealth", period)
mortgage_debt = household("mortgage_debt", period)
consumer_debt = household("consumer_debt", period)
student_loan_debt = add(household, period, ["student_loan_balance"])
return total_wealth - mortgage_debt - consumer_debt - student_loan_debt
13 changes: 13 additions & 0 deletions policyengine_uk/variables/input/consumer_debt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from policyengine_uk.model_api import *


class consumer_debt(Variable):
label = "consumer debt"
documentation = "Outstanding non-mortgage, non-student-loan borrowing (personal loans, credit, hire purchase), imputed from the Wealth and Assets Survey"
entity = Household
definition_period = YEAR
value_type = float
unit = GBP
uprating = "gov.economic_assumptions.indices.obr.per_capita.gdp"
quantity_type = STOCK
default_value = 0
13 changes: 13 additions & 0 deletions policyengine_uk/variables/input/mortgage_debt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from policyengine_uk.model_api import *


class mortgage_debt(Variable):
label = "mortgage debt"
documentation = "Outstanding debt secured on UK land or property (mortgages and secured loans), imputed from the Wealth and Assets Survey"
entity = Household
definition_period = YEAR
value_type = float
unit = GBP
uprating = "gov.economic_assumptions.indices.obr.per_capita.gdp"
quantity_type = STOCK
default_value = 0