# IRFs of persistent shock and transitory shock in stochastic model

Hi,

I am asking a very general question. Given an RBC model, the assumption is quite usual, technology follows the AR(1) process. However, the professor asks us to plot IRFs for both one-time shock and persistent shock(AR prcoess).I am confused about it, since i use stoch_simul(irf=50,order =1) it automatically gives me the IRFs.

My question is:

1. Is this automatically generated IRFs by “stoch_simul(order=1, irf=50)” one-time or persistent?

2. Since i think the definition of IRFs is supposed there is an impulse at a certain period, it means that it is one_time shock right? But how about persistent shock(professor said AR(1))?

%----------------------------------------------------------------
% Endogenous variables
%----------------------------------------------------------------
var k, y, c, n, r, a, i;

%----------------------------------------------------------------
% Exogenous variables - shocks
%----------------------------------------------------------------
varexo eps;

%----------------------------------------------------------------
% Parametrization
%----------------------------------------------------------------

parameters beta, rho, delta, alpha, A, sigma, kbar, ybar, cbar, nbar, rbar;
beta = 0.99;
rho = 0.95;
delta = 0.025;
alpha = 0.33;
A = 1.75;
sigma = 0.0032;

nbar = (1 + (A/(1-alpha)) * (1 - betadeltaalpha/(1-beta*(1-delta))))^(-1);
kbar = nbar*(alpha/(1/beta - 1 + delta))^(1/(1-alpha));
ybar = kbar^alpha * nbar^(1-theta);
cbar = ybar - deltakbar;
rbar = alpha
(kbar/nbar)^(alpha-1);

%----------------------------------------------------------------
% Model equations
%----------------------------------------------------------------

model;
//1. Euler equation
c = c(+1) - betarbarr(+1);

y - c = n/(1-nbar);

//3. Budget constraint
cbarc = ybary + kbar*((1-delta)*k(-1) - k);

//4. Production function
y = a + alpha*k(-1) + (1-alpha)*n;

//5. Return on capital
r = y - k(-1);

//6. Law of motion for productivity
a = rho*a(-1) + eps;

//7. Investment (auxiliary variable)
i = (k - (1-delta)*k(-1))/delta;
end;

%----------------------------------------------------------------
% define shock variances
%---------------------------------------------------------------

shocks;
var eps = sigma^2;
end;

%----------------------------------------------------------------
% steady states: all 0 due to linear model
%----------------------------------------------------------------
check;

%----------------------------------------------------------------
% generate IRFs
%----------------------------------------------------------------
stoch_simul(order = 1, irf=40) a i k y c n ;

I don’t get it. With persistence `rho=0`, with a one-time shock, `rho=0`.

The original model, the techonology follow the AR (1) process, however, the process requires us to plot IRFs for both one-time shock and persistent shock.

Do you mean in persistent shock pho don’t equal to 0, but with one-time it is =0?

Since the model is with persistent shock, can impulse reponse function be plotted? I think IRFs is only for onetime shock

Without more information it is impossible to tell. However, the question most probably considers `a` to be the shock process. So the difference between the two IRFs you are supposed to generate is just a different value of the persistence parameter as written above.

The one-time model is like this one: My question is: can I use the simul_ instead of stoch_simul to plot the trajectory of variables (since when rho =0 we obatined the deterministic model instead of stochastic one)?

or it does not matter under one-time shock, since we are considering order=1. The stochastic model = deterministic one due to certainty equivalence.

My question is:

1. Since rho=0 (one-time shock), my model becomes deterministic model. Should I use simul_ instead of stoch_simul?

2. If I use comments “simul”, how can i plot Impulse responses for variables? Since there is no such comments like (irf=50)

Why do you think the model is deterministic for `rho=0`?

Since I assume the shock happens at period 1 with one standard deviation, which means that it is fully predicted so it is deterministic model.

Is not correct ?

By the way, if i set rho=0, and use stoch_simul which gives me the simulated shock like this column:

If i use simul_ which gives me this figure below. It is exactly what i want to achieve.

Since professor only says that presenting the response of the model to one-time TFP shock , I guess it means that it is fully predicted model (deterministic one). Do i still need to use stoch_simul?

At first order that distinction does not matter due to certainty equivalence. But looking at `oo_.exo_simul` is not correct for `stoch_simul`, because it is a full simulation, not the IRF. The IRFs are in `oo_.irfs`.