# Unmaterialized News Shock clarification

**URL:** <https://forum.dynare.org/t/unmaterialized-news-shock-clarification/15664>\
**Category:** Stochastic simulations\
**Created:** [23 April 2020 23:43 UTC](https://forum.dynare.org/t/unmaterialized-news-shock-clarification/15664 "2020-04-23T23:43:44Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![JC-Granados](https://forum.dynare.org/user_avatar/forum.dynare.org/jc-granados/32/10041_2.png) [@JC-Granados](https://forum.dynare.org/u/JC-Granados)\
**Post date:** [23 April 2020 23:43 UTC](https://forum.dynare.org/t/unmaterialized-news-shock-clarification/15664/1 "2020-04-23T23:43:44Z")

</div>

Hi all,

I have a question on the application of the anticipated news shock. (e.g., [https://github.com/JohannesPfeifer/DSGE\_mod/blob/master/RBC\_news\_shock\_model/RBC\_news\_shock\_model.mod](https://github.com/JohannesPfeifer/DSGE_mod/blob/master/RBC_news_shock_model/RBC_news_shock_model.mod))

The shocks are applied as follows:

```
//8. exogenous TFP process
z=rhoz*z(-1)+eps_z_surprise + eps_z_news(-8);

shocks;
    var eps_z_news=1; //8 period anticipated TFP news shock
    var eps_z_surprise=1; //TFP surprise shock
end;

```

However, I don’t understand how these shocks offset each other given they both have positive signs (z=rhoz\*z(-1)+eps\_z\_surprise + eps\_z\_news(-8))

Shouldn’t it be:

```
//8. exogenous TFP process
z = rhoz*z(-1) - eps_z_surprise + eps_z_news(-8);

shocks;
    var eps_z_news=1; //8 period anticipated TFP news shock
    var eps_z_surprise=1; //TFP surprise shock
end;

```

or

```
//8. exogenous TFP process
z= rhoz*z(-1) + eps_z_surprise + eps_z_news(-8);

shocks;
    var eps_z_news = 1; 
    var eps_z_surprise = -1 ; 
end;

```

And if these alternatives don’t work, what part of the original code implies the shocks are actually offsetting each other rather than going in the same direction?

For example, I was thinking of changing the shocks block so that it accounts for exactly offsetting (corr = -1) shocks:

```
shocks;
var eps_z_news = 1; 
var eps_z_surprise = 1 ;
corr eps_z_news, eps_z_surprise = -1;
end;

```

Thanks,

Camilo

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [24 April 2020 09:06 UTC](https://forum.dynare.org/t/unmaterialized-news-shock-clarification/15664/2 "2020-04-24T09:06:11Z")

</div>

Given that the shocks themselves can be positive or negative, the use of a plus is simply a convention. Also note that negative variance in the `shocks` do not make sense.

What is important is that in the `simult_`-function used to simulate the model the second (surprise) shock indeed has a negative sign.

---

<div class="post-metadata">

**Author:** ![JC-Granados](https://forum.dynare.org/user_avatar/forum.dynare.org/jc-granados/32/10041_2.png) [@JC-Granados](https://forum.dynare.org/u/JC-Granados)\
**Post date:** [24 April 2020 20:12 UTC](https://forum.dynare.org/t/unmaterialized-news-shock-clarification/15664/3 "2020-04-24T20:12:02Z")

</div>

Thank you, Johannes-

In your github those lines looked commented so I failed to see the options used in `simult`.

Now everything’s clear.

Best,

Camilo

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [27 April 2020 14:02 UTC](https://forum.dynare.org/t/unmaterialized-news-shock-clarification/15664/4 "2020-04-27T14:02:23Z")

</div>

Yes. Github’s syntax highlighting does not work well for Dynare code.

---

<div class="post-metadata">

**Author:** ![amyzhangmin](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/a6a055/32.png) [@amyzhangmin](https://forum.dynare.org/u/amyzhangmin)\
**Post date:** [29 June 2021 13:30 UTC](https://forum.dynare.org/t/unmaterialized-news-shock-clarification/15664/5 "2021-06-29T13:30:14Z")

</div>

when replicating the code, the following errors showed up:

```auto
Error using simult_
Too many input arguments.

Error in RBC_news_shock_jpfeifer (line 239)
y2 = simult_(M_,options_,initial_condition_states,oo_.dr,shock_matrix,1);

Error in dynare (line 223)
evalin('base',fname) ;

```

how to fix that?

---

<div class="post-metadata">

**Author:** ![amyzhangmin](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/a6a055/32.png) [@amyzhangmin](https://forum.dynare.org/u/amyzhangmin)\
**Post date:** [30 June 2021 05:25 UTC](https://forum.dynare.org/t/unmaterialized-news-shock-clarification/15664/6 "2021-06-30T05:25:38Z")

</div>

Is it only me who met such an issue? Or it’s sth related with my dynare/matlab version?

---

<div class="post-metadata">

**Author:** ![amyzhangmin](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/a6a055/32.png) [@amyzhangmin](https://forum.dynare.org/u/amyzhangmin)\
**Post date:** [30 June 2021 05:26 UTC](https://forum.dynare.org/t/unmaterialized-news-shock-clarification/15664/7 "2021-06-30T05:26:18Z")

</div>

The codes are exactly the same from  
[https://github.com/JohannesPfeifer/DSGE\_mod/blob/master/RBC\_news\_shock\_model/RBC\_news\_shock\_model.mod](https://github.com/JohannesPfeifer/DSGE_mod/blob/master/RBC_news_shock_model/RBC_news_shock_model.mod)

---

<div class="post-metadata">

**Author:** ![amyzhangmin](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/a6a055/32.png) [@amyzhangmin](https://forum.dynare.org/u/amyzhangmin)\
**Post date:** [30 June 2021 05:54 UTC](https://forum.dynare.org/t/unmaterialized-news-shock-clarification/15664/8 "2021-06-30T05:54:24Z")

</div>

I fixed it by deleting the first two inputs:

```auto
y2 = simult_(initial_condition_states,oo_.dr,shock_matrix,1); 

```

I referred to [BreakingFeaturesIn4.6 · Wiki · Dynare / dynare · GitLab](https://git.dynare.org/Dynare/dynare/-/wikis/BreakingFeaturesIn4.6)  
This forum is really helpful! Thank you all guys!

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [30 June 2021 07:53 UTC](https://forum.dynare.org/t/unmaterialized-news-shock-clarification/15664/9 "2021-06-30T07:53:04Z")

</div>

Please use the most recent Dynare version.
