3.2 Backtesting Biases
4.1.6 Integrated Development Environments
The term IDE has multiple meanings within algorithmic trading. Software developers use it to mean a GUI that allows programming with syntax highlighting, file browsing, debugging and code execution features. Algorithmic traders use it to mean a fully-integrated backtesting/trading environment, including historical or real-time data download, charting, statistical evaluation and
25
live execution. For our purposes, I use the term to mean any environment (often GUI-based) that is not a general purpose programming language, such as C++ or Python. MATLAB is considered an IDE, for instance.
Excel
While some purer quants may look down on Excel, I have found it to be extremely useful for "sanity checking" of results. The fact that all of the data is directly available, rather than hidden behind objects, makes it straightforward to implement very basic signal/filter strategies. Brokerages, such as Interactive Brokers, also allow DDE plugins that allow Excel to receive real-time market data and execute trading orders.
Despite the ease of use, Excel is extremely slow for any reasonable scale of data or level of numerical computation. I only use it to error-check when developing against other strategies and to make sure I’ve avoided look-ahead bias, which is easy to see in Excel due to the spreadsheet nature of the software.
If you are uncomfortable with programming languages and are carrying out an interday strategy, then Excel may be the perfect choice.
Commercial/Retail Backtesting Software
The market for retail charting, "technical analysis" and backtesting software is extremely com- petitive. Features offersd by such software include real-time charting of prices, a wealth of technical indicators, customised backtesting langauges and automated execution.
Some vendors provide an all-in-one solution, such as TradeStation. TradeStation are an online brokerage who produce trading software (also known as TradeStation) that provides electronic order execution across multiple asset classes. I don’t currently believe that they offer a direct API for automated execution, rather orders must be placed through the software. This is in con- trast to Interactive Brokers, who have a more stripped down charting/trading interface (Trader WorkStation), but offer both their proprietary real-time market/order execution APIs and a FIX interface.
Another extremely popular platform is MetaTrader, which is used in foreign exchange trading for creating ’Expert Advisors’. These are custom scripts written in a proprietary language that can be used for automated trading. I haven’t had much experience with either TradeStation or MetaTrader so I won’t spend too much time discussing their merits.
Such tools are useful if you are not comfortable with in depth software development and wish a lot of the details to be taken care of. However, with such systems a lot of flexibility is sacrificed and you are often tied to a single brokerage.
Web-Based Tools
The two current popular web-based backtesting systems are Quantopian (https://www.quantopian.com/) and QuantConnect (https://www.quantconnect.com/). The former makes use of Python (and
ZipLine, see below) while the latter utilises C#. Both provide a wealth of historical data. Quan- topian currently supports live trading with Interactive Brokers, while QuantConnect is working towards live trading.
Open Source Backtesting Software
In addition to the commercial offerings, there are open source alternatives for backtesting soft- ware.
Algo-Trader is a Swiss-based firm that offer both an open-source and a commercial license for their system. From what I can gather the offering seems quite mature and they have many institutional clients. The system allows full historical backtesting and complex event processing and they tie into Interactive Brokers. The Enterprise edition offers substantially more high performance features.
Marketcetera provide a backtesting system that can tie into many other languages, such as Python and R, in order to leverage code that you might have already written. The ’Strategy
Studio’ provides the ability to write backtesting code as well as optimised execution algorithms and subsequently transition from a historical backtest to live paper trading.
ZipLine is the Python library that powers the Quantopian service mentioned above. It is a fully event-driven backtest environment and currently supports US equities on a minutely-bar basis. I haven’t made extensive use of ZipLine, but I know others who feel it is a good tool. There are still many areas left to improve, but the team are constantly working on the project so it is very actively maintained.
There are also some Github/Google Code hosted projects that you may wish to look into. I have not spent any great deal of time investigating them. Such projects include OpenQuant (http://code.google.com/p/openquant/), TradeLink (https://code.google.com/p/tradelink/) and PyAlgoTrade (http://gbeced.github.io/pyalgotrade/).
Institutional Backtesting Software
Institutional-grade backtesting systems, such as Deltix and QuantHouse, are not often utilised by retail algorithmic traders. The software licenses are generally well outside the budget for infrastructure. That being said, such software is widely used by quant funds, proprietary trading houses, family offices and the like.
The benefits of such systems are clear. They provide an all-in-one solution for data collec- tion, strategy development, historical backtesting and live execution across single instruments or portfolios, up to the ultra-high frequency level. Such platforms have had extensive testing and plenty of "in the field" usage and so are considered robust.
The systems are event-driven and as such the backtesting environment can often simulate the live environment well. The systems also support optimised execution algorithms, which attempt to minimise transaction costs.
I have to admit that I have not had much experience of Deltix or QuantHouse beyond some cursory overviews. That being said, the budget alone puts them out of reach of most retail traders, so I won’t dwell on these systems.