Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is GDP specified correctly in SS.py algorithm? #972

Open
rickecon opened this issue Aug 22, 2024 · 6 comments · May be fixed by #971
Open

Is GDP specified correctly in SS.py algorithm? #972

rickecon opened this issue Aug 22, 2024 · 6 comments · May be fixed by #971

Comments

@rickecon
Copy link
Member

In the theory and documentation for OG-Core, we define nominal GDP in equation 64 and 134 as:

$$ p_t Y_t = \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

@rickecon rickecon linked a pull request Aug 22, 2024 that will close this issue
@rickecon rickecon changed the title Is GDP specified correctly in SS.py algorithm Is GDP specified correctly in SS.py algorithm? Aug 22, 2024
@jdebacker
Copy link
Member

@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.

@jdebacker
Copy link
Member

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 jdebacker linked a pull request Aug 22, 2024 that will close this issue
@rickecon
Copy link
Member Author

@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 rickecon removed a link to a pull request Aug 24, 2024
@jdebacker
Copy link
Member

@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 $Y_t$. 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.

@rickecon
Copy link
Member Author

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

@rickecon
Copy link
Member Author

rickecon commented Sep 4, 2024

I updated all the instances of $p_t Y_t$ in the documentation to be just $Y_t$ in PR #971.

@rickecon rickecon linked a pull request Sep 4, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants