% bewley99v2.m % revised from bewley99.m in task4, incorporate iid labor income shock %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Aiyagari's model( with related Bewley models ) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear global beta mu A delta alpha s N prob b fixw indi kk kap probst tic %diary bewley.out; disp('family of Bewley models'); disp(''); % % set parameter values % mu = 3; % risk aversion beta = 0.96; % subjective discount factor delta = 0.08; % depreciation A = 1.00; % production technology alpha = 0.36; % capital's share of income % approximate labor endowment shocks with seven states Markov chain % log(s_t) = rho*log(s_t-1)+sigmaint*sqrt(1-rho^2)*error_t N = 7; % number of discretized states %rho = 0.2; % first-order autoregressive coefficient %sigmaint = 0.6; % intermediate value to calculate sigma %sigma = sigmaint*sqrt(1-rho^2); % standard deviation of error_t % prob is transition matrix of the Markov chain % logs is the discretized states of log labor earnings % invdist is the invariant distribution of Markov chain % alambda and asigma are respectively the theoretical % rho and standard deviation of log labor income in Markov chain %[prob,logs,invdist,alambda,asigma]=markovappr(rho,sigma,3,N); % s1 and s2 are respectively the states for two discrete distribution, % they share the same cdf, the same mean, var(s1)