The Wrecking Crew have in their various roles been playing with financial software for rather a lot of man years. But curiously none of them has ever evaluated a backtesting and trading platform that uses Python for coding trading models. Numerous proprietary scripting/macro languages, C#, C/C++, VB, VBA, Pascal (one of our older members), Cobol (a liar/fantasist) - yes. Python - no.
That alone was a pretty good initial excuse for taking a look at Quantopian, but the fact that it is cloud-based was an additional attraction. Cloud computing is one of those areas where the Wrecking Crew's various little intellectual differences turn decidedly sectarian. Opinions are (to put it mildly) somewhat polarised, so for the very few of us with no particular axe to grind, the prospect of witnessing a major dust up was undeniably appealing.
The basic premise of Quantopian is that users can (at no charge) write, back test and ultimately trade their models via a web browser. The open source platform that Quantopian has built to enable all this is called Zipline and is written in Python, as well as using Python for the coding of trading models. This simplifies the platform's access to other permitted Python modules, of which there are currently 21 (other than Zipline itself).
Access to these standard Python modules adds a considerable depth of functionality to Quantopian across a broad spectrum.
Among others, this includes:
• High performance looping (itertools)
• Array processing (numpy)
• Data structures (pandas)
• Sorting (heapq)
• Maths, statistical, scientific and engineering (math, cmath, statsmodels, scipy)
• Time and time zones (datetime, pytz)
• Machine learning (sklearn)
For the stat arb fraternity, the only significant omission we spotted was an econometrics module that included tests for properties such as cointegration. While the Augmented Dickey-Fuller test is available in the statsmodels module, it only appears to use an implementation with critical value tables suitable for observed as opposed to estimated time series (see http://www.automatedtrader.net/articles/software-review/142233/cointegration-assume-nothing--check-everything for more on this). Someone has made a start on coding the Johansen framework over on GitHub following the implementation of LeSage's Spatial Econometrics toolbox for MATLAB and this is intended for inclusion in a future release statsmodels. However, the last update to the code appears to have been ten months ago, so to avoid further delay Quantopian are considering incorporating the necessary code directly rather than waiting for it to appear in statsmodels.
Although Python is more demanding to use than some of simpler proprietary scripting languages out there, it's unlikely to present much of a hurdle to most traders with a bit of determination. Quantopian does a nice job of streamlining this further, so it's possible to implement a simple long/short momentum model (which is the basic sample trading algorithm provided on the platform) with a grand total of two functions and twelve brief lines of code.