• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

Q Equational Programming Language

Hey guys,

I've been talking with some person I know that works at a major bank in London. He's been talking to me about Q which is a programming language I've never heard of before.

Any of you guys had any experience using Q ?


Older and Wiser
that's the KDB language. K, J, Q are all sibblings out of Arthur Whitney's mind. He is very bright computer scientist. KDB is lightning fast for what's supposed to do but when you look at the code, IMHO, it's horrendous!!! however, after you get the hang of it you might like it (I don't).

The ancestor of all this alphabet soup is APL. There has been massive criticism of APL. Dijkstra (of the Dijkstra algorithm) said:

APL is a mistake, carried through to perfection. It is the language of the future for the programming techniques of the past: it creates a new generation of coding bums.
I work with the language on a regular basis. Alain is right, the coding style is very terse and can be disconcerting to the un-initiated. Once you get a hang of it though, it's enjoyable. Excellent choice in case you plan to work with large volumes of tick data/ other time series analytics stuff. There is a very supportive user group as well , over-seen at large by the makers of kdb themselves. Very little documentation available otherwise though.

Eugene Krel


excellent for what it does, super expensive.

we use it at work for market data processing and generating analytics.
Yes, this person with whom I've been in contact works on high frequency trading. I've read the information the site, apparently this language is perfect for handling time series data and such, hence, the utilisation in HFT.
Q language

Has anyone used Q (Q - Equational Programming Language) for financial analytics? I wanted to know what are the language has to offer in terms of analyzing time series data. Is it better than python or R and why? Could someone please highlight some of its features?



---------- Post added at 07:49 PM ---------- Previous post was at 05:55 PM ----------

It looks like the language used with KDB+ is a derivative of Q called K. The language specification and features in Q - Equational Programming Language are completely different from https://code.kx.com/trac/wiki/Tutorials. I think they are two different languages.. Q - Equational Programming Language describes Q as a language of expressions and equations.. whereas code.kx.com describes it in terms of tables and dictionaries...

I dont think they are related at all..
you might check out the book "Term-Rewriting Programming Languages: Mathematica, Clean, Maude System, Refal, Pure, Q, Stratego|xt, Asf+sdf Meta Environment" at Amazon. I remember Arthur Whitney. he and i once met at an APL conference in Toronto and on the flight back to the States, we sat next to one another, doing speed test comparisions on a mac laptops, of his then, new language K (as in 'Key to the Kingdom' according to Arthur) and Mathematica. Arthur developed A+ for Morgan Stanley, wad involved in the initial development of J (a functional programming variant of APL, using ASCII characters). one heck of great computer language developer.