forecast vs. simulate

138 views
Skip to first unread message

nul0m

unread,
Mar 27, 2009, 4:45:16 AM3/27/09
to The IRIS Toolbox Discussion Group
All this week I've actually been playing with these two functions =)
As a result I had two questions which, in fact, have the same basis:
the logik of separating on forecasting and simulation. So,

1. Let's assume that I have some judgements about future dynamic of my
model variables, so I can make conditional forecast. And I can use
either 'simulate' function exogenising state variables or 'forecast'
imposing some path for corresponfing measurement variables. Clear that
results will differ bacause of different way of thinking about shocks
which drove our variables. So what is more natural?..
1a. One technical subquestion =) When Iris simulate with exogenised
variable and endogenised shock how does she proceed it? Are there two
steps of proceeding: (a) solving system of model equations for each
period of time fixing all values except endogenised shock and (b)
simulating with achieved shock values?

2. Let's assume that I have judgements about values of future
structural shocks (no thoughts about variables at all). I use
'forecast' function with such assumptions to make conditional and
unconditional forecasts. Why does unconditional forecast absolutely
the same as conditional? They both know all about my future shocks :)

Sergey

Jaromir.Benes

unread,
Mar 27, 2009, 9:20:12 AM3/27/09
to The IRIS Toolbox Discussion Group
Just a quick answer now, and I'll get back to this later on:

Both [simulate] and [forecast] do, in principle, the same job, however
the newer [forecast] allows for a much general setup of conditional
simulations/forecasts. The [forecast] function is, in fact, a rational-
expectations extension of the framework proposed by Waggoner and Zha
(1999) (their framework handled conditional forecasts in VAR models).
I want to publish this extension at some point.

When writing this new function, I just wanted to keep the older
[simulate] and its syntax for backward compatibility reasons. I,
therefore, needed to come up with a new name for a very similar
function, and I no wonder chose [forecast].

Now, two major differences between [simulate] and [forecast] are the
following:

1. [forecast] produces not only the point (mean) simulation/forecast,
but also the corresponding MSE matrices or std devs (taking into
account both uncertainty in the initial conditions -- if these have
been estimated by running a Kalman filter -- and uncertainty about
future shocks.

2. When you want to exogenise a particular (set of) endogenous variable
(s), function [forecast] will, in general, use all the shocks in the
model to do the job by finding such a combination of the shocks that
minimises the weighted sum of the squares of them. The weights are
indirectly proportional to the shocks' variances currently assigned
in the model. In other words.

By setting some of the std devs to zeros you can effectively switch
off some of the shocks in this exercise. If you're exogenising e.g.
just one endogenous variable, and if you switch off all but one shock,
[forecast] will give you exactly the same results as if you called
[simulate] with a plan in which you'd exogenise/endogenise the same
variables/shock pair.

Note also that you can run both [simulate] and [forecast] in either an
"anticipated" or an "unanticipated" mode, you can run both of them
with models that have multiple parameterisations, etc.

As for your question #2, it is simply for some technical reasons that
the first output argument of the [forecast] function really includes
forecasts/simulations with the effect of all the structural shocks.
The terms "conditional" and "unconditional" in this context relate
solely to your judgment imposed on the trajectory of endogenous
variables. In other words, the "unconditional" forecasts (i.e. the
first output argument) from this function contain so called
"structural judgment" (i.e. judgment imposed as future structural
shocks) but not "reduced-form judgment"; the "conditional" forecasts
(the second output argument), on the other hand, contain both types of
judgment.

I don't want to change the structure of [forecast]'s output arguments,
again because of backward compatibility reasons. You can simply run
the [forecast] function without an empty judgment input argument first
to get the truly unconditional forecast.

I'll try to add some explanatory comments to the help on the
[forecast] function.

But will get back to this issue later on, and also probably write a
more detailed example code just on this.

Jaromir

nul0m

unread,
Mar 30, 2009, 4:11:53 AM3/30/09
to The IRIS Toolbox Discussion Group
"just a quick answer" :)) very detailed to be quick, I should say.
Thank you!!

So, as far as [forecast] is more general and can operate in the same
way as [simulate] then does it make sense to use [forecast] instead of
[simulate] everywhere?
If it does I would have one more question about exogenising when use
[forecast].
Let's assume that one wants to exo/endogenise some pair variable-shock
for say 3 periods but not from the starting point of forecast. So how
to assign non-zero values to the std dev of shock just for this 3
periods? If I use "m.std_myshock=value" then [forecast] changes values
of "myshock" starting from the first point of projection.

Sergey
> > Sergey- Hide quoted text -
>
> - Show quoted text -

Jaromir.Benes

unread,
Mar 30, 2009, 8:30:15 AM3/30/09
to The IRIS Toolbox Discussion Group
Well, I'd say that using [simulate] makes sense because it's easier to
set up the assumptions about exo/endo variables...

To make the std devs time varying, you can use the 'std' option (also
available e.g. in [filter]) to pass in a database that has the std
devs you wish to modify as time series (i.e. set them differently from
what's currently assigned in the model object).

E.g.

m.std_ec = 0;
x = struct();
x.std_ec = tseries(qq(2009,4):qq(2010,3),[0.01,0.02,0.03,0.04]);
[f1,f2] = forecast(m,d,qq(2009,2):qq(2015,4),j,'std',x);

will do the job.

Jaromir

Hector Herrada

unread,
Jan 21, 2014, 9:02:16 AM1/21/14
to iris-t...@googlegroups.com
Hi Jaromir,

I wonder if VAR/forecast also follows Waggoner and Zha (WZ). If so, please keep reading.

Given that you know the parameters of the matrices of a VAR model (not estimated in IRIS), are you able to assign these matrices to IRIS VAR model object to take advantage of WZ to generate conditional forecasts?

Thanks!

Hector
Reply all
Reply to author
Forward
0 new messages