# Question about varexo\_det and linearization

**URL:** https://forum.dynare.org/t/question-about-varexo-det-and-linearization/26290
**Category:** Stochastic simulations
**Created:** [21 August 2024 18:58 UTC](https://forum.dynare.org/t/question-about-varexo-det-and-linearization/26290 "2024-08-21T18:58:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![wdiamond](https://forum.dynare.org/letter_avatar_proxy/v4/letter/w/4491bb/32.png) [@wdiamond](https://forum.dynare.org/u/wdiamond)
#### Post date: [21 August 2024 18:58 UTC](https://forum.dynare.org/t/question-about-varexo-det-and-linearization/26290/1 "2024-08-21T18:58:52Z")

</div>

I am trying to use dynare to compare the non-linear solution I have to a model (computed with other tools) to the behavior of a linear solution. The paper is about interactions between fiscal and monetary policy, and we are trying to determine when nonlinear methods are needed to capture such interactions.

The model has a standard New Keynesian monetary policy rule where the nominal interest rate responds to inflation. We want to quantify the impact of 1. a fiscal transfer and 2. the combination of a fiscal transfer and a temporary deterministic change in the monetary policy rule.

We currently are using varexo\_det to temporarily change the coefficient in our monetary rule on inflation, and I am wondering whether such a parameter change is itself linearly approximated in a first-order stochastic simulation, or whether the parameter change itself is computed exactly (which would result in a different transition matrix for our linearized model before and after the parameter change). Is there a description somewhere of what numerical methods are used when varexo\_det is called? Perhaps initval and endval would be another approach we could use instead, or histval?

This detail I think matters quite a bit for whether our linear solution would allow for interactions between monetary and fiscal policy that interest us (or whether they are assumed away a priori).

(The full paper is here, solved with nonlinear methods, but we are less familiar with dynare. [https://papers.ssrn.com/sol3/papers.cfm?abstract\_id=4283119](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4283119) )

---

<div class="post-metadata">

### Author: ![German\_Sanchez](https://forum.dynare.org/letter_avatar_proxy/v4/letter/g/bc79bd/32.png) [@German\_Sanchez](https://forum.dynare.org/u/German_Sanchez)
#### Post date: [22 August 2024 06:11 UTC](https://forum.dynare.org/t/question-about-varexo-det-and-linearization/26290/2 "2024-08-22T06:11:30Z")

</div>

Adding to my coauthor message, here is a version of the dynare code. All files are required to run the full code. The main file is titled “covid\_code\_v11.mod”. Thanks!

[covid\_code\_v11.mod](https://forum.dynare.org/uploads/short-url/kWdL2AxaoQJc2hExAbqCH8FSbuH.mod) (28.9 KB)  
[default\_integrals.m](https://forum.dynare.org/uploads/short-url/e8lseyM1bRND9g8ry9LUYb4qkVu.m) (1.9 KB)  
[getDefaultFcts.m](https://forum.dynare.org/uploads/short-url/RLCdWfirfwEOMrazNuHiuOJltV.m) (953 Bytes)  
[getRefiRates.m](https://forum.dynare.org/uploads/short-url/gfmekDpfLjZ2npp3cttFCazedKP.m) (773 Bytes)  
[integEpsGL.m](https://forum.dynare.org/uploads/short-url/1OVOcdt4BcZMz2uGkfPicgfqKAp.m) (462 Bytes)

---

<div class="post-metadata">

### Author: ![German\_Sanchez](https://forum.dynare.org/letter_avatar_proxy/v4/letter/g/bc79bd/32.png) [@German\_Sanchez](https://forum.dynare.org/u/German_Sanchez)
#### Post date: [22 August 2024 13:36 UTC](https://forum.dynare.org/t/question-about-varexo-det-and-linearization/26290/3 "2024-08-22T13:36:41Z")

</div>

You also need these two .mat files to run the code. Thanks again!

[params\_file.mat](https://forum.dynare.org/uploads/short-url/xdFvTRQBPzy1UMvoH6zByu4pNvw.mat) (4.2 KB)  
[SS\_file.mat](https://forum.dynare.org/uploads/short-url/3HGds9HGf3jd5sekihnrtRnCNxF.mat) (1.4 KB)

---

<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: [26 August 2024 11:23 UTC](https://forum.dynare.org/t/question-about-varexo-det-and-linearization/26290/4 "2024-08-26T11:23:46Z")

</div>

Sorry for the delay, but I had to figure out the implementation myself. I don’t think `varexo_det` will work in your case as it relies on a linearized system also with respect to the `varexo_det`. See [varexo\_det: Implementation · Wiki · Dynare / dynare · GitLab](https://git.dynare.org/Dynare/dynare/-/wikis/varexo_det:-Implementation)

That would be different in the context of `perfect_foresight` where you can solve a nonlinear model. But it would require a linearization of the equations you want to have linear as the `linear_approximation` would again yield a linear version of the model.
