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
MCE_SOLVE: a more reliable and efficient solver?
Moderators: EViews Gareth, EViews Moderator
-
- Posts: 544
- Joined: Fri Apr 15, 2011 5:35 am
-
- EViews Developer
- Posts: 570
- Joined: Thu Apr 25, 2013 7:48 pm
Re: MCE_SOLVE: a more reliable and efficient solver?
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.
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.
-
- Posts: 544
- Joined: Fri Apr 15, 2011 5:35 am
Re: MCE_SOLVE: a more reliable and efficient solver?
That is excellent news. Keep up the good work.
t
t
-
- Posts: 17
- Joined: Wed Jun 23, 2021 1:48 pm
Re: MCE_SOLVE: a more reliable and efficient solver?
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.
-
- Posts: 544
- Joined: Fri Apr 15, 2011 5:35 am
Re: MCE_SOLVE: a more reliable and efficient solver?
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:
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.
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
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.
- Attachments
-
- solveMCE_v1.zip
- (602.25 KiB) Downloaded 572 times
-
- Posts: 544
- Joined: Fri Apr 15, 2011 5:35 am
Re: MCE_SOLVE: a more reliable and efficient solver?
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.
- Attachments
-
- solveMCE_v2.zip
- (2.54 MiB) Downloaded 578 times
-
- Posts: 17
- Joined: Wed Jun 23, 2021 1:48 pm
Re: MCE_SOLVE: a more reliable and efficient solver?
That's pretty useful, thanks for sharing, and I hope the EViews crew make it built-in, eventually.
-
- Posts: 544
- Joined: Fri Apr 15, 2011 5:35 am
Re: MCE_SOLVE: a more reliable and efficient solver?
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.
Who is online
Users browsing this forum: No registered users and 2 guests