Greatest Programming Language for Trading Systems?
Currently, I’m taking care of Learning Machine’s submission for Max Dama’s QuantCup. That involves optimising a “price-time priority limit order matching engine”. More simply, it means ‘making a system which matches buy and sell orders placed really fast’. *
As per the competition rules, I’m programming our entry in the C programming language. But when it comes to our own system, I’m probably going to write it in different things.
Why? I want a vocabulary which balances ease of development with speedy end results. Even though compiled C is very quickly, it isn’t an object-oriented (‘OO’) language, which means it may be harder to represent the ideas I’m coding about in such a way which seems natural to humans.
The four most in-demand OO languages out there will be C++, C#, Java and Python, and in them, I’m quite happily able to apply pretty much anything within the capacity of my intelligence (we’re screwed - ed). Therefore which one did I pick? Machine learning tecnologies
Python Straight off the bat, I knew Python was unsuitable. Even though the language make it easy to pump out code at a ridiculous pace, it is terrifically slow (unless you write a library in C - but then that’s C, certainly not Python). That particularly holds true for large scale projects.
Another consideration was the OO syntax in the language: I just don’t like it. It’s always believed tacked-on and feeble. Python is primarily a server scripting language, I guess.
Having said that, Python is my language of preference for scraping data from the web and for simple unit testing, so I may well come back to it later for a distinct purpose.
Java was another candidate that was quickly crossed off our list. Why? Because so far as I know, Java doesn’t let external functions to be known as without piping a cord into a program(if I’m wrong about this, let us know via the reviews below! ) [Turns out I was indeed wrong, see http://java.sun.com/docs/books/jni/html/jniTOC.html]. Another concern is the existence of C#. Pretty much the same language, but with a superset of Java’s features (i. e. will everything Java does, and more). And it has better handling of datetime type (important! ).
From the four languages listed here, I’m least comfortable in C++. I thus figured that Learning Machine would be a great way to extend my knowledge of the language.
At first, C++ seemed best: solid OO implementation, a fast, compiled language, the ability to produce Assembly language and C straight into a program, and superb IDEs (I’m a fan of Visual Studio - university students can easily download it free through Microsoft’s DreamSpark program). C++ was so perfect, actually that I started programming on it right away.
However , the moment I got the basic class composition down pat, it strike me: the compiler. Spending thirty minutes debugging a simple mistake such as missing a type solid is not an efficient by using my time, particularly when trying to do university study alongside programming for Learning Equipment.
C# (C Sharp)
On the four languages considered, a person was left: C#. An almost perfect language, it has all of the advantages of C++ (bar it is speed) and offers a huge standard library, with even more your local library available on the internet. It even lets you call external functions, and use pointers - features which place it in a category above Java. Not only that, nevertheless Microsoft seem to focus their very own documentation heavily on the language and their IDE, which smooths the ride somewhat.
Have I missed anything? Should I have included OCaml? Purpose C? Erlang? Let us know inside the comments! (I’m seriously taking into consideration writing some external capabilities in OCaml…)
* This kind of matching task would normally be done within the exchange alone, but for speed reasons it is also done within a large number of high frequency trading firms to allow them to see the most up to date version on the order book and produce orders accordingly.
To read more about university go to this web page