Skip to main content

Government

Properties

Government(Agent Properties)
government.py
class Government(mesa.Agent):
"""A Government agent."""

def __init__(self,
coupon_rate,
tax_data,
num_producer,
expenditure_data,
unique_id,
model) -> None:
super().__init__(unique_id, model)

self.breed = "Government"
self.period = 0 # Model run step.
self.tax_data = tax_data # Government tax rates.
# Pure government expenditures in in nominal terms.
self.expenditure_data = expenditure_data

# (G) Government expenditure in each step.
self.pure_expenditure = Decimal(0)
# (θ) Rate of tax in each step.
self.taxation_rate = Decimal(0)
# (Gd) Services demanded by Government.
self.services_demanded = Decimal(0)
# (Bhs) Proportion of bills as interest-bearing money supplied to households.
self.bills_issued_to_households = Decimal(0)
# (Bcbs) Proportion of bills as interest-bearing money supplied to central bank.
self.bills_issued_to_central_bank = Decimal(0)
# (INT_Bh) Total interest-bearing bill payments made to households.
self.interest_on_households_bills = Decimal(0)
# (INT_Bcb) Total interest-bearing bill payments made to the central bank.
self.interest_on_central_bank_bills = Decimal(0)
# (Fcb) Profits on interest-bearing bills held by the central bank.
self.central_bank_profits = Decimal(0)
# (Td) Tax policy
self.taxation_revenue = Decimal(0)
# (GD) Government debt (public debt), in nominal terms.
self.debt = Decimal(0)

""" Government Issued Consols (Long-Term Bonds)
Proportion govt debt in the form of long-term bonds, 'consols',
also called 'perpetuities' because thay are never redeemed.
Actually, this is in effect a long-term bond account the value
of which is adjusted in response to household demands.
"""
# (PbL) Market price of a long-term bond.
self.bond_price = Decimal(0)
# (PbL_Last) (t-1)
self.bond_price_last_step = Decimal(0)
# (BLs)
self.bonds_issued = Decimal(0)
# (BLs_Last) (t-1)
self.bonds_issued_last_step = Decimal(0)
# The coupon rate of a perpetuity: A percentage value.
self.coupon_rate = Decimal(coupon_rate)
# (rbL) The long-term rate of interest, aka the 'bond yield (to maturity)'.
self.bond_yield = Decimal(0)
# (INT_BLh) Total coupon revenue payments made to households.
self.interest_on_bonds = Decimal(0)

""" Government Issued Bills:
Government bills are new money that is created from an increase in government debt.
New money bills (Bs) transform into long-term bonds (BLs), interest-bearing money
held by households (Bhd) or interest-bearing money held by the central bank (Bcbd).
"""
# (Bs): 'bills_issued' is expressed in terms of the additional change in
# Treasury bills that are issued within this period (step).
self.bills_issued = Decimal(0)
# The deficit / surplus of bills issued.
self.fiscal_balance = Decimal(0)

# Number of producers in the system.
self.num_producers = Decimal(num_producer)

Behaviour Comments

Government(Agent Comments)
government.py
def step(self):
""" Government Functions (each and every step):
1 Update the amount of new (pure) expenditure.
2 Update, if changed, the (taxation) obligation rate.
3 Connect with and distribute pure expenditures to Producers.
4 Distribute interest on Treasury bills and long-term bond coupon payments, if any,
to Households and the Central Bank. (t-1)
5 Calculate the value of a perpetuity.
6 Government budget constraint: Issue or redeem existing Treasury bills. (t)
"""

# 6
""" G&L p146: Govt Budget Constraint (Bs): A Story
(Equation 5.14) ΔBs ≡ Bs - Bs₋₁ == ((G + rb₋₁ * Bs₋₁ + BLs₋₁)
- (T + rb₋₁ * Bcb₋₁)
- ΔBLs₋₁ * PbL)

"The bills 'Bs' that need to be newly issued are equal to government expenditures,
including its interest payments minus the govt revenues - taxes and central bank profits -
plus the value of the newly issued long-term bonds. Needless to say, when there is a
government surplus, or when the government deficit is financed by new issues of
long-term bonds, the change in Treasury bills will be negative and bills will be redeemed."

G&L p147: A Story: "Suppose that households do not want to hold so many bonds,
either because of a change in their liquidity preference, or because they expect
a fall in the price of bonds. Households will thus offer part of their holdings of
bonds for sale. We can assume that the central bank purchases the offered bonds at
the previously set price, and immediately turns around, asking the Treasury to redeem
the bonds so obtained, exchanging them for the new issue of bills of an equivalent amount.

This story is compatible with equation (5.14) which says the government issues new
bills as a response to a government deficit and as a response to changes in the
value of newly issued or newly retired bonds, so that we do have
'government.bonds_issued' = 'household.bonds_demanded', while the central bank still
only holds bills."

Agent model issue: Household agents do not currently 'buy' or 'sell' government bonds.
Their demands for government bonds as part of their portfolio of money assets work in the
same way as do their demands for interest-bearing bills, that is, it is a savings account
an agent will add part of its wealth to, or subtract part of its wealth from.
There is currently no accounting for the relationship between a household agent
central bank and government in the instance that a household wishes to lower its holding
of govt bonds. A household will simply adjust for its portfolio composition change in
'household.bonds_demanded', at the same time 'government.bonds_issued' is adjusted
(in the opposite direction) to reflect the total amount of bonds the government now
has outstanding to the household sector. Bond coupon payments to households
adjust in the next step.

Therefore, the final part of G&L equation 5.14, that is, '- ΔBLs₋₁ * PbL'
(see '_value_of_new_bonds_issued'), is currently set to 0 in the model.
"""

Calculate Bond Price

bond-price.py
# Utility: Catch divide by zero error.
def zero_division(n, d):
return n / d if d else Decimal(0)

# 5
"""
G&L pp131-132: The value of a perpetuity (long-term bond) in this step.
"""
# Use the interest rate from the previous step to calculate the price
# of a long-term bond in this step.
self.bond_price = zero_division(self.coupon_rate, central_bank.base_rate)

# Use the bond price in this step to calculate the long-term
# rate of interest (bond yield (to maturity)).
self.bond_yield = zero_division(self.coupon_rate, self.bond_price)

Issue New or Redeem Bills

issue-bills.py
# 6
expenditures = (abs(self.services_demanded)
+ abs(self.interest_on_households_bills)
+ abs(self.interest_on_central_bank_bills)
+ abs(self.interest_on_bonds))

# Taxes and central bank profits.
revenues = self.taxation_revenue + self.central_bank_profits

# This would be: ((self.bonds_issued
# - self.bonds_issued_last_step)
# * self.bond_price)
_value_of_new_bonds_issued = Decimal(0) # See Comments: 'A Story'.

self.debt = ((expenditures
- revenues)
- _value_of_new_bonds_issued)

_closing_debt = self.debt
_change_in_debt = _closing_debt - _opening_debt

# Change in debt (ΔBs) aka, the 'fiscal balance',
# is a positive amount if running a deficit, negative if surplus.
self.bills_issued -= _change_in_debt
self.fiscal_balance = _change_in_debt

Behaviour Functions

View Government agent behavioural logic.