What does # mean befor a statement

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

What does # mean befor a statement

Postby David » Tue Nov 13, 2012 10:39 am

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.
David
 
Posts: 24
Joined: Fri Sep 28, 2012 3:46 pm

Re: What does # mean befor a statement

Postby jpfeifer » Tue Nov 13, 2012 6:43 pm

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;
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: What does # mean befor a statement

Postby David » Wed Nov 14, 2012 2:05 am

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!
David
 
Posts: 24
Joined: Fri Sep 28, 2012 3:46 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 5 guests