# Timing problem in prices in Euler equations

**URL:** <https://forum.dynare.org/t/timing-problem-in-prices-in-euler-equations/26002>\
**Category:** Stochastic simulations\
**Created:** [30 June 2024 06:41 UTC](https://forum.dynare.org/t/timing-problem-in-prices-in-euler-equations/26002 "2024-06-30T06:41:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpina](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/85f322/32.png) [@mpina](https://forum.dynare.org/u/mpina)\
**Post date:** [30 June 2024 06:41 UTC](https://forum.dynare.org/t/timing-problem-in-prices-in-euler-equations/26002/1 "2024-06-30T06:41:51Z")

</div>

Hello, I have been trying for a while to reproduce Corsetti, Dedula and Leduc (2008) without success. I think the error is in lines 97- 103, where the Euler equations for countries H and F are located. Currently, the mod file only runs if I set R, capital rental rate, as predetermined (R(-1)) in the budget constraint, but that is inconsistent with R(+1) in the Euler equations. If I fix this inconsistency, the model doesn’t run (blanchard-kahn).

I have tried moving the timing of capital variables kh, kf, kn1 and kn2, the timing of r (real interest rate), and simplifying equations, but nothing. The model is not that big so maybe the error is obvious for someone else.

I attach the .mod, the steady state file, and the derivation file in pdf. If anyone can take a look, it would be greatly appreciated. Thank you

[CDL08.mod](https://forum.dynare.org/uploads/short-url/pvaxjjGcNAu0jj0XiZHgg2B2Q8i.mod) (9.9 KB)  
[CDL08\_steadystate.m](https://forum.dynare.org/uploads/short-url/gV4cVWUwg5YWfN4c69iMlJdKIuo.m) (8.1 KB)

[equations.pdf](https://forum.dynare.org/uploads/short-url/pXNUv76itO5gLkKF0wU0DkHSaiA.pdf) (261.4 KB)

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [1 July 2024 16:45 UTC](https://forum.dynare.org/t/timing-problem-in-prices-in-euler-equations/26002/2 "2024-07-01T16:45:28Z")

</div>

You did not make the timing, but it looks like the reason is:

> [@Timing of capital in two sector economy](https://forum.dynare.org/t/timing-of-capital-in-two-sector-economy/2325):
>
> Hello all, I am building a two-sectoral model, and I have a question about the timing of sectoral-capital variables: In my model, T and N are sectors, hence kT is capital in sector T and kN is capital in sector N. Then, I assume that the economy’s aggregate capital is simply: k = kT + kN. However, I assume only one law of motion for aggregate capital such that: k = (1-delta)\*k(-1) + i - written in Dynare language. It is clear to me that k is a predetermined variable and should be treated as su…

---

<div class="post-metadata">

**Author:** ![mpina](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/85f322/32.png) [@mpina](https://forum.dynare.org/u/mpina)\
**Post date:** [2 July 2024 18:54 UTC](https://forum.dynare.org/t/timing-problem-in-prices-in-euler-equations/26002/3 "2024-07-02T18:54:47Z")

</div>

Hello Professor, thanks for your reply. I fixed the capital as suggested by setting

```auto
k1(-1) = kH + kN1; and
k2(-1) = kF + kN2;

```

My problem remains the same. I think the problem may come from the timing of prices (r and R1,R2) in the Euler equations and budget constraint (BC).

With the following lines, the code runs, but I think it is wrong because R1 (and R2, for the foreign country) and r should be in expectation in the Euler equation.

Euler equation

```auto
lamb1*pHbar = exp(-nu1)*lamb1(+1) *(pHbar(+1)*(1-DELTA) + R1 );    
lamb1 = exp(-nu1)*lamb1(+1) *(1+r) ;

```

BC

```auto
pH1*cH1 + pF1*cF1 + pN1*cN1 + bH + pHbar*iH = w1*l1 + R1(-1) *k1(-1) + (1+r(-1))*bH(-1); 

```

I think that the correct setup should be  
Euler equation

```auto
lamb1*pHbar = exp(-nu1)*lamb1(+1) *(pHbar(+1)*(1-DELTA) + R1(+1) );    
lamb1 = exp(-nu1)*lamb1(+1) *(1+r(+1) ) ;

```

BC

```auto
pH1*cH1 + pF1*cF1 + pN1*cN1 + bH + pHbar*iH = w1*l1 + R1*k1(-1) + (1+r)*bH(-1); 

```

But this last setup yields 8 eigenvalues\>1 for 7 forward looking variables and colinear relationships in all prices, so I’m stuck here. What should be the correct timing here? Thank you

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [3 July 2024 08:24 UTC](https://forum.dynare.org/t/timing-problem-in-prices-in-euler-equations/26002/4 "2024-07-03T08:24:38Z")

</div>

The return to capital is almost never predetermined. If that “fixes” your timing issue, you still have not found the correct timing.
