Skip to content
Snippets Groups Projects
Select Git revision
  • 05ebb5110292a7c0b9710e2078769ad04fbf1de0
  • master default protected
  • 6.x protected
  • madysson
  • 5.x protected
  • asm
  • time-varying-information-set
  • 4.6 protected
  • dynare_minreal
  • dragonfly
  • various_fixes
  • 4.5 protected
  • clang+openmp
  • exo_steady_state
  • declare_vars_in_model_block
  • julia
  • error_msg_undeclared_model_vars
  • static_aux_vars
  • slice
  • aux_func
  • penalty
  • 6.4 protected
  • 6.3 protected
  • 6.2 protected
  • 6.1 protected
  • 6.0 protected
  • 6-beta2 protected
  • 6-beta1 protected
  • 5.5 protected
  • 5.4 protected
  • 5.3 protected
  • 5.2 protected
  • 5.1 protected
  • 5.0 protected
  • 5.0-rc1 protected
  • 4.7-beta3 protected
  • 4.7-beta2 protected
  • 4.7-beta1 protected
  • 4.6.4 protected
  • 4.6.3 protected
  • 4.6.2 protected
41 results

ramst.mod

Blame
  • ramst.mod 2.23 KiB
    /*
     * 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;