Hi,

I’m running my model, but I’m getting the Blanchard Kahn error. If possible, advise me on timing of my model.

**The first case**

In the first case, I considered that the firm buys capital(K) in the previous period, and , he(she) also buys labor(H) and S in the curent period and after the shock .The firm also borrows from the bank to buy capital.

I have defined the optimization problem as follows:

**The second case**

Then I thought it might be wrong for a firm to choose inputs at two points in time (capital in the previous period and H and S in the curent period and after the shock)

I decided to design the model so that all inputs were determined in the previous period. I

I have defined the optimization problem as follows:

**The third case**:

Should the The second case not be optimized as follows

Of course, derivation is also done wrt debt(-1) in the second case and debt in the third case

**Do you think the first case is wrong? Also, if all the inputs are determined in the previous period, the second case is correct or the third case?**

Thank you in advance for your guidance