fipelle / MessyTimeSeries.jl

A Julia implementation of basic tools for time series analysis compatible with incomplete data.
BSD 3-Clause "New" or "Revised" License
121 stars 5 forks source link

Confidence intervals and IRFs #12

Closed fipelle closed 2 years ago

fipelle commented 4 years ago

Nice! Is it possible to compute conf intervals for the forecasts?

Also, I'm not sure if this is w/i the scope of your package, but it's often convenient to derive IRFs w/ confidence bands. Luca has some nice Julia options here.

Originally posted by @azev77 in https://github.com/fipelle/TSAnalysis.jl/issues/9#issuecomment-604054920


Confidence intervals

Although there is not a high-level interface to compute the confidence intervals yet, you could use the variance in the output of the Kalman filter or the subsampling methods. The latter is easier to implement. For instance, you could follow the steps below:

  1. Compute the coefficients for a series of data partitions - for instance, generated with the artificial delete-d jackknife or the stationary bootstrap;
  2. Compute a range of forecasts with the real data (and not the random partitions) using, in turn, each matrix of coefficients generated in the previous point;
  3. Compute the empirical confidence intervals.

Impulse response functions

I know Luca, I am sure that the VectorAutoregression package is a good way to go for computing impulse response functions. I am not sure I will extend support to the IRFs anytime soon. I think I will give priority to other forecasting models (e.g., dynamic factor models) and basic analytics. However, I recon that it would be interesting to look at the IRFs of semi-structural models.

azev77 commented 4 years ago

Sounds good. Unfortunately VectorAutoregression.jl doesn't currently work & isn't being upgraded...

greimel commented 3 years ago

xref https://github.com/lucabrugnolini/VectorAutoregressions.jl/pull/8

VectorAutoregressions now passes tests under Julia 1.6

fipelle commented 3 years ago

Thank you for this! I will get back to these features once a series of compatibility issues are resolved.

fipelle commented 2 years ago

It would be good to have some cross interface between VectorAutoregressions.jl and MessyTimeSeriesOptim.jl to compute the IRFs of the models estimated with the latter (either just for VARs or VMA and DFMs as well).

azev77 commented 2 years ago

It says the issue was closed. Does that mean IRFs are now included?

fipelle commented 2 years ago

@azev77 they are not public yet, but I have a private repo where I am testing with the IRFs. They will be most likely included in MessyTimeSeriesOptim.jl.

fipelle commented 2 years ago

@azev77 I am implementing a way for handling state-space models with diffuse initial conditions first in order to better handle non-stationary problems (see https://github.com/fipelle/MessyTimeSeries.jl/issues/39).