Page 1 of 1

MCE_SOLVE: a more reliable and efficient solver?

Posted: Mon Mar 27, 2023 6:21 am
by tvonbrasch
Hi,

A solver for linear and non-linear models under model-consistent (MC) or "rational" (RE) expectations in EViews is provided as a part of the FRB/US model project, see:

https://www.federalreserve.gov/econres/ ... ackage.htm

The subroutine can be applied to EViews models in general and they state that the code: "is more reliable and efficient than the RE algorithm built into EViews (Fair-Taylor) at solving FRB/US when any of its expectations are MC."

Is this true?

If so, it would be good if you could implement the more efficient algorithm provided in the MCE_SOLVE subroutine in EViews as well.

Thomas

Re: MCE_SOLVE: a more reliable and efficient solver?

Posted: Mon Mar 27, 2023 2:16 pm
by EViews Matt
Hello,

The existence of more efficient algorithms wouldn't surprise me, given the simplicity of the Fair-Taylor algorithm, but I haven't evaluated the algorithms bundled with the FRB/US model. I have no reason to doubt the authors, so exploring a native EViews implementation of their work in future is a good idea.

Re: MCE_SOLVE: a more reliable and efficient solver?

Posted: Tue Mar 28, 2023 9:05 am
by tvonbrasch
That is excellent news. Keep up the good work.
t

Re: MCE_SOLVE: a more reliable and efficient solver?

Posted: Mon Apr 03, 2023 12:02 pm
by random_user
I second that request. The Fair-Taylor algorithm is not ideal for large macro models with MCE expectations (i.e. many leads), so incorporating the FRB/US algorithm would be a great addition to the EViews solvers.

Re: MCE_SOLVE: a more reliable and efficient solver?

Posted: Tue May 02, 2023 3:44 am
by tvonbrasch
Hi,

I have now spent some time understanding and using the subroutine created by the FRB/US team (mce_solve), and I have made an add-in that uses that subroutine, but is a bit easier to execute from EViews without a deep understanding of all the details in the mce_solve-routine. When solving a model with model consistent expectations, instead of using the built-in EViews solver and the command:

model1.solve

for a model named model1, one may instead use the solveMCE-addin with the command:

solveMCE model1

More explicitly, consider the following example of uncovered interest rate parity:

Code: Select all

'specify model model m m.append log(e/e(+1)) = rdiff 'shift exogenous variable copy rdiff rdiff_1 smpl 2002 2010 rdiff_1 = rdiff_1+1/100 'create scenario and solve model m.scenario(n,alias=_1) uip m.override rdiff smpl 2001 @last-1 'since e(+1) needs to have a value, simulation must end in @last-1 solveMCE m
Attached is the add-in. To use it, first execute the program "solveMCE_install.prg" and then read the documentation "solveMCE.docx". Some further examples are included in the “example” folder.

In the case of including forward looking terms into a large-scale macroeconomic model, the mce_solve-algorithm created by the FRB/US team is much more efficient than the built-in EViews solver, i.e. the mce_solve algorithm solves the model, but the built-in EViews solver does not. That said, it takes some time to solve a large-scale model (around 2 500 equations), even though it only holds a couple of forward-looking equations. So, although the FRB/US team has provided us with a great solution that works, it can be improved in terms of speed. Hopefully the EViews team will soon make this great functionality a part of the in-build EViews solver-algorithm. That would probably speed things up.

Re: MCE_SOLVE: a more reliable and efficient solver?

Posted: Fri May 05, 2023 12:49 am
by tvonbrasch
Attached is a new version of the add-in, please update if you have the old version. The classical Smets-Wouters DSGE model is now also included in the example folder: https://onlinelibrary.wiley.com/doi/10. ... 3770383415. This is an example where the mce_solve-subroutine solves the model, but where the built-in EViews algorithm does not solve the model. In the case of a monetary policy shock, it takes 1.8 seconds to solve the 29-equation Smets-Wouters model in EViews with the solveMCE add-in, and about 0.8 seconds to solve it in Dynare/Matlab. In comparison, solving a large macroeconometric model (2 500 equations) with a couple of forward terms takes between 5 to 10 minutes in EViews with the solveMCE add-in.

Re: MCE_SOLVE: a more reliable and efficient solver?

Posted: Wed May 10, 2023 12:01 pm
by random_user
That's pretty useful, thanks for sharing, and I hope the EViews crew make it built-in, eventually.

Re: MCE_SOLVE: a more reliable and efficient solver?

Posted: Thu Jul 06, 2023 4:52 am
by tvonbrasch
solveMCE_v3.zip
(2.59 MiB) Downloaded 605 times
Attached is a new version of the solveMCE add-in that also allows for analyzing optimal policy. It makes use of the “opt” command from the mce_solve-algorithm (see the documentation mce_solve_users_guide.pdf in the frbus_mce_solve_documentation-folder). You may thus run experiments where the simulations find the paths of one or more instrument variables that minimize the value of a quadratic loss function, see the example file: small_macroeconomic_model_minimize_loss_function.prg in the example folder. This functionality should also be included as an in-build feature of the model-object in EViews. Hopefully, the EViews team will soon make this functionality available.