Stock price equation Nakamura and Steinsson (2018a)

Hi everyone,

I am in the process of deriving all equations in the DSGE model of Nakamura and Steinsson (2018a). So far, everything is derived correctly, but when I had a look into the replication files, especially in the modelINFO.m, a stock price equation shows up which has only be discussed indirectly in the paper but has no formal expression. Footnote 30 in Nakamura and Steinsson (2018a) states that they “[…] model stocks as an unlevered claim to the consumption stream in the economy.” In the Appendix, the usual budget constraint with wage income, consumption payments, etc. is stated. The term $B_t$ usually refers to one asset in a Basic NK Model, but in the paper, $B_t(x)$ is defined as a “random variable that denotes the state contingent payoff of the portfolio of financial securities held by households of type $x$.” Nothing else is mentioned either directly or indirectly about stock prices in the NK model and it is not even a variable in the paper. Stock prices are only defined as $sp$ in the MATLAB code. I got curious and tried to rearrange the last missing piece of information. However, I could not figure out how to properly derive the equation for the stock price, nor did I find a paper that used this exact equation.

The log-linear form of the stock price equation is

https://preview.redd.it/8d9xfrlqg1jd1.jpg?width=1072&format=pjpg&auto=webp&s=a92f6942347ca065740a8ca668a1dac2248c0709

The model is a Basic New Keynesian Model with habit formation and inflation inertia. In the modelINFO.m file, the 19th equation is given as the stock price equation.

I am very grateful for any help. Many thanks in advance! I am also happy about paper suggestions that might lead me to the correct derivation. If anyone requires additional information, I will provide everything needed!

Kind regards

Here is what I extracted from the Code:

https://preview.redd.it/uyt1703ij1jd1.jpg?width=1100&format=pjpg&auto=webp&s=7e1fafbc52ca02bb2d7e344db855920d7c4d6c70

https://preview.redd.it/4vixm43ij1jd1.jpg?width=1656&format=pjpg&auto=webp&s=68b7e5be68aef0ed0fe62871d42a1390e1644610

https://preview.redd.it/qafsg03ij1jd1.jpg?width=1106&format=pjpg&auto=webp&s=5f2d45efdb8b21eb6309bd2f1f9b5dfaa6942ea7

https://preview.redd.it/5ju9m03ij1jd1.jpg?width=758&format=pjpg&auto=webp&s=24612836f45b28632bc105c192f178bfe62253f2

https://preview.redd.it/7enaqwrjj1jd1.jpg?width=900&format=pjpg&auto=webp&s=e13ed33f26408d81b6f3ee5e8d7132a33c3ff3ae

https://preview.redd.it/ubrv6yrjj1jd1.jpg?width=636&format=pjpg&auto=webp&s=59a9ef50a8902d0ce87684f293fc6c66f1f7d12b