JuliaStats / TimeModels.jl

Modeling time series in Julia
Other
57 stars 28 forks source link

VAR and Johansen cointegration model #61

Open tomaskrehlik opened 8 years ago

tomaskrehlik commented 8 years ago

I have a fairly working VAR and VECM implementation in repo tomaskrehlik/VARmodels.jl@4a35853a26edfd08d8147d2a2e542766aef73589 and would be happy to move it over here so that it is easier to find for broader audience. It contains

I can implement some unit-root tests. Apart from that the algorithms badly need more testing, I try to implement them as general as possible, but at the end of the day I am usually using them for some project so I am just making sure that my use-case works flawlessly and leave the rest for some other time---not often getting enough motivation to do the plain testing.

andreasnoack commented 8 years ago

We should probably try to combine our efforts here. My PhD thesis was about this and the code Julia I wrote for this is here. I was mainly focused on the I(2) model, but here is support for the I(1) model including restrictions.

My code deviates a bit from the original approach developed by Juselius and Johansen. For the restrictions, I use the framework described by Doornik and Boswijk which is unifying and therefore requires fewer special cases.

I've also some simple support for the boostrap method recently developed by Rahbek et al. In contrast to what is typically done, I've left out all the tables of the non-standard distributions in favor of having a general procedure for simulating the p values. Computers have become quite a bit faster since Osterwald‐Lenum wrote his best seller in 1992.

I've mainly been focusing on theoretical and implementaional aspects of the model and less on the usability for practical cointegration analysis so the code might be lacking on that point.

tomaskrehlik commented 8 years ago

That would be great, I am no expert on the theoretical issues here and even less versed in the current literature of the cointegrated models. As I use those models frequently, I am willing to commit some time to making some reasonable implementation of VAR and VECM that would find some balance between speed and capabilities. I wrote the VAR for one project, because vars from R were painfully slow and many things could not be shut down. Should we maybe make some roadmap? Probably starting with type structure to which we might bend our code.

andreasnoack commented 8 years ago

Sure. Let's try and see if we can figure something out.