[R-sig-finance] VAR, VECM, Kalman,
... non-R software recommendations?
Jeffrey Todd Lins
jtl at saxobank.com
Fri Aug 20 20:20:05 CEST 2004
Hi Dirk,
Yes, in stats there is a set of Kalman filter routines and you can use optim for likelihood estimation.
I have used it for some state space modeling. There is a chapter in Zivot and Wang's book on the topic as well.
In addition initializing in the KF may be an important consideration - see Harvey and/or Durbin and Koopman.
I have never really used DSE for VAR, ended up writing the code elsewhere, outside of R, but you could look at gretl,
which is available under GNU GPL and written in C, it contains quite a few bits and pieces, I am assuming you can get the source.
Jeff
-----Original Message-----
From: r-sig-finance-bounces at stat.math.ethz.ch
[mailto:r-sig-finance-bounces at stat.math.ethz.ch]On Behalf Of Pijus
Virketis
Sent: Friday, August 20, 2004 7:37 PM
To: Dirk Eddelbuettel
Cc: R-sig-finance at stat.math.ethz.ch
Subject: RE: [R-sig-finance] VAR, VECM, Kalman,... non-R software
recommendations?
Dear Dirk,
As far as my personal experience goes, I needed to estimate such models
some time ago, when the R toolkit for this sort of thing was still
almost empty, so I chose to invest in STATA: it provides a fairly
complete set of functions to estimate VAR, SVAR and (as of two months
ago) VECM models, validate their results and stability, and calculate
all the frequently-needed derivatives, such as the MA forms (i.e. IRFs,
SIRFs, ...), etc. For what it's worth, I chose STATA over many other
contenders in the field because it seemed to have some of those R-like
pro-active qualities, like frequent updates, knowledgeable and involved
users, and accessible developers (to which I can personally attest after
running into a couple of bugs in the early SVAR code). The R-STATA
intercommunication is made possible by the foreign package, batch modes,
and good old ASCII. ;) STATA programming is a bit laborious, so I always
only farm out the absolute minimum to it, and do the remainder in R. As
you said, STATA let me "hit the ground running", and is really not a bad
compromise.
Of course, today R's own arsenal for time-series econometrics is shaping
up fast as well. Most significantly, there is now the CRAN urca package
by Bernhard Pfaff: it provides the means to estimate VECM models (both
the transitory and long-term flavours) and Johansen's co-integration
tests built on top them. Sadly, VAR/SVAR and associated battery of
helper functions are still not available, as far as I am aware.
As for the Kalman filter, there is the Kalman... family of functions in
stats: perhaps that's a good place to start? Sadly, I have not yet had a
chance to use space-state models in a proper project, so my knowledge of
the available tools and their relative capabilities is modest. Also, if
you can get to it, R. Carmona's neat book "Statistical Analysis of
Financial Series in S-Plus" (Springer, 2004) has a few sections
(6.2-6.7) on state-space models and Kalman filtering thereof (S code
included), with applications to finance.
Cheers,
Pijus
> -----Original Message-----
> From: r-sig-finance-bounces at stat.math.ethz.ch
> [mailto:r-sig-finance-bounces at stat.math.ethz.ch] On Behalf Of
> Dirk Eddelbuettel
> Sent: Friday, August 20, 2004 12:49 PM
> To: R-sig-finance at stat.math.ethz.ch
> Subject: [R-sig-finance] VAR, VECM, Kalman,... non-R software
> recommendations?
>
>
> I've been asked to run some 'modern' regressions: vector
> autoregression,
> vector error correction, kalman filter, ...
>
> Of course, I'd love to do that in R and will probably end up
> writing some
> code for it, but as the platitude goes, I 'need to hit the
> ground running'.
> Last time I looked at Paul Gilbert's dse bundle, it promised
> most of this,
> but felt somewhat cumbersome.
>
> Does anybody here have any particular recommendations, and in
> particular,
> warnings about software like EViews, Rats, ... in this context ?
>
> Thanks in advance, Dirk
>
> --
> Those are my principles, and if you don't like them... well,
> I have others.
> -- Groucho Marx
>
> _______________________________________________
> R-sig-finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>
>
_______________________________________________
R-sig-finance at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
This email may contain confidential and/or privileged inform...{{dropped}}
More information about the R-sig-finance
mailing list