Problem with Blanchard and Kahn condition - Rank condition isn't verified

Hello together,

currently I am writing about the paper “A Fiscal Theory of Persistent Inflation” from Bianchi, Faccini and Melosi (2023) they create a model with partially unfunded debt so that a monetary-led and fiscally led policy mix can coexist in the model. I try to replicate the figures from the paper in dynare.

I am able to replicate Figure 1 (flexible price model) in dynare.
Figure_1_all.mod (1.5 KB)

But when I try to replicate Figure 2 (NKM from Appendix B.2) in dynare I get the following error message:
“There are 4 eigenvalue(s) larger than 1 in modulus for 4 forward-looking variable(s)
The rank condition ISN’T verified!”
I have read in many other posts in the dynare forum that this error signals a timing issue, but I checked on this and let dynare write a latex model. This latex model has the same equations as in the appendix of Bianchi, Faccini and Melosi (2023).
To determine the impact of unfunded debt, especially the evolution of fiscal inflation, they create a shadow economy with a fiscally led policy mix.
I checked to model the NKM without unfunded debt, this works. The problem just arises when I model the shadow economy to determine fiscal inflation. The Shadow economy does work when I select the parameter values for phi_f or gamma_f larger than 1, this would make sense when looking at the shadow economy code alone because then debt can’t be on an explosive path, but this doesn’t make any sense in the context of the model because the monetary authority doesn’t react to fiscal inflation and the fiscal authority doesn’t take the required fiscal adjustments to stabilize debt in the shadow economy and the debt-to-GDP ratio should be declining after an unfunded fiscal shock through fiscal inflation.
Model_NKM.mod (2.0 KB)
ShadowNKM.mod (1.3 KB)

I can’t find any other possible sources for mistakes in the Dynare Forum or when chatting with ChatGPT :-). My professor also doesn’t know why this error comes up.
I hope that some of you can find the mistake or have any idea what could be wrong.

Thanks in advance!

Is the problem still current?

Yes, I still don’t know what the mistake in my code is. I am really hoping on your experience.

@jpfeifer did you have the time to have a look on the code? I am really counting on your experience.

I also cannot spot a mistake. Did you cross-check your implementation with the official replication files?

Thank you very much for your effort, that’s not something to be taken for granted. Maybe it is simply not possible to calibrate such models in dynare.

I didn’t check the replication files yet because they just provide MatLab-files and the associated Excel-files (over 1000 documents in total) and my professor told me it would be easier to use dynare instead of MatLab when I haven’t used it before, which would definitely be true if the model works in dynare. But I guess this is the only option then.

My point is that all you need is in their “Fig_II” folder. The subfolder params has the parameters. The Mod folder has the linearized model: mod_production_economy_SSrules.m (7.0 KB)

Here, they define the variable locations, the equations, and the prefactors that the variables get in the equation. That should allow you to cross-check with Dynare.

As they use AIM to solve the model, the model must be solvable in Dynare as well.