/usr/share/doc/dynare/examples/ramst.mod is in dynare-doc 4.5.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | /*
* An elementary RBC model, simulated in a deterministic setup.
*
* The model is the following: this is a closed economy, with a representative
* agent. The utility is equal to 'c^(1-gam)/(1-gam)', where 'c' is consumption
* and 'gam' is relative risk aversion. The subjective discount is 'bet'.
*
* The production function equals 'aa*x*k(-1)^alph', where 'aa' is a constant,
* 'x' is a stochastic technology level variable, 'k' is capital (using
* end-of-period timing convention, which is Dynare's default), and 'alph' is
* another constant.
*
* Capital stock evolves according to the usual law of motion, where 'delt'
* is the depreciation rate.
*/
/*
* Copyright (C) 2001-2010 Dynare Team
*
* This file is part of Dynare.
*
* Dynare is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Dynare is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Dynare. If not, see <http://www.gnu.org/licenses/>.
*/
// Endogenous variables: consumption and capital
var c k;
// Exogenous variable: technology level
varexo x;
// Parameters declaration and calibration
parameters alph gam delt bet aa;
alph=0.5;
gam=0.5;
delt=0.02;
bet=0.05;
aa=0.5;
// Equilibrium conditions
model;
c + k - aa*x*k(-1)^alph - (1-delt)*k(-1); // Resource constraint
c^(-gam) - (1+bet)^(-1)*(aa*alph*x(+1)*k^(alph-1) + 1 - delt)*c(+1)^(-gam); // Euler equation
end;
// Steady state (analytically solved)
initval;
x = 1;
k = ((delt+bet)/(1.0*aa*alph))^(1/(alph-1));
c = aa*k^alph-delt*k;
end;
// Check that this is indeed the steady state
steady;
// Check the Blanchard-Kahn conditions
check;
// Declare a positive technological shock in period 1
shocks;
var x;
periods 1;
values 1.2;
end;
// Deterministic simulation of the model for 200 periods
simul(periods=200);
// Display the path of consumption and capital
rplot c;
rplot k;
|