macrostat.models.GL06PC#
Godley & Lavoie (2006, Chapter 4) Model PC
The macrostat.models.GL06PC module consists of the following classes
|
PC model class for the Godley-Lavoie 2006 PC model. |
This module will define the forward and simulate behavior of the Godley-Lavoie 2006 PC model. |
|
Parameters class for the Godley-Lavoie 2006 PC model. |
|
Scenarios class for the Godley-Lavoie 2006 PC model. |
|
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:
BehaviorBehavior 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:
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:
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:
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:
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:
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:
Dependency
scenario: ConsumptionGovernment
Sets
ConsumptionGovernment
- disposable_income(t: int, scenario: dict, params: dict | None = None, **kwargs)[source]#
Calculate the disposable income.
- 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:
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:
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:
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:
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:
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:
Dependency
scenario: InterestRate
Sets
InterestRate
- taxes(t: int, scenario: dict, params: dict | None = None, **kwargs)[source]#
Calculate the taxes.
- 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
- version = 'GL06PC'#
- class macrostat.models.GL06PC.GL06PC(parameters: ParametersGL06PC | None = <macrostat.models.GL06PC.parameters.ParametersGL06PC object>, variables: VariablesGL06PC | None = None, scenarios: ScenariosGL06PC | None = None, *args, **kwargs)[source]#
Bases:
ModelPC 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:
ParametersParameters class for the Godley-Lavoie 2006 PC model.
- version = 'PC'#
- class macrostat.models.GL06PC.ScenariosGL06PC(scenario_info: dict | None = None, parameters: ParametersGL06PC | None = None, *args, **kwargs)[source]#
Bases:
ScenariosScenarios class for the Godley-Lavoie 2006 PC model.
- version = 'GL06PC'#
- class macrostat.models.GL06PC.VariablesGL06PC(variable_info: dict | None = None, timeseries: dict | None = None, parameters: ParametersGL06PC | None = None, *args, **kwargs)[source]#
Bases:
VariablesVariables 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:
- version = 'GL06PC'#