Aggregates Equations
Contents
Aggregates Equations¶
aggregates.py modules
ogcore.aggregates¶
Functions to compute economic aggregates.¶
- ogcore.aggregates.get_B(b, p, method, preTP)[source]¶
Calculate aggregate savings
\[B_{t} = \sum_{s=E}^{E+S}\sum_{j=0}^{J}\omega_{s,t}\lambda_{j}b_{j,s,t}\]- Parameters
b (Numpy array) – savings of households
p (OG-Core Specifications object) – model parameters
method (str) – adjusts calculation dimensions based on ‘SS’ or ‘TPI’
preTP (bool) – whether calculation is for the pre-time path period amount of savings. If True, then need to use omega_S_preTP.
- Returns
aggregate supply of savings
- Return type
B (array_like)
- ogcore.aggregates.get_BQ(r, b_splus1, j, p, method, preTP)[source]¶
Calculation of aggregate bequests. If use_zeta is False, then computes aggregate bequests within each lifetime income group.
\[BQ_{t} = \sum_{s=E}^{E+S}\sum_{j=0}^{J}\rho_{s}\omega_{s,t} \lambda_{j}b_{j,s+1,1}\]- Parameters
r (array_like) – the real interest rate
b_splus1 (numpy array) – household savings one period ahead
j (int) – index of lifetime income group
p (OG-Core Specifications object) – model parameters
method (str) – adjusts calculation dimensions based on SS or TPI
preTP (bool) – whether calculation is for the pre-time path period amount of savings. If True, then need to use omega_S_preTP.
- Returns
- aggregate bequests, overall or by lifetime
income group, depending on use_zeta value.
- Return type
BQ (array_like)
- ogcore.aggregates.get_C(c, p, method)[source]¶
Calculation of aggregate consumption.
\[C_{t} = \sum_{s=E}^{E+S}\sum_{j=0}^{J}\omega_{s,t} \lambda_{j}c_{j,s,t}\]- Parameters
c (Numpy array) – consumption of households
p (OG-Core Specifications object) – model parameters
method (str) – adjusts calculation dimensions based on ‘SS’ or ‘TPI’
- Returns
aggregate consumption
- Return type
C (array_like)
- ogcore.aggregates.get_I(b_splus1, K_p1, K, p, method)[source]¶
Calculate aggregate investment.
\[I_{t} = (1 + g_{n,t+1})e^{g_{y}}(K_{t+1} - \sum_{s=E}^{E+S} \sum_{j=0}^{J}\omega_{s+1,t}i_{s+1,t}\lambda_{j}b_{j,s+1,t+1} \ (1+ g_{n,t+1})) - (1 - \delta)K_{t}\]- Parameters
b_splus1 (Numpy array) – savings of households
K_p1 (array_like) – aggregate capital, one period ahead
K (array_like) – aggregate capital
p (OG-Core Specifications object) – model parameters
method (str) – adjusts calculation dimensions based on ‘SS’ or ‘TPI’, also compute total investment (not net of immigrants)
- Returns
aggregate investment
- Return type
aggI (array_like)
- ogcore.aggregates.get_K_splits(B, K_demand_open, D_d, zeta_K)[source]¶
Returns total domestic capital as well as amounts of domestic capital held by domestic and foreign investors separately.
\[\begin{split}\begin{split} \hat{K}_{t} &= \hat{K}^{f}_{t} + \hat{K}^{d}_{t}\\ \hat{K}^{d}_{t} &= \hat{B}_{t} + \hat{D}^{d}_{t}\\ \hat{K}^{f}_{t} &= \zeta_{D}\left(\hat{K}^{open}_{t} - K^{d}_{t}\right) \end{split}\end{split}\]- Parameters
B (array_like) – aggregate savings by domestic households
K_demand_open (array_like) – capital demand at the world interest rate
D_d (array_like) – governmet debt held by domestic households
zeta_K (array_like) – fraction of excess capital demand satisfied by foreign investors
- Returns
series of capital stocks:
K (array_like): total capital
K_d (array_like): capital held by domestic households
K_f (array_like): capital held by foreign households
- Return type
(tuple)
- ogcore.aggregates.get_L(n, p, method)[source]¶
Calculate aggregate labor supply.
\[L_{t} = \sum_{s=E}^{E+S}\sum_{j=0}^{J}\omega_{s,t}\lambda_{j}n_{j,s,t}\]- Parameters
n (Numpy array) – labor supply of households
p (OG-Core Specifications object) – model parameters
method (str) – adjusts calculation dimensions based on ‘SS’ or ‘TPI’
- Returns
aggregate labor supply
- Return type
L (array_like)
- ogcore.aggregates.get_r_p(r, r_gov, K, K_g, D, MPKg, p, method)[source]¶
Compute the interest rate on the household’s portfolio of assets, a mix of government debt and private equity.
\[r_{p,t} = \frac{r_{gov,t}D_{t} + r_{K,t}K_{t}}{D_{t} + K_{t}}\]- Parameters
r (array_like) – the real interest rate
r_gov (array_like) – the real interest rate on government debt
K (array_like) – aggregate private capital
K_g (array_like) – aggregate public capital
D (array_like) – aggregate government debt
MPKg (array_like) – marginal product of government capital
p (OG-Core Specifications object) – model parameters
method (str) – adjusts calculation dimensions based on ‘SS’ or ‘TPI’
- Returns
the real interest rate on the household portfolio
- Return type
r_p (array_like)
- ogcore.aggregates.resource_constraint(Y, C, G, I_d, I_g, K_f, new_borrowing_f, debt_service_f, r, p)[source]¶
Compute the error in the resource constraint.
\[\begin{split}\text{rc_error} &= \hat{Y}_t - \hat{C}_t - \Bigl(e^{g_y}\bigl[1 + \tilde{g}_{n,t+1}\bigr]\hat{K}^d_{t+1} - \hat{K}^d_t\Bigr) - \delta\hat{K}_t - \hat{G}_t - \hat{I}_{g,t} - r_{p,t}\hat{K}^f_t ... \\ &\quad\quad + \Bigl(e^{g_y}\bigl[1 + \tilde{g}_{n,t+1}\bigr]\hat{D}^f_{t+1} - \hat{D}^f_t\Bigr) - r_{p,t}\hat{D}^f_t \quad\forall t\end{split}\]- Parameters
Y (array_like) – aggregate output
C (array_like) – aggregate consumption
G (array_like) – aggregate government spending
I_d (array_like) – aggregate private investment from domestic households
I_g (array_like) – investment in government capital
K_f (array_like) – aggregate capital that is foreign-owned
new_borrowing_f (array_like) – new borrowing of government debt from foreign investors
debt_service_f (array_like) – interest payments on government debt owned by foreigners
r (array_like) – the real interest rate
p (OG-Core Specifications object) – model parameters
- Returns
error in the resource constraint
- Return type
rc_error (array_like)
- ogcore.aggregates.revenue(r, w, b, n, bq, c, Y, L, K, factor, ubi, theta, etr_params, p, method)[source]¶
Calculate aggregate tax revenue.
\[R_{t} = \sum_{s=E}^{E+S}\sum_{j=0}^{J}\omega_{s,t}\lambda_{j} (T_{j,s,t} + \tau^{p}_{t}w_{t}e_{j,s}n_{j,s,t} - \theta_{j} w_{t} + \tau^{bq}bq_{j,s,t} + \tau^{c}_{s,t}c_{j,s,t} + \tau^{w}_{t}b_{j,s,t}) + \tau^{b}_{t}(Y_{t}-w_{t}L_{t}) - \tau^{b}_{t}\delta^{\tau}_{t}K^{\tau}_{t}\]- Parameters
r (array_like) – the real interest rate
w (array_like) – the real wage rate
b (Numpy array) – household savings
n (Numpy array) – household labor supply
bq (Numpy array) – household bequests received
c (Numpy array) – household consumption
Y (array_like) – aggregate output
L (array_like) – aggregate labor
K (array_like) – aggregate capital
factor (scalar) – scaling factor converting model units to dollars
ubi (array_like) – universal basic income household distributions
theta (Numpy array) – social security replacement rate for each lifetime income group
etr_params (Numpy array) – paramters of the effective tax rate functions
p (OG-Core Specifications object) – model parameters
method (str) – adjusts calculation dimensions based on ‘SS’ or ‘TPI’
- Returns
aggregate tax revenue iit_payroll_tax_revenue (array_like): aggregate income and
payroll tax revenue
- agg_pension_outlays (array_like): aggregate outlays for gov’t
pensions
- UBI_outlays (array_like): aggregate universal basic income (UBI)
outlays
bequest_tax_revenue (array_like): aggregate bequest tax revenue wealth_tax_revenue (array_like): aggregate wealth tax revenue cons_tax_revenue (array_like): aggregate consumption tax revenue business_tax_revenue (array_like): aggregate business tax
revenue
payroll_tax_revenue (array_like): aggregate payroll tax revenue iit_tax_revenue (array_like): aggregate income tax revenue
- Return type
total_tax_revenue (array_like)