# Correlation between two exogenous variables

**URL:** <https://forum.dynare.org/t/correlation-between-two-exogenous-variables/24996>\
**Category:** Stochastic simulations\
**Created:** [19 January 2024 21:38 UTC](https://forum.dynare.org/t/correlation-between-two-exogenous-variables/24996 "2024-01-19T21:38:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex22](https://forum.dynare.org/user_avatar/forum.dynare.org/alex22/32/16798_2.png) [@alex22](https://forum.dynare.org/u/alex22)\
**Post date:** [19 January 2024 21:38 UTC](https://forum.dynare.org/t/correlation-between-two-exogenous-variables/24996/1 "2024-01-19T21:38:07Z")

</div>

Hello,

I have a question about the correlation between two exogenous variables. I want to simulate two shocks at the same time, I was wondering if it was possible to do it on dynare with some command. I would therefore like the monetary or fiscal shock to occur at the same time as the energy shock, can anyone tell me how? I tried to set a parameter (that was equal to the correlation) in the monetary shock multiplied by the energy shock, but nothing changes.

Thank you

---

<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:** [22 January 2024 08:27 UTC](https://forum.dynare.org/t/correlation-between-two-exogenous-variables/24996/2 "2024-01-22T08:27:57Z")

</div>

Please have a look at

> [@IRFs - combined effect of two shocks](https://forum.dynare.org/t/irfs-combined-effect-of-two-shocks/2321/5):
>
> As long as you know what you are doing, having two shocks simultaneously is no problem (and does in particular not contradict the logic of an IRF as it can be interpreted as a single new shock that hits two different variables at the same time) and can be done in Dynare. Moreover, it is a recurring theme. For a potential solution, see [[3 exogenous shocks at a time](https://forum.dynare.org/t/3-exogenous-shocks-at-a-time/1393/1)). In case you want to use two different but correlated shocks, Dynare performs a Cholesky decomposition, see [[Correlated shocks and i…](https://forum.dynare.org/t/correlated-shocks-and-impulse-response-functions/1444/1)
