[R-SIG-Finance] kdb and q?

Dirk Eddelbuettel edd at debian.org
Sat Jun 19 19:54:58 CEST 2010

Hi Ajay,

On 19 June 2010 at 22:38, Ajay Shah wrote:
| I wonder what the R community thinks about kdb and the q language.

I'm in favour, but see below.

| A person from Morgan Stanley says that R is just great as a PL but for

That would be APL, which they reinvented as aplus which you get for free in
Debian and Ubuntu these days as they 'freed it' a few years ago:

edd at ron:~$ apt-cache search aplus
aplus-fsf-dev - A+ programming language development environment
aplus-fsf-doc - A+ programming language documentation
aplus-fsf-el - XEmacs lisp for A+ development
aplus-fsf - A+ programming language run-time environment
edd at ron:~$

| the performance issues faced in finance with intra-day data and
| real-time analysis, R is not able to keep up and they are doing a lot
| of things with kdb and q.

Right. No single language is best for all tools.  So you mix and match, which
is precisely what a lot of investment firms do in-house.

At work, we looked at kdb/q and I even patched their (then more basic then
now) R bindings provided via the (nice) wiki they host; see my blog for that
patch.  Kdb gives you a free-as-in-beer version for 32bit OS which times out
after two hours.  Great for experimenting as you get a feel for the product.

We ended up going with a competing product we liked better -- OneTick.  For
that backend, I wrote a (if I dare say so) rather nice internal R package
using their C++ API and the Rcpp package for R/C++ integration.  Now I get
the best of all three worlds: a blazing fast backend/tick store with its own
language for querying, an interface to R permitting the usual broad range of
analysis as well as direct C++ access to other parts of production.

  Regards, Dirk

More information about the R-SIG-Finance mailing list