%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 14.461 Blanchard-Kahn for Open Economy Dynamics % % FIXED EXCHANGE RATE % % ----------------------------------------------------------------------- % % Suman Basu, September 2005 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% tic % Starting the program clear %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Parameter values % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% alpha = 0.5; beta = 0.1; gamma = 10; pstar = 0; % Set matrix and stochastic steady state a11 = 1 + beta/alpha + 1/(alpha*gamma); a12 = -1/(alpha*gamma); a21 = 1; a22 = 0; M = [a11 a12; a21 a22]; yss = 0; pss = pstar; X = [0; 0]; %Decompose matrix and solve for price level; [V, J] = jordan(M) Z = inv(V); X(2) = 0; xstable = -(Z(1,2)/Z(1,1))*X(2); X(1) = xstable; % Here xstable = 0. % PSet 1 Problem 2 Part 1: Change X(1) % No. of periods T = 10; % Set up grid for graphing price = zeros(1, T); price(1,1) = X(2); price(1,2) = X(1); % Generate impulse response for i = 1:T-2 X = M*X; price(1, i + 2) = X(1); end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Graph time series % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% plot(1:T, price); grid title('Evolution of price level in FIXED exchange rate economy, mbar = m') toc