Page 1 of 1

What does # mean befor a statement

PostPosted: Tue Nov 13, 2012 10:39 am
by David
Hi, I am new in dynare but learning.
I read a sample code but do not know what does # mean. Here is the example:

...

model;

# Trendk = Teand_AC + 1/(1-MUC) * Trend_Ak;
# ...
# ...

//% equations
...

I just do not know why the author define so many equations following #. It seems the model is a stochastic growth model and the author is defining stochastic trends and want to detrend the economy before writing down the other equations.
What does # mean? e.g., I know //% means that what follows it are comments.

Here are more similar statements:
model ;


# TRENDK = TREND_AC + 1/(1-MUC)*TREND_AK ;
# TRENDY = TREND_AC + MUC/(1-MUC)*TREND_AK;
# TRENDH = (1-MUH-KAPPA-MUBB)*TREND_AH + (MUH+MUBB)*TREND_AC + MUC*(MUH+MUBB)/(1-MUC)*TREND_AK ;
# TRENDQ = (1-MUH-MUBB)*TREND_AC + MUC*(1-MUH-MUBB)/(1-MUC)*TREND_AK - (1-MUH-KAPPA-MUBB)*TREND_AH ;

# llEXPTRENDY = exp ( TRENDY ) ;
# llEXPTRENDK = exp ( TRENDK ) ;
# llEXPTRENDQ = exp ( TRENDQ ) ;
# llEXPTRENDH = exp ( TRENDH ) ;
# llgamma_k = exp ( TREND_AK );

# llr = 1 / BETA ;
# llr1 = llr / llEXPTRENDY - 1 ;

# llZETA0 = BETA*llEXPTRENDK*MUC/(llgamma_k-BETA*(1-DKC))/X_SS ;
# llZETA1 = BETA*llEXPTRENDY*MUH/(1-BETA*(1-DKH));
# llZETA2 = JEI/(1-BETA*llEXPTRENDQ*(1-DH)) ;
# llZETA3 = JEI/(1-BETA1*llEXPTRENDQ*(1-DH)-llEXPTRENDQ*(BETA-BETA1)*M) ;
# llZETA4 = (llr/llEXPTRENDY-1)*M*llEXPTRENDQ/llr ;

Many thanks for your help.

Re: What does # mean befor a statement

PostPosted: Tue Nov 13, 2012 6:43 pm
by jpfeifer
From the manual:
MODEL_EXPRESSION;
Inside the model block, Dynare allows the creation of model-local variables, which constitute a
simple way to share a common expression between several equations. The syntax consists of a
pound sign (#) followed by the name of the new model local variable (which must not be declared
as in Section 4.2 [Variable declarations], page 9), an equal sign, and the expression for which
this new variable will stand. Later on, every time this variable appears in the model, Dynare
will substitute it by the expression assigned to the variable. Note that the scope of this variable
is restricted to the model block; it cannot be used outside. A model local variable declaration
looks like:
# VARIABLE_NAME = MODEL_EXPRESSION;

Re: What does # mean befor a statement

PostPosted: Wed Nov 14, 2012 2:05 am
by David
jpfeifer wrote:From the manual:
MODEL_EXPRESSION;
Inside the model block, Dynare allows the creation of model-local variables, which constitute a
simple way to share a common expression between several equations. The syntax consists of a
pound sign (#) followed by the name of the new model local variable (which must not be declared
as in Section 4.2 [Variable declarations], page 9), an equal sign, and the expression for which
this new variable will stand. Later on, every time this variable appears in the model, Dynare
will substitute it by the expression assigned to the variable. Note that the scope of this variable
is restricted to the model block; it cannot be used outside. A model local variable declaration
looks like:
# VARIABLE_NAME = MODEL_EXPRESSION;


Many thanks to you, jpfeifer!