# Exogenous shocks multiple values

**URL:** <https://forum.dynare.org/t/exogenous-shocks-multiple-values/21605>\
**Category:** Stochastic simulations\
**Created:** [7 December 2022 18:55 UTC](https://forum.dynare.org/t/exogenous-shocks-multiple-values/21605 "2022-12-07T18:55:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amina0621](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/54ee81/32.png) [@amina0621](https://forum.dynare.org/u/amina0621)\
**Post date:** [7 December 2022 18:55 UTC](https://forum.dynare.org/t/exogenous-shocks-multiple-values/21605/1 "2022-12-07T18:55:33Z")

</div>

Hi all,

I am trying to have multiple shocks in dynare and I follow [Shocks on exogenous variables (Dynare Reference Manual)](https://archives.dynare.org/manual/Shocks-on-exogenous-variables.html)

> var tfp = 1;  
> stoch\_simul(order = 1,irf = 20);  
> gives IRF and no error message while

> var tfp;  
> periods 1:3;  
> values 1.5 0.8 0.7;  
> stoch\_simul(order=1,irf=20);  
> gives an error: All endogenous are constant or non stationary, not displaying correlations and auto-correlations.

How can I add multiple shocks that tfp could take for the next three periods?  
Thanks.

---

<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:** [8 December 2022 08:42 UTC](https://forum.dynare.org/t/exogenous-shocks-multiple-values/21605/2 "2022-12-08T08:42:16Z")

</div>

See

> [@Sequences of both negative and positive shockss](https://forum.dynare.org/t/sequences-of-both-negative-and-positive-shockss/5449/4):
>
> Using the simult\_-function of Dynare, you can simulate the model with any given sequence of shocks that you want. An example is at [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)
