macrostat.models.GL06PC#

Godley & Lavoie (2006, Chapter 4) Model PC

The macrostat.models.GL06PC module consists of the following classes

GL06PC(parameters, variables, scenarios, ...)

PC model class for the Godley-Lavoie 2006 PC model.

behavior

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

parameters

Parameters class for the Godley-Lavoie 2006 PC model.

scenarios

Scenarios class for the Godley-Lavoie 2006 PC model.

variables

Variables class for the Godley-Lavoie 2006 PC model.

class macrostat.models.GL06PC.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)[source]#

Calculate the central bank bill holdings.

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

  • scenario (dict) – The scenario.

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)[source]#

Calculate the central bank money stock.

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

  • scenario (dict) – The scenario.

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)[source]#

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

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

  • scenario (dict) – The scenario.

Equations

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

Dependency

  • prior: InterestRate

  • prior: CentralBankBillStock

Sets

  • CentralBankProfits

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

Calculate the consumption.

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

  • scenario (dict) – The scenario.

Equations

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

Dependency

  • state: DisposableIncome

  • prior: Wealth

Sets

  • ConsumptionHousehold

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

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

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

  • scenario (dict) – The scenario.

Dependency

  • scenario: ConsumptionGovernment

Sets

  • ConsumptionGovernment

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

Calculate the disposable income.

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

  • scenario (dict) – The scenario.

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)[source]#

Calculate the government bill issuance.

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

  • scenario (dict) – The scenario.

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

  • state: InterestEarnedOnBillsCentralBank

Sets

  • GovernmentBillStock

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

Calculate the household bill holdings.

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

  • scenario (dict) – The scenario.

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: DisposableIncome

  • state: Wealth

  • state: InterestRate

Sets

  • HouseholdBillStock

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

Calculate the household deposits as a residual.

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

  • scenario (dict) – The scenario.

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

  • InterestEarnedOnBillsCentralBank

  • CentralBankProfits

  • Taxes

  • HouseholdMoneyStock

  • CentralBankMoneyStock

  • HouseholdBillStock

  • GovernmentBillStock

  • CentralBankBillStock

  • Wealth

  • InterestRate

  • DisposableIncome

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

Calculate the interest earned on bills by the central bank.

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

  • scenario (dict) – The scenario.

Equations

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

Dependency

  • prior: InterestRate

  • prior: CentralBankBillStock

Sets

  • InterestEarnedOnBillsCentralBank

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

Calculate the interest earned on bills by the household.

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

  • scenario (dict) – The scenario.

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)[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.

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

  • state: InterestEarnedOnBillsHousehold

  • state: ConsumptionGovernment

  • prior: Wealth

Sets

  • NationalIncome

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

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

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

  • scenario (dict) – The scenario.

Dependency

  • scenario: InterestRate

Sets

  • InterestRate

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

Step function of the Godley-Lavoie 2006 PC model.

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

Calculate the taxes.

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

  • scenario (dict) – The scenario.

Equations

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

Dependency

  • state: NationalIncome

  • state: InterestEarnedOnBillsHousehold

Sets

  • Taxes

version = 'GL06PC'#
wealth(t: int, scenario: dict)[source]#

Calculate the wealth.

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

  • scenario (dict) – The scenario.

Equations

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

Dependency

  • state: DisposableIncome

  • state: ConsumptionHousehold

  • prior: Wealth

Sets

  • Wealth

class macrostat.models.GL06PC.GL06PC(parameters: ~macrostat.models.GL06PC.parameters.ParametersGL06PC | None = <macrostat.models.GL06PC.parameters.ParametersGL06PC object>, variables: ~macrostat.models.GL06PC.variables.VariablesGL06PC | None = None, scenarios: ~macrostat.models.GL06PC.scenarios.ScenariosGL06PC | None = None, *args, **kwargs)[source]#

Bases: Model

PC model class for the Godley-Lavoie 2006 PC model.

version = 'GL06PC'#
class macrostat.models.GL06PC.ParametersGL06PC(parameters: dict | None = None, hyperparameters: dict | None = None, bounds: dict | None = None, *args, **kwargs)[source]#

Bases: Parameters

Parameters class for the Godley-Lavoie 2006 PC model.

get_default_hyperparameters()[source]#

Return the default hyperparameter values.

get_default_parameters()[source]#

Return the default parameter values.

version = 'PC'#
class macrostat.models.GL06PC.ScenariosGL06PC(scenario_info: dict | None = None, parameters: ParametersGL06PC | None = None, *args, **kwargs)[source]#

Bases: Scenarios

Scenarios class for the Godley-Lavoie 2006 PC model.

get_default_scenario_values()[source]#

Return the default scenario values.

version = 'GL06PC'#
class macrostat.models.GL06PC.VariablesGL06PC(variable_info: dict | None = None, timeseries: dict | None = None, parameters: ParametersGL06PC | None = None, *args, **kwargs)[source]#

Bases: Variables

Variables class for the Godley-Lavoie 2006 PC model.

check_health(tolerance: float = 0.0001)[source]#

Check the health of the variables by verifying that the redundant equations hold and that all the assets and liabilities are positive.

Parameters:

tolerance (float (default: 1e-4)) – The tolerance for the checks.

Equations

Redundant equations:
\begin{align} H_h(t) = H_s(t) \end{align}
General checks:
\begin{align} A(t) &> 0 & L(t) &> 0 \end{align}

where \(A(t)\) are all assets and \(L(t)\) are all liabilities.

Returns:

True if the variables are healthy, False otherwise.

Return type:

bool

get_default_variables()[source]#

Return the default variables information dictionary.

version = 'GL06PC'#