Closed rickecon closed 1 month ago
@rickecon I think the theory and the code are correct in the calculation of real GDP. The numeraire good is the good from industry $M$, which has a price of 1 ($p_M=1$). All other prices are relative to that.
And I'll add: Industry $M$ is assumed to be the capital goods producing industry, so the price of the capital good (used for both private and infrastructure investment) is thus 1. Gov't purchases, as the model is currently specified, come from industry $M$ as well and therefore also have a price of 1.
These assumptions can and should be relaxed, but they are relevant you think about the goods market clearing condition.
Note that the price of the composite good, $\tilde{p}$ is not one as it's not the numeraire good.
@jdebacker. In the code, we use the following expression for nominal GDP, in which $Y_t$ is not multiplied by the composite goods price (see line 366 of SS.py
and line 891 of TPI.py
):
$$ \hat{Y} = \sum{m=1}^M p{m,t} \hat{Y}_{m,t} $$
However, in the documentation, we represent nominal GDP as being multiplied by the composite goods price. I think I see the issue. It is just wrong in the documentation in equations (64) and (134). However, this also implies that the expressions for all the variables as a percent of GDP are incorrect, because those are also multiplied by $p_t Y_t$. They should just be multiplied by $Y_t$.
@rickecon I agree with that -- I think the code is appropriate, but it does differ from the docs in that in the docs we defined "nominal" (I think it should be "real", since it's just putting GDP in terms of the numeraire good) GDP as $p_tY_t$, where as in the code we drop the $Yt$. I thought that in the docs we might have done this to reduce confusion between industry output, $Y{m,t}$ and total output, $Y_{t}$. But it's probably more confusing if the code and docs differ.
Ah. I see now. It is just in the documentation. Even in the documentation we specify the government spending, transfers, and infrastructure investment as percentages of GDP multiplied by the composite goods price, but it is correct in the code (just $Y_t$. We just need to update all the instances of $p_t Y_t$ in the documentation to be just $Y_t$. @jdebacker
I updated all the instances of $p_t Y_t$ in the documentation to be just $Y_t$ in PR #971.
In the theory and documentation for OG-Core, we define nominal GDP in equation 64 and 134 as:
$$ p_t Yt = \sum{m=1}^M p{m,t} Y{m,t} \quad\forall t $$
However, in line 366 of
SS.py
and in the steady-state equilibrium documentation of the algorithm (step 2.17), the update of the value of $\bar{Y}$ excludes the composite goods price $\bar{p}$.$$ \bar{Y} = \sum_{m=1}^M\bar{p}_m\bar{Y}_m $$
These two expressions are equivalent when $M=1$ because the one industry is the numeraire, so $p=1$. But the two expressions are not equivalent when the number of industries is greater than 1 ($M\geq 2$). The equation should be the following.
$$ \bar{Y} = \sum_{m=1}^M\left(\frac{\bar{p}_m}{\bar{p}}\right)\bar{Y}_m $$
I have fixed this in open PR #971. @jdebacker