Created
November 28, 2013 11:33
-
-
Save stepan-a/7690503 to your computer and use it in GitHub Desktop.
How to simulate a perfect foresight RBC model with a productivity level growing linearly during twenty periods from one to two (and staying permanently and this level)?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var c k; | |
varexo x; | |
parameters alph gam delt bet; | |
alph=0.5; | |
gam=0.5; | |
delt=0.02; | |
bet=0.05; | |
model; | |
c + k - x*k(-1)^alph - (1-delt)*k(-1); | |
c^(-gam) - (1+bet)^(-1)*(alph*x(+1)*k^(alph-1) + 1 - delt)*c(+1)^(-gam); | |
end; | |
initval; | |
x = 1; | |
k = ((delt+bet)/(x*alph))^(1/(alph-1)); | |
c = x*k^alph-delt*k; | |
end; | |
steady; | |
endval; | |
x = 2; | |
k = ((delt+bet)/(x*alph))^(1/(alph-1)); | |
c = x*k^alph-delt*k; | |
end; | |
steady; | |
shocks; | |
var x; | |
periods 1:20; | |
values (transpose(linspace(1.05,2,20))); | |
end; | |
simul(periods=400); | |
rplot c; | |
rplot k; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment