To date on QuantStart we have considered two major quantitative backtesting and live trading engines. The first arised from the Event-Drive Backtesting series I wrote back in March 2014. The second is QSForex, an open-source backtest and live trading engine that hooks into the OANDA Forex Broker API, which is still being used by many of you.
I've had a lot of requests recently for a more "updated" version of the event-driven backtesting series and/or a "QSForex" that works on other asset classes. The most common request is that it should play extremely well with Interactive Brokers. Now that we're coming up to 2016, I've also been thinking about updating my own trading infrastructure design.
For these reasons I've decided to write a new article series on how to design and construct and end-to-end infrastructure for a full portfolio and order management system, including a backtesting/research environment, remote server deployment capabilities and algorithmic execution. Eventually I would like this to be cross-asset capable, but it is generally preferable to start with a single asset class in order to minimise excessive configuration capability.
I'm going to start with US equities/ETFs traded with Interactive Brokers, on a daily frequency, as this is often the most popular request.
In particular, the outcome of the series will lead to my new personal/QuantStart trading infrastructure as well, so I will have a lot of personal interest in making sure it is robust, reliable and highly efficient! I'll document the process in an "end-to-end" fashion so that you should be able to fully replicate my results in completeness.
Note that any future posts on the site that discuss trading strategy performance will make use of this library, allowing you to fully replicate the results as long as you use a) the exact same processed data as I and b) an identical set of random seeds to any stochastic models that are used within the code. I will of course outline how to make sure these two criteria are fullfilled!
Once again, I'll be making the software available under an open-source MIT-style license on GitHub, along with all of the scripts and configuration files. This should allow you to either design your own system using mine as a template, or get started on strategy development knowing that you'll have a robust library doing the "heavy lifting" for you.
This design will be equivalent to what I would write were I still employed at a small quant fund. Thus, I consider the end goal of this project to be a fully open-source, but institutional grade, production-ready portfolio and order management system, with risk management layers across positions, portfolios and the infrastructure as a whole.
It will be end-to-end automated, meaning that minimal human intervention is necessary for the system to trade once it is set "live". It is impossible to completely eliminate human intervention, especially when it comes to input data quality, such as with erroneous ticks, but it is certainly possible to have the system running in an automated fashion most of the time.
The trading system will mirror the infrastructure that might be found in a small quant fund or family office quant arm. It will be highly modular and loosely coupled. The main components are the data store (securities master), signal generator, portfolio/order management system, risk layer and brokerage interface.
We have already outlined in previous articles how these systems tend to fit together, but the following is a list of "institutional grade" components that we wish to build the system around:
Perhaps the crucial difference between this system and most "retail" algo trading systems is that high availability, redundancy, monitoring, reporting, accounting, data quality and robust risk management will be given "first class citizen" status within the system. Creating the system in this manner will allow us to have a significant degree of confidence in our automation, allowing us to (eventually) concentrate on optimising signal generation and portfolio management.
The following concepts, the majority of which are taken from the field of professional software engineering, will provide the basis of the design:
The first task will be to discuss the software stack and tools we will use to build our trading system. This will include our hosting provider, version control and continuous deployment systems, our monitoring tools and our data storage mechanisms (including backup and restore), as well as our choice of brokerage and interface.
In the next article I will outline all of the vendors that I feel are up to the task, as well as a reasonable estimate of costs. We will then proceed to actually flesh out this infrastructure in a detailed manner.comments powered by Disqus
You'll get instant access to a free 10-part email course packed with hints and tips to help you get started in quantitative trading!
Every week I'll send you a wrap of all activity on QuantStart so you'll never miss a post again.
Real, actionable quant trading tips with no nonsense.