| 1 |
/* |
| 2 |
* This file studies the transition to steady state in a simple Solow model with Cobb-Douglass production function |
| 3 |
* |
| 4 |
* This implementation was written by Johannes Pfeifer. |
| 5 |
* Please note that the following copyright notice only applies to this Dynare |
| 6 |
* implementation of the model. |
| 7 |
*/ |
| 8 |
|
| 9 |
/* |
| 10 |
* Copyright © 2014 Johannes Pfeifer |
| 11 |
* |
| 12 |
* This is free software: you can redistribute it and/or modify |
| 13 |
* it under the terms of the GNU General Public License as published by |
| 14 |
* the Free Software Foundation, either version 3 of the License, or |
| 15 |
* (at your option) any later version. |
| 16 |
* |
| 17 |
* It is distributed in the hope that it will be useful, |
| 18 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 |
* GNU General Public License for more details. |
| 21 |
* |
| 22 |
* For a copy of the GNU General Public License, |
| 23 |
* see <https://www.gnu.org/licenses/>. |
| 24 |
*/ |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
var c k y invest; |
| 29 |
predetermined_variables k; |
| 30 |
parameters s alpha delta n g; |
| 31 |
|
| 32 |
s=0.2; |
| 33 |
alpha=0.3; |
| 34 |
delta=0.1; |
| 35 |
n=0.01; |
| 36 |
g=0.02; |
| 37 |
g_initial=0.02; |
| 38 |
|
| 39 |
model; |
| 40 |
(1+n+g+n*g)*k(+1)=(1-delta)*k+invest; |
| 41 |
invest+c=y; |
| 42 |
c=(1-s)*y; |
| 43 |
y=k^alpha; |
| 44 |
end; |
| 45 |
|
| 46 |
%set initial condition to 90% of steady state value |
| 47 |
initval; |
| 48 |
k=0.9*((delta+n+g+n*g)/s)^(1/(alpha-1)); |
| 49 |
y=k^alpha; |
| 50 |
c=(1-s)*y; |
| 51 |
invest=y-c; |
| 52 |
end; |
| 53 |
|
| 54 |
%set terminal condition to steady state value |
| 55 |
endval; |
| 56 |
k=((delta+n+g+n*g)/s)^(1/(alpha-1)); |
| 57 |
y=k^alpha; |
| 58 |
c=(1-s)*y; |
| 59 |
invest=y-c; |
| 60 |
end; |
| 61 |
resid; |
| 62 |
steady; |
| 63 |
|
| 64 |
perfect_foresight_setup(periods=200); |
| 65 |
perfect_foresight_solver(solve_algo=4); |
| 66 |
|
| 67 |
rplot k; |