incorrect substitutions for complex expressions with diff operators and unary ops transformation
Suppose the equations of a model contain the following sub-expressions (at some places): diff(x-y)
and diff(x(-1)-y)
.
The engine for the substitution of diff
operators by auxiliary variables will assign these two expressions to the same auxiliary, which is obviously wrong, because these operations are not equivalent up to a shift of leads/lags. The problem comes from the fact that the substitution engine looks at the static versions of expressions in order to detect subexpressions that should share the same auxiliary variable (this works well for simple expressions with only one endogenous variables, but fails on more complex expressions).
The same happens with the so-called unary ops transformation. It will assign the same auxiliary var for exp(x-y)
and exp(x(-1)-y)
.