This has to do with the Macro-processing language syntax. This link discusses expressions, directives, typical usages, and compares MATLAB/Octave loops versus macro-processor loops. See more regarding Dynare macro-processor syntax and typical usages in this pdf.
The use of "@#" in dynare/Matlab
Pregunta
I'm trying to handle the Zero Lower Bound in a DSGE model in dynare(a package for Matlab). I found a paper that developed an algorithm for stochastic simulations at the ZLB, and I found some of the author's code, but I can not interpret part of the code. I've looked everywhere for an answer. This is what the code looks like:
@#define TShadow = 30
@#define TIRF = 15
@#define TSimul = 300
@#define TDrop = 100
@#if TShadow > TIRF
@#define TInitIRF = TShadow
@#else
@#define TInitIRF = TIRF
@#endif
var pi, y, i, shock_pi, shock_nu, shock_i;
varexo epsilon_pi, epsilon_nu, epsilon_i;
The use of @# is so mysterious and I cannot find a single usage of it. I have run the code and it works.
Solución
Otros consejos
You can run the code with Dynare's savemacro
command line option, e.g.
dynare mymodel.mod savemacro=final_mod_file.txt onlymacro nolinemacro
This will write the regular readable Dynare model code that the preprocessor creates after resolving the macro language commands to the final_mod_file.txt
file. See the Dynare manual for more details on the command line options.