@ ------------------------------- CoRRAM_Shell.g ------------------------------------
"
    28 December 2010
    Alfred Maußner

    Interface to the CoRRAM program. Please edit where required to input
    your model.
    
------------------------------------------------------------------------------- @

@ -------------------- Do not change the next two lines of code ---------------- @
new;                  @ clear memory @
library user, pgraph; @ load standard libraries @
@ ------------------------------------------------------------------------------ @

/* Choice of solution method */
_equations=1;   @ "if =1 you must input the equations of your model, if =0 you must input the coefficients of the matrices of your log-linearized model" @
_GSchur=0;      @ "if =1 the generalized Schur factorization will be used to compute the linear part of the solution" @
_linear=1;      @ "if =1 only linear approximations of the models equations are computed"    @

/* Choice of output */
_Moments=1;    @ "if _moments=0, no moments will be computed"               @
_IR=1;         @ "if _IR=0, no impulse responses will be computed"          @
_confidence=0; @ "if =1 confidence intervalls for the simulated moments will be printed " @

_HPL=1600;     @ "the filter weight of the Hodrick-Prescott filter"         @
               @ "if _HPL=0, the filter will not be applied"                @

nobs=80;       @ "the number of elements in each simulated time series"     @
nobs1=20;      @ "the length of the impulse reponsees"                      @
nofs=300;      @ "the number of simulations from which moment averages are to be computed" @

_scale=0;      @ "if _scale=1 all plots will have the same scale"           @
_nocolor=0;    @ "if=0, lines will be colored"                              @

/* Choice of random numbers */
_makeShocks=0; @ "if=1, an array of shocks will be created that can be used in repeated simulations"   @
_loadShocks=0; @ "if=1, the program looks for the file epsilon_array and loads shocks from this array" @
               @ "if=0, the program draws new random numbers for each simulation"                      @

/* Choice of output file */
outfile="SDRAM_Shell.txt"; @ "the name of the file to which the program writes its output" @

/* Determine the type and number of the model's variables, please replace the ? */
_nx=?;  @ "the number of states                          "@
_nz=?;  @ "the number of shocks                          "@
_ny=?;  @ "the number of non predetermined variables     "@
_nu=?;  @ "if _GSchur=0 you must tell the program the number of static equations _nu. If _equations=0 the program assumes that the last _ny-_nu variables in y are costates" @
_ns=?;  @ "if _equations=0 you may include futher variables s in the vector y and provide the respective matrices Lsx and Lsz. See the manual" @

@ ---------------------------------- Do not change the next line of code --------------------- @
#include CoRRAM_1.src;
@ -------------------------------------------------------------------------------------------- @

/*
**
** You must put in the names of all variables in your model
** for which you either want the program to compute and display
** impulse respones or compute and print second moments.
** 
** Thus, variables that are in x, y, or z, for which you do
** not provide information, are ignored when plotting impulse
** responses or when printing second moments.
**
**
** The order in which the variables appear below is also the
** order in which results will be printed.
**
** Please replace the ? and add as many instances of Var as you have variables in your model for which you desire output.
*/

Var[1].varname="???";
Var[1].vartype="?";
Var[1].varpos=?;
Var[1].varprint=1;   @ if =1 and _moments=1, moments are computed and printed @
Var[1].relsx=1;      @ if =1 and _moments=1, standard deviations relative to this variable will be computed and printed @
Var[1].crosscorr=1;  @ if =1 and _moments=1, cross correlations between this variable and the other will be computed and printed @
Var[1].varplot=1;    @ if =1 and _IR=1 an impulse response for this variable will be computed and plotted @
Var[1].plotno=1;     @ equal 1-6, the graphics panel in which the impulse response will be plotted @

/* Set legend positions individually, see the manual for the possible code */
  
/*
**
** First, you must insert the parameters of your model.
**
** Second, if _equation=1, you must compute the stationary solution
** of all variables in your model otherwise you must compute
** - if necessary - those quantities that appear the in matrices.
**
** Third, you must put the equations of your model in the
** proc SYS
**
** Fourth, you must stet up the matrices _Rho and _Omega and
** asign a value to _sigma (the parameters of the transition
** equation for the shocks).
*/

@ First Part: Parameters of your model @

@ Second Part: Stationary values of your model's variables, if required @

@ Third Part: assign the stationary solutions to _xstar and _ystar, input the model's equation in Sys or input the matrices @


@ Third Part: in Sys: specify the equations of your model @

proc(1)=Sys(w);

  local fx;

  fx=zeros(_nx+_ny,1);

  if _eqno==0; retp(fx); else; retp(fx[_eqno]); endif;
  retp(fx);

endp;


/* Fourth Part: the transition equation for shock: please replace the ? */
_sigma=?;
_Rho=?;
_Omega=?;


@ -------------- Do not change the next line of code ------------- @
#include CoRRAM_2.src;
@ ----------------------------------------------------------------------- @

/* if you model includes additional variables, _ns>0, you must input Lsx and Lsz here: please replace the ?*/
Lsx=?;
Lsz=?;

@ -------------- Do not change the remaining lines of code ------------ @
#include CoRRAM_3.src;
ende:
end;
@ ----------------------------------------------------------------------- @


