Covariance matrix not positive definitive in DSGE-VAR model

Hi, I am trying to replicate Iacoviello (2005) household DSGE model with updated data (Canada) and calibration. I have found values for estimated parameters in a working paper published by Bank of Canada (2016). I was able to run the mod file on a full sample without problems but now I want to do a forecast. When I run the mod file I encounter this error:
“Error using print_info
You are estimating a DSGE-VAR model, but the implied covariance matrix of the VAR’s innovations,
based on the artificial sample, is not positive definite!”
projekt_rekurze.mod (9.1 KB)
y.mat (37.7 KB)

That usually means your DSGE model does not imply a valid VAR in your specified observables. Why do you want a DSGE-VAR when you are doing forecasting? Dynare only supports forecasts from the DSGE-model.

Dear Professor Pfeifer,
thank you for responding. I realized this mistake and corrected it. Now I use only the DSGE model but the error remains the same. I tried to change the priors but that did not help either. Initially, I used HP filter so I also tried a different method. One study dealing with Canada detrended interest rates by removing linear time trend and CPI by demeaning so I tried that but it was fruitless. If you have any other suggestions it would be greatly appreciated. Many thanks for considering my request.

There is a second post with the same issues and codes: