A problem related to singularity and colinear relationships

Dear Professor Jpfeifer,
Thank you for your helpful reply. I have accurately verified the original mod file of the simpler model(which works and I have added the new features into it). In contrast with what is written in their paper (“Gertler and Kiyotaki 2015”), they have changed the timing of the deposit interest rate (in the paper it is " r * d(-1)" but in the mod file it is “r(-1)*d(-1)”). I did the same change and now my codes run. There are still 3 issues:

  1. I have added borrowing feature to the model, so in addition to the interest rate , I have the return on banker’s loans (r_b, please see equation 4). I doubt if I have changed the timing of r, I have to change the timing of r_b as well. In this case I will have again the timing problem.
  2. After running the program, one will find that there is no IRF for K (total capital. Euq 30) that I guess it means its deviation is zero(It is not very normal !!!). Hence deviation of i_k( investment, Equ 38) is also zero. Furthermore due to these zero changes, even with a negative shock to productivity (Equ 40-41), the output change is positive! It is really strange.
  3. I saw this post [Timing of capital in two sector economy) I have also capital belonging to bankers and lenders, is it the same case as mine and I should add K(-1) = K_b + K_h; //30?

I really appreciate your time and consideration.

Sincerely,
Leo
IRFs.zip (11.5 KB)