Hello!
I would like to model the counter-cyclical capital buffer. This will determine an increase or decrease in the bank capital requirement if the deviation of credit-to-GDP from the corresponding steady state value is, in absolute value, bigger than a specified threshold. So, I would need to introduce an indicator variable in the mod file, such that, when I compute the IRFs to a certain shock, if the credit-to-GDP hits the specified thresholds, a new term is activated in the capital requirement. Is it possible to do that in the mod file? The steady state policy would not change, because credit-toGDP by definition will be at ist steady state value.

It depends on what you are trying to do. But Dynare allows for min() and max()-operators. You may also want to think about whether your problem can be accommodated by Occbin.

Thank you Johannes for your anwer! Can I write “if statement” in dynare? I would need something like that to introduce the discontinous policy function I have in mind. Thnaks a lot!