macrostat.models.GL06PC.behavior#

This module will define the forward and simulate behavior of the Godley-Lavoie 2006 PC model.

Classes

BehaviorGL06PC([parameters, scenarios, ...])

Behavior class for the Godley-Lavoie 2006 PC model.

class macrostat.models.GL06PC.behavior.BehaviorGL06PC(parameters: ParametersGL06PC | None = None, scenarios: ScenariosGL06PC | None = None, variables: VariablesGL06PC | None = None, scenario: int = 0, debug: bool = False)[source]#

Bases: Behavior

Behavior class for the Godley-Lavoie 2006 PC model.

central_bank_bill_holdings(t: int, scenario: dict, params: dict | None = None, **kwargs)[source]#

Calculate the central bank bill holdings.

Parameters:
  • t (int) – The time step.

  • scenario (dict) – The scenario.

  • params (dict | None) – The parameters.

Equations

\begin{align} B_{CB}(t) = B_{s}(t) - B_{h}(t) \end{align}

Dependency

  • state: GovernmentBillStock

  • state: HouseholdBillStock

Sets

  • CentralBankBillStock

central_bank_money_stock(t: int, scenario: dict, params: dict | None = None, **kwargs)[source]#

Calculate the central bank money stock.

Parameters:
  • t (int) – The time step.

  • scenario (dict) – The scenario.

  • params (dict | None) – The parameters.

Equations

\begin{align} H_{s}(t) = H_{s}(t-1) + (B_{CB}(t) - B_{CB}(t-1)) \end{align}

Dependency

  • state: CentralBankBillStock

  • prior: CentralBankMoneyStock

  • prior: CentralBankBillStock

Sets

  • CentralBankMoneyStock

central_bank_profits(t: int, scenario: dict, params: dict | None = None, **kwargs)[source]#

Calculate the central bank profits (income on bills held).

Parameters:
  • t (int) – The time step.

  • scenario (dict) – The scenario.

  • params (dict | None) – The parameters.

Equations

\begin{align} r(t-1)B_{CB}(t-1) \end{align}

Dependency

  • prior: InterestRate

  • prior: CentralBankBillStock

Sets

  • CentralBankProfits

compute_theoretical_steady_state_per_step(t: int, params: dict, scenario: dict)[source]#

Compute the theoretical steady state of the model for each given period. This is done per-period as there are parameters and scenarios that may be time-varying, so the interpretation is a timeseries of the theoretical steady state at a given period based on the parameters and scenarios at that period.

Parameters:
  • params (dict) – The parameters at the given period

  • scenario (dict) – The scenarios at the given period

Equations

\begin{align} G^\star(t) &= G(t)\\ r^\star(t) &= r(t)\\ \alpha_3 &= \frac{1-\alpha_1}{\alpha_2}\\ YD^\star(t) &= \frac{G^\star(t)}{\frac{\theta}{1-\theta} - r^\star(t)\cdot\left(\left(\lambda_0 + \lambda_1 r^\star(t) \right)\alpha_3 - \lambda_2\right)}\\ C^\star(t) &= YD^\star(t)\\ Y^\star(t) &= C^\star(t) + G^\star(t)\\ V^\star(t) &= \alpha_3 YD^\star(t)\\ B_h^\star(t) &= \left(\left(\lambda_0 + \lambda_1 r^\star(t) \right)\alpha_3 - \lambda_2\right)\cdot YD^\star(t)\\ T^\star(t) &= \theta\cdot \left(Y^\star(t) + r^\star(t) B_h^\star(t)\right)\\ H_h^\star(t) &= V^{\star}(t) - B_h^\star(t)\\ B_s^\star(t) &= \frac{r^\star(t) B_{CB}^\star(t) + T^\star(t) - G^\star(t)}{r^\star(t)}\\ B_{CB}^\star(t) &= B_s^\star(t) - B_h^\star(t)\\ H_s^\star(t) &= H_{s}(t-1) + (B_{CB}(t) - B_{CB}(t-1)) \end{align}
consumption(t: int, scenario: dict, params: dict | None = None, **kwargs)[source]#

Calculate the consumption.

Parameters:
  • t (int) – The time step.

  • scenario (dict) – The scenario.

  • params (dict | None) – The parameters.

Equations

\begin{align} C(t) = \alpha_1 YD(t) + \alpha_2 V(t-1) \end{align}

Dependency

  • state: DisposableIncome

  • prior: Wealth

  • params: PropensityToConsumeIncome

  • params: PropensityToConsumeSavings

Sets

  • ConsumptionHousehold

consumption_government(t: int, scenario: dict, params: dict | None = None, **kwargs)[source]#

Calculate the consumption of the government. This is given exogenously by the scenario.

Parameters:
  • t (int) – The time step.

  • scenario (dict) – The scenario.

  • params (dict | None) – The parameters.

Dependency

  • scenario: ConsumptionGovernment

Sets

  • ConsumptionGovernment

disposable_income(t: int, scenario: dict, params: dict | None = None, **kwargs)[source]#

Calculate the disposable income.

Parameters:
  • t (int) – The time step.

  • scenario (dict) – The scenario.

  • params (dict | None) – The parameters.

Equations

\begin{align} YD(t) = Y(t) - T(t) + r(t-1)B_h(t-1) \end{align}

Dependency

  • state: NationalIncome

  • state: Taxes

  • state: InterestEarnedOnBillsHousehold

Sets

  • DisposableIncome

government_bill_issuance(t: int, scenario: dict, params: dict | None = None, **kwargs)[source]#

Calculate the government bill issuance.

Parameters:
  • t (int) – The time step.

  • scenario (dict) – The scenario.

  • params (dict | None) – The parameters.

Equations

\begin{align} B_s(t) = B_s(t-1) + (G(t) - r(t-1)B_s(t-1)) - (T(t) + r(t-1)B_{CB}(t-1)) \end{align}

Dependency

  • prior: GovernmentBillStock

  • state: GovernmentDemand

  • state: Taxes

  • state: CentralBankProfits

Sets

  • GovernmentBillStock

household_bill_holdings(t: int, scenario: dict, params: dict | None = None, **kwargs)[source]#

Calculate the household bill holdings.

Parameters:
  • t (int) – The time step.

  • scenario (dict) – The scenario.

  • params (dict | None) – The parameters.

Equations

\begin{align} \frac{B_h(t)}{V(t)} = \lambda_0 + \lambda_1 r(t) - \lambda_2 \frac{YD(t)}{V(t)} \end{align}

Dependency

  • state: Wealth

  • state: DisposableIncome

  • state: InterestRate

  • params: WealthShareBills_Constant

  • params: WealthShareBills_InterestRate

  • params: WealthShareBills_Income

Sets

  • HouseholdBillStock

household_money_stock(t: int, scenario: dict, params: dict | None = None, **kwargs)[source]#

Calculate the household deposits as a residual.

Parameters:
  • t (int) – The time step.

  • scenario (dict) – The scenario.

  • params (dict | None) – The parameters.

Equations

\begin{align} H_h(t) = V(t) - B_h(t) \end{align}

Dependency

  • state: Wealth

  • state: HouseholdBillStock

Sets

  • HouseholdMoneyStock

initialize()[source]#

Initialize the behavior of the Godley-Lavoie 2006 PC model.

Within the book the initialization is generally to set all non-scenario variables to zero. Accordingly

Equations

\begin{align} C(0) &= 0 \\ G(0) &= 0 \\ Y(0) &= 0 \\ T(0) &= 0 \\ YD(0) &= 0 \\ V(0) &= 0 \\ H_s(0) &= 0 \\ H_h(0) &= 0 \\ B_h(0) &= 0 \\ B_s(0) &= 0 \\ B_{CB}(0) &= 0 \\ r(0) &= 0 \\ \end{align}

Dependency

Sets

  • ConsumptionHousehold

  • ConsumptionGovernment

  • NationalIncome

  • InterestEarnedOnBillsHousehold

  • CentralBankProfits

  • Taxes

  • HouseholdMoneyStock

  • CentralBankMoneyStock

  • HouseholdBillStock

  • GovernmentBillStock

  • CentralBankBillStock

  • Wealth

  • InterestRate

  • DisposableIncome

interest_earned_on_bills_household(t: int, scenario: dict, params: dict | None = None, **kwargs)[source]#

Calculate the interest earned on bills by the household.

Parameters:
  • t (int) – The time step.

  • scenario (dict) – The scenario.

  • params (dict | None) – The parameters.

Equations

\begin{align} r(t-1)B_h(t-1) \end{align}

Dependency

  • prior: InterestRate

  • prior: HouseholdBillStock

Sets

  • InterestEarnedOnBillsHousehold

national_income(t: int, scenario: dict, params: dict | None = None, **kwargs)[source]#

Calculate the national income based on the closed-form solution derived in the documentation.

The closed-form solution is used to avoid the need to solve the system of equations iteratively, thus preserving the differentiability of the model trajectory.

Parameters:
  • t (int) – The time step.

  • scenario (dict) – The scenario.

  • params (dict | None) – The parameters.

Equations

\begin{align} Y(t) = \frac{\alpha_1(1-\theta)r(t-1)B_h(t-1) + \alpha_2 V(t-1) + G(t)}{1 - \alpha_1(1-\theta)} \end{align}

Dependency

  • params: PropensityToConsumeIncome

  • params: TaxRate

  • state: InterestEarnedOnBillsHousehold

  • params: PropensityToConsumeSavings

  • prior: Wealth

  • state: ConsumptionGovernment

Sets

  • NationalIncome

set_interest_rate(t: int, scenario: dict, params: dict | None = None, **kwargs)[source]#

Set the interest rate. This is given exogenously by the scenario.

Parameters:
  • t (int) – The time step.

  • scenario (dict) – The scenario.

  • params (dict | None) – The parameters.

Dependency

  • scenario: InterestRate

Sets

  • InterestRate

step(**kwargs)[source]#

Step function of the Godley-Lavoie 2006 PC model.

taxes(t: int, scenario: dict, params: dict | None = None, **kwargs)[source]#

Calculate the taxes.

Parameters:
  • t (int) – The time step.

  • scenario (dict) – The scenario.

  • params (dict | None) – The parameters.

Equations

\begin{align} T(t) = \theta (Y(t) + r(t-1)B_h(t-1)) \end{align}

Dependency

  • params: TaxRate

  • state: NationalIncome

  • state: InterestEarnedOnBillsHousehold

Sets

  • Taxes

training: bool#
version = 'GL06PC'#
wealth(t: int, scenario: dict, params: dict | None = None, **kwargs)[source]#

Calculate the wealth.

Parameters:
  • t (int) – The time step.

  • scenario (dict) – The scenario.

  • params (dict | None) – The parameters.

Equations

\begin{align} V(t) = V(t-1) + YD(t) - C(t) \end{align}

Dependency

  • state: DisposableIncome

  • state: ConsumptionHousehold

  • prior: Wealth

Sets

  • Wealth