Dear all,
I spent quite some time on this issue now but still can't figure out
what causes the problem. I wrote two versions of a function for
conducting a rolling DYNAMIC forecast analysis. I attached the script.
The first function is called fcrol() and returns a matrix, and there are
no sub-functions called. Here fcast() using the "--dynamic" option works
fine.
The second function returns a bundle, and the user is asked to provide
initial information to setVC() which returns a bundle of information
which are used when calling tscvrol().
However, this second approach doesn't work, and I have no idea at which
point some information gets "lost" when going from setCV() --> tscvrol().
The weird thing is that only the "--dynamic" option does not work while
running a static forecast works fine. You can see this by activating one
of the four options in the script (lines 96 to 99).
Sven, I also tried what you suggested but the issue with the "--dynamic"
option still exists.
Artur
Am 23.01.2017 um 17:08 schrieb Artur Tarassow:
Am 23.01.2017 um 14:58 schrieb Artur Tarassow:
> Sorry, for writing again. But I should have provided a more tidy example.
> Please find attached the two approaches: 1) no bundle involved and 2)
> bundle involved computing the rolling forecast of a model.
Well, not sure if that's intended (no time to think this through right
now), but the $t1 in the first function after doing "smpl --no-missing"
will in general be different from the $t1 in the second function.
Because on exit from the first function the sample is re-set to the
state that it was in before.
Maybe you should explicitly store in the bundle the information (obsnum
or obslabel) about the samples you really want. Then you can re-set it
whereever you want. This includes: (1) the first data obs ever used
(including initial values), (2) the first obs entering on the LHS of the
equation, (3) the last obs of the initial training sample, (4) the last
available obs, (5) the last obs to be forecast (which might not have
actual observable data, but would be needed as a container in the
workfile) -- you get the idea I guess.
-sven
I guess you are right, Sven. It seems to be more tidy generating and
using these strings/values you mentioned. I am going to try this and see
how it works.
Best,
Artur