# Debt timing and Unexpected Jump in t+1 in a General Equilibrium Model

**URL:** <https://forum.dynare.org/t/debt-timing-and-unexpected-jump-in-t-1-in-a-general-equilibrium-model/27682>\
**Category:** Perfect foresight simulations\
**Created:** [5 June 2025 16:17 UTC](https://forum.dynare.org/t/debt-timing-and-unexpected-jump-in-t-1-in-a-general-equilibrium-model/27682 "2025-06-05T16:17:24Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![nparis](https://forum.dynare.org/letter_avatar_proxy/v4/letter/n/848f3c/32.png) [@nparis](https://forum.dynare.org/u/nparis)\
**Post date:** [5 June 2025 16:17 UTC](https://forum.dynare.org/t/debt-timing-and-unexpected-jump-in-t-1-in-a-general-equilibrium-model/27682/1 "2025-06-05T16:17:25Z")

</div>

Hi everyone,

I’m currently working on a model I referred to in a previous post on the forum.

> [@Wage overshooting after labor force increase in a search and matching model](https://forum.dynare.org/t/wage-overshooting-after-labor-force-increase-in-a-search-and-matching-model/27654/1):
>
> I’m working on a general equilibrium model with search and matching, featuring two types of workers. I’m solving the model under perfect foresight.
> 
> I’m analyzing what happens when there is an exogenous increase in the labor force of type 2 workers.

I’m having trouble understanding the behavior of debt in my model. Assuming both worker types have similar productivity initially, an increase in one group’s labor force should lead to borrowing/lending between households.

Debt appears in two equations:

**Budget constraint:**

> C\_t2 + B\_t2(+1) = (1 + i) \* B\_t2 + (w\_t2 \* n\_t2 \* (1 - t) + z\_t2 \* u\_t2) + T \* F\_t2;

**Bond market clearing:**

> 0 = B\_t2 + B\_t1;

Still, in the transition path, debt jumps in the first period—even though it’s defined in t+1:

 ![image](https://forum.dynare.org/uploads/default/original/3X/4/c/4cc98bf7bb8c1204326ec62d3f94d881c463304d.png)

Since agents choose B\_t2(+1) today, I need the adjustment to occur with a one-period delay. Is this behavior standard in Dynare? If not, how should I define debt to capture that timing?

I’ve attached the updated codes in case it helps clarify the issue:  
[runAll.m](https://forum.dynare.org/uploads/short-url/ktzzfulGM8gU3KXu0hHoKLPPLMW.m) (67 Bytes)  
[solve\_SS.m](https://forum.dynare.org/uploads/short-url/zofskRXoOFSmPKT22r3KSElHXCU.m) (1.5 KB)  
[model\_dynamic.mod](https://forum.dynare.org/uploads/short-url/7e4QJdnsEzxRs4hKhnapw4uNUqc.mod) (5.3 KB)  
[model\_dynamic\_steadystate.m](https://forum.dynare.org/uploads/short-url/4tKw45hc7fqvZzICb9K6ZHmW8pg.m) (2.1 KB)  
[stst\_guess.mat](https://forum.dynare.org/uploads/short-url/ftcuxAnIKLL1hQDXFIRwSvN3wUx.mat) (1.7 KB)

Any thoughts or suggestions would be very appreciated.

Thanks in advance!

Best,

Nicolas

---

<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:** [6 June 2025 07:04 UTC](https://forum.dynare.org/t/debt-timing-and-unexpected-jump-in-t-1-in-a-general-equilibrium-model/27682/2 "2025-06-06T07:04:17Z")

</div>

You are violating Dynare’s timing convention.

```auto
    C_t2 + B_t2(+1)= (1 + i) * B_t2 + (w_t2 * n_t2 * (1 - t) + z_t2 * (u_t2)) + T * F_t2;

```

means that `B_t2` is not predetermined. To make `B_t2` predetermined, it would need to be shifted by one period. Put differently, `B_t2(-1)` would be predetermined, while `B_t2` is the value chosen today.

---

<div class="post-metadata">

**Author:** ![nparis](https://forum.dynare.org/letter_avatar_proxy/v4/letter/n/848f3c/32.png) [@nparis](https://forum.dynare.org/u/nparis)\
**Post date:** [6 June 2025 13:33 UTC](https://forum.dynare.org/t/debt-timing-and-unexpected-jump-in-t-1-in-a-general-equilibrium-model/27682/3 "2025-06-06T13:33:23Z")

</div>

Thank you very much, Professor Pfeifer.

I actually started by defining debt as a predetermined variable:

> C\_t2 + B\_t2 = (1 + i) \* B\_t2(-1) + (w\_t2 \* n\_t2 \* (1 - t) + z\_t2 \* u\_t2) + T \* F\_t2;

But that leads to an even stranger result. If you look at the attached image, you’ll see that debt stays around zero for most of the transition path and then suddenly drops at the final period. That behavior doesn’t make much economic sense to me.

 ![image](https://forum.dynare.org/uploads/default/original/3X/0/3/03a7c006098893872dbd1c3d5ee90782c5d7c205.png)

I was wondering: was your suggestion also implying that I might need to revise the timing of other variables as well? For example, the interest rate i is defined at +1 in the Euler equation—could that be a source of inconsistency here?

Thanks again for your help!

---

<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:** [9 June 2025 18:25 UTC](https://forum.dynare.org/t/debt-timing-and-unexpected-jump-in-t-1-in-a-general-equilibrium-model/27682/4 "2025-06-09T18:25:38Z")

</div>

Can you provide the updated version of the codes?

---

<div class="post-metadata">

**Author:** ![nparis](https://forum.dynare.org/letter_avatar_proxy/v4/letter/n/848f3c/32.png) [@nparis](https://forum.dynare.org/u/nparis)\
**Post date:** [9 June 2025 18:54 UTC](https://forum.dynare.org/t/debt-timing-and-unexpected-jump-in-t-1-in-a-general-equilibrium-model/27682/5 "2025-06-09T18:54:32Z")

</div>

Here is the version of the .mod file that includes the budget constraint following Dynare’s timing convention:

[model\_dynamic.mod](https://forum.dynare.org/uploads/short-url/8fnpW7oGtWTu9wlJXA32ra3y59F.mod) (5.3 KB)

The other files are the same ones I used in my original post.

What I’ve been reading is that when using perfect foresight and having a finite time horizon, there is no optimal path for repaying debt. As a result, the solver determines that the simplier course of action is to accumulate debt until period T-1 and pay the interest in the final period. That dynamic doesn’t seem very reasonable to me.

I read that adding a rising cost to indebtedness could correct this, but I’d prefer not to impose additional conditions.

Thanks in advance!

Best,

Nicolas

---

<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:** [9 June 2025 19:11 UTC](https://forum.dynare.org/t/debt-timing-and-unexpected-jump-in-t-1-in-a-general-equilibrium-model/27682/6 "2025-06-09T19:11:04Z")

</div>

> [@nparis](#):
>
> What I’ve been reading is that when using perfect foresight and having a finite time horizon, there is no optimal path for repaying debt. As a result, the solver determines that the simplier course of action is to accumulate debt until period T-1 and pay the interest in the final period.

Do you have a reference for that?

---

<div class="post-metadata">

**Author:** ![nparis](https://forum.dynare.org/letter_avatar_proxy/v4/letter/n/848f3c/32.png) [@nparis](https://forum.dynare.org/u/nparis)\
**Post date:** [9 June 2025 19:27 UTC](https://forum.dynare.org/t/debt-timing-and-unexpected-jump-in-t-1-in-a-general-equilibrium-model/27682/7 "2025-06-09T19:27:56Z")

</div>

Not a specific paper or forum post, no. It’s something I’ve inferred through iterations with different LLMs and from the behavior I’ve observed in Dynare while running my model, as well as simpler versions of it, where the same debt path dynamics appeared.

---

<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:** [9 June 2025 19:52 UTC](https://forum.dynare.org/t/debt-timing-and-unexpected-jump-in-t-1-in-a-general-equilibrium-model/27682/8 "2025-06-09T19:52:57Z")

</div>

I have seen debt paths like that before, but don’t have a good explanation why they happen. That’s why I was asking.

---

<div class="post-metadata">

**Author:** ![nparis](https://forum.dynare.org/letter_avatar_proxy/v4/letter/n/848f3c/32.png) [@nparis](https://forum.dynare.org/u/nparis)\
**Post date:** [21 July 2025 20:34 UTC](https://forum.dynare.org/t/debt-timing-and-unexpected-jump-in-t-1-in-a-general-equilibrium-model/27682/9 "2025-07-21T20:34:13Z")

</div>

Hello Professor Pfeifer,

I’m still trying to resolve this issue, and I wanted to explore whether the behavior of debt remains consistent in the context of a stochastic simulation. I did this assuming that the labor force shock follows an AR(1) process.

What I find puzzling is that, in this type of setting (stochastic simulation), where all variables are supposed to return to their original steady state, the debt variable—along with those representing the present value of unemployment (U\_t1, U\_t2), employment (W\_t1, W\_t2), and debt itself (B\_t1, B\_t2)—do not return to steady state.

 ![image](https://forum.dynare.org/uploads/default/original/3X/8/3/83c619a7856e73c502e194b4665c74d792cc160c.png)

I would like to know whether this implies that the IRF simulation is correct and that such behavior can occur in these settings, or if it instead suggests a problem with the simulation.

I’ve attached the updated code files for your reference.

Thank you very much in advance.

Best regards,  
Nicolás

[runAll.m](https://forum.dynare.org/uploads/short-url/mruwO7UrMVB0pispxj9qoYEvE0Q.m) (78 Bytes)  
[model\_dynamic.mod](https://forum.dynare.org/uploads/short-url/jg32Bezf0rPNan8Uz9H1VyngqiP.mod) (5.6 KB)  
[model\_dynamic\_steadystate.m](https://forum.dynare.org/uploads/short-url/vXIciAqO0fpeJD1abrZzQ9P4S6d.m) (2.2 KB)  
[solve\_SS.m](https://forum.dynare.org/uploads/short-url/zofskRXoOFSmPKT22r3KSElHXCU.m) (1.5 KB)  
[stst\_guess.mat](https://forum.dynare.org/uploads/short-url/pEkMpV0YMfJBSrkGbj3DZtKUgeD.mat) (1.7 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:** [22 July 2025 07:55 UTC](https://forum.dynare.org/t/debt-timing-and-unexpected-jump-in-t-1-in-a-general-equilibrium-model/27682/10 "2025-07-22T07:55:28Z")

</div>

Your model has a unit root. It seems that only the sum of `B_t1` and `B_t2` is uniquely determined.
