<p>$$V(b_{t-1})=\max\limits_{C_{t},H_t,N_t} \Bigg\{\ln C_t+j\ln H_t-\dfrac{(N_t)^\eta}{\eta} +\beta E_tV(b_t) \Bigg\}$$</p>

<p>so </p>

<p>$$\beta E_tV(b_{t})=\beta E_t\left[\max\limits_{C_{t+1},H_{t+1},N_{t+1}} \Bigg\{\ln C_{t+1}+j\ln H_{t+1}-\dfrac{(N_{t+1})^\eta}{\eta} +\beta E_{t+1}V(b_{t+1}) \Bigg\}\right]$$</p>

<p>But forwarding the budget constraint </p>

<p>$$C_t + b_t +q_t(H_t-H_{t-1})=\dfrac{R_{t-1} b_{t-1}}{\pi_t}+w_t N_t+F_t$$</p>

<p>we get after re-arranging, </p>

<p>$$C_{t+1} =- b_{t+1} -q_{t+1}(H_{t+1}-H_{t})+\dfrac{R_{t} b_{t}}{\pi_{t+1}}+w_{t+1} N_{t+1}+F_{t+1}$$</p>

<p>So $\beta E_tV(b_{t})$ is also a function of $H_t$ through $C_{t+1}$.</p>

CC BY-SA 3.0
2017-06-10T20:21:27.247Z
2017-06-10T20:21:27.247Z
Alecos Papadopoulos
<p>I try to solve the following maximization problem of a representative household with dynamic programming. However, my last result is not similar to the solution. Could any one help me? </p>

<p>$$\max\limits_{C_{t},H_t,N_t} E_0 \sum_{t=0}^{\infty} \beta^t\Bigg[logC_t+jlogH_t-\dfrac{(N_t)^\eta}{\eta}\Bigg]$$
$C_t,H_t,N_t$ represent consumption at time t, housing stock and working hours, respectively. 
Household budget constraint: </p>

<p>$C_t + b_t +q_t(H_t-H_{t-1})=\dfrac{R_{t-1} b_{t-1}}{\pi_t}+w_t N_t+F_t$</p>

<p>$b_t$ denotes bank deposits, $R_t$ is the return from deposit, $q_t$ is the price of housing, $\pi_t$ is the inflation rate and $w_t$ is the real wage rate. $F_t$ denotes profits received from firms. 
To sole this problem, I use dynamic programming with these steps: 
Step 1: Bellman equation: </p>

<p>I identify $b_{t-1}$ as the state variable, since the household must know the deposit in the previous period. The budget constraint can be rewrite as: 
$b_t=f(C_t,b_{t-1},H_t,H_{t-1},N_t,F_t,q_t,R_{t-1},\pi_t)$</p>

<p><strong>Step 1: Setting up the Bellman equation:</strong> </p>

<p>$V(b_{t-1})=\max\limits_{C_{t},H_t,N_t} \Bigg\{logC_t+jlogH_t-\dfrac{(N_t)^\eta}{\eta} +\beta E_tV(b_t) \Bigg\}$</p>

<p>Evolution of the costate variable $b_t$, using envelope theorem: </p>

<p>$$\dfrac{\partial V(b_{t-1})}{\partial b_{t-1}} =\beta E_t \dfrac{\partial V(b_{t})}{\partial b_{t}} \dfrac{\partial b_t}{\partial b_{t-1}} = \beta E_t V'(b_t) \dfrac{R_{t-1}}{\pi_t}$$ (1)</p>

<p><strong>Step 2: FOC</strong></p>

<p>First order condition (FOC1)
$$\dfrac{\partial V(b_{t-1})}{\partial C_t}=\frac{1}{C_t}+\beta E_t V'(b_t)\dfrac{\partial b_t}{\partial C_t}=0$$ 
$\dfrac{\partial b_t}{\partial C_t}=-1$</p>

<p>$\dfrac{1}{C_t}=\beta E_t V'(b_t)$ (2)</p>

<p>Inserting (2) into (1) twice to get the Euler equation, we have: </p>

<p>$$\dfrac{1}{C_t}=\beta E_t \Bigg(\dfrac{R_t}{\pi_{t+1 C_{t+1}}}\Bigg)$$</p>

<p><strong>This result is similar to the solution</strong> </p>

<p>FOC2: 
$$\dfrac{\partial V(b_{t-1})}{\partial N_t}=-(N_t)^{\eta-1}+\beta E_t V'(b_t)w_t=0$$
Inserting (2), we have: 
$\dfrac{1}{C_t} w_t = -(N_t)^{\eta-1}$, <strong>This result is similar to the solution</strong></p>

<p>FOC3: The third FOC involves taking the partial derivative of $V(b_{t-1})$ with $H_t$, but I cannot get the same result with the solution: 
The solution is: 
$$\dfrac{j}{H_t}=\dfrac{1}{C_t}q_t-\beta E_t \dfrac{1}{C_{t+1}}q_{t+1}$$</p>

<p>I only end up with: </p>

<p>$$\dfrac{\partial V(b_{t-1})}{\partial H_t}=\dfrac{j}{H_t}+\dfrac{1}{C_t}(-q_t)=0$$
<strong>Did I miss something?
Did I correctly identify the state variable? I suspect that it has something to do with $H_t$ and $H_{t-1}$, but I cannot figure it out</strong> </p>

<dynamic-programming>
Dynamic programming with housing consumption and labor
DB225681
# Dynamic programming with housing consumption and labor

(Asked by: username_0 on 2017-06-09)

I try to solve the following maximization problem of a representative household with dynamic programming. However, my last result is not similar to the solution. Could any one help me?

$$\max\limits\_{C\_{t},H\_t,N\_t} E\_0 \sum\_{t=0}^{\infty} \beta^t\Bigg[logC\_t+jlogH\_t-\dfrac{(N\_t)^\eta}{\eta}\Bigg]$$
$C\_t,H\_t,N\_t$ represent consumption at time t, housing stock and working hours, respectively.
Household budget constraint:

$C\_t + b\_t +q\_t(H\_t-H\_{t-1})=\dfrac{R\_{t-1} b\_{t-1}}{\pi\_t}+w\_t N\_t+F\_t$

$b\_t$ denotes bank deposits, $R\_t$ is the return from deposit, $q\_t$ is the price of housing, $\pi\_t$ is the inflation rate and $w\_t$ is the real wage rate. $F\_t$ denotes profits received from firms.
To sole this problem, I use dynamic programming with these steps:
Step 1: Bellman equation:

I identify $b\_{t-1}$ as the state variable, since the household must know the deposit in the previous period. The budget constraint can be rewrite as:
$b\_t=f(C\_t,b\_{t-1},H\_t,H\_{t-1},N\_t,F\_t,q\_t,R\_{t-1},\pi\_t)$

**Step 1: Setting up the Bellman equation:**

$V(b\_{t-1})=\max\limits\_{C\_{t},H\_t,N\_t} \Bigg\{logC\_t+jlogH\_t-\dfrac{(N\_t)^\eta}{\eta} +\beta E\_tV(b\_t) \Bigg\}$

Evolution of the costate variable $b\_t$, using envelope theorem:

$$\dfrac{\partial V(b\_{t-1})}{\partial b\_{t-1}} =\beta E\_t \dfrac{\partial V(b\_{t})}{\partial b\_{t}} \dfrac{\partial b\_t}{\partial b\_{t-1}} = \beta E\_t V'(b\_t) \dfrac{R\_{t-1}}{\pi\_t}$$ (1)

**Step 2: FOC**

First order condition (FOC1)
$$\dfrac{\partial V(b\_{t-1})}{\partial C\_t}=\frac{1}{C\_t}+\beta E\_t V'(b\_t)\dfrac{\partial b\_t}{\partial C\_t}=0$$
$\dfrac{\partial b\_t}{\partial C\_t}=-1$

$\dfrac{1}{C\_t}=\beta E\_t V'(b\_t)$ (2)

Inserting (2) into (1) twice to get the Euler equation, we have:

$$\dfrac{1}{C\_t}=\beta E\_t \Bigg(\dfrac{R\_t}{\pi\_{t+1 C\_{t+1}}}\Bigg)$$

**This result is similar to the solution**

FOC2:
$$\dfrac{\partial V(b\_{t-1})}{\partial N\_t}=-(N\_t)^{\eta-1}+\beta E\_t V'(b\_t)w\_t=0$$
Inserting (2), we have:
$\dfrac{1}{C\_t} w\_t = -(N\_t)^{\eta-1}$, **This result is similar to the solution**

FOC3: The third FOC involves taking the partial derivative of $V(b\_{t-1})$ with $H\_t$, but I cannot get the same result with the solution:
The solution is:
$$\dfrac{j}{H\_t}=\dfrac{1}{C\_t}q\_t-\beta E\_t \dfrac{1}{C\_{t+1}}q\_{t+1}$$

I only end up with:

$$\dfrac{\partial V(b\_{t-1})}{\partial H\_t}=\dfrac{j}{H\_t}+\dfrac{1}{C\_t}(-q\_t)=0$$
**Did I miss something?
Did I correctly identify the state variable? I suspect that it has something to do with $H\_t$ and $H\_{t-1}$, but I cannot figure it out**

**Tags:** dynamic-programming

---

## 1 answers

### Answer by username_1 on 2017-06-10. Score: 1 | Accepted answer

$$V(b\_{t-1})=\max\limits\_{C\_{t},H\_t,N\_t} \Bigg\{\ln C\_t+j\ln H\_t-\dfrac{(N\_t)^\eta}{\eta} +\beta E\_tV(b\_t) \Bigg\}$$

so

$$\beta E\_tV(b\_{t})=\beta E\_t\left[\max\limits\_{C\_{t+1},H\_{t+1},N\_{t+1}} \Bigg\{\ln C\_{t+1}+j\ln H\_{t+1}-\dfrac{(N\_{t+1})^\eta}{\eta} +\beta E\_{t+1}V(b\_{t+1}) \Bigg\}\right]$$

But forwarding the budget constraint

$$C\_t + b\_t +q\_t(H\_t-H\_{t-1})=\dfrac{R\_{t-1} b\_{t-1}}{\pi\_t}+w\_t N\_t+F\_t$$

we get after re-arranging,

$$C\_{t+1} =- b\_{t+1} -q\_{t+1}(H\_{t+1}-H\_{t})+\dfrac{R\_{t} b\_{t}}{\pi\_{t+1}}+w\_{t+1} N\_{t+1}+F\_{t+1}$$

So $\beta E\_tV(b\_{t})$ is also a function of $H\_t$ through $C\_{t+1}$.


---

