This e-learning workshop provides a firm grounding in backtesting principles and techniques. Backtesting is the process of feeding historical data to an automated trading strategy to see how it would have performed. We will study various common backtest performance metrics. Backtest performance can easily be made unrealistic and un-predictive of future returns due to a long list of pitfalls, which will be examined in this course. The choice of a software platform for backtesting is also important, and criteria for this choice will be discussed. Illustrative examples are drawn from a futures strategy and a stock portfolio trading strategy.
Our e-learning workshop is designed to give you everything you need to know to get started and includes:
- Online course module (7 hours)
- MATLAB software (1 month) with MATLAB tutorial (3 hours) and sample data
- Direct access to the trainer for assistance
Overview of Backtesting
- What is backtesting and how does it differ from “simulations”?
- The importance of backtesting: Why is backtesting a necessary step?
- The limitations of backtesting: Why is backtesting not a sufficient step to ensure profitability?
- What we can do to increase the predictive power of our backtest results
- How to identify good/bad strategies even before a backtest
Choosing a backtest platform
- Criteria for choosing a suitable backtest platform
- A list of backtesting platforms
- Discussion of pros and cons of each platform
- Special note: integrated backtesting and automated execution platforms
- Why do we choose MATLAB?
- Survey of syntax
- Advantage of array processing
- Exercises: building utility functions useful for backtesting
- Using toolboxes
Exercise: Backtesting a single-instrument strategy
- A Bollinger Band strategy for E-mini S&P500 futures as a prototype mean-reversion strategy
- The equity curve
- Excess returns and the importance of the Sharpe ratio
- Tail risks and maximum drawdown and drawdown duration
- The importance of transaction costs estimates
Choosing a historical database
- Criteria for choosing a good historical database
- Equities data: split/dividend adjustments, survivorship bias
- Futures data: constructing continuous contracts, settlement vs closing prices
- Issues with synchronicity of data
- Issues with intraday/tick data
Backtesting a portfolio strategy
- Exercise: A long-short portfolio strategy of stocks in the S&P 500
- Relevance of strategy to 2007 quant funds meltdown
- The importance of universe selection: impact of market cap, liquidity, and transactions costs
- Strategy refinement: how small changes can make big differences in performance
Detection and elimination of backtesting pitfalls and bias
- How to detect look-ahead bias?
- How to avoid look-ahead bias?
- Data snooping bias: why out-of-sample testing is not a panacea
- Parameterless trading
- The use of linear models or “averaging-in”: pros and cons
- Exercise: linearization of the ES Bollinger band strategy
- Impact of noisy data on different types of strategies
- Impact of historical or current short-sale constraint
- The unavoidable limitation of backtesting: Regime change
- What to do when live performance is below expectations?
Frequently Asked Questions
WHAT IS THE TIMELINE FOR THE COURSE?
This course is pre-recorded and available indefinitely for viewing on Adobe Connect.
HOW LONG SHOULD IT TAKE ME TO COMPLETE THE COURSE?
We provide indefinite access to the online material to give students a chance to take things at their own pace, but we expect most people to take no longer than a week to complete the course.
WHAT KIND OF MATLAB ASSISTANCE AM I PROVIDED WITH?
There is a MATLAB tutorial included in the workshop. If you have used MATLAB before, you should find it quite easy to complete the exercises, which do not require extensive programming. No prior knowledge of MATLAB is in fact necessary, although some general experience in programming using other simple languages would be useful.
WHEN WILL MY MATLAB LICENCE BEGIN?
You are advised to go through the online material first, then let us know when you are ready to start the course in conjunction with the MATLAB exercises, at which point we will request that your MATLAB licence begin. Please bear in mind it may take a couple of days to set you up with MATLAB.
IS THE COURSE STILL USEFUL IF I HAVE NO INTENTION OF USING MATLAB?
Yes, the main aim of the course is to communicate the principles of backtesting. Furthermore, MATLAB programming code can be adapted fairly easily into ‘R’, an open-source alternative.
WHAT DOES THE ONLINE COURSE MATERIAL COMPRISE?
The online course material is made up of two modules. The first module is the main course and consists of slides with the trainer’s narration. The second module consists of a tutorial covering the essentials of MATLAB programming.
WILL I BE ABLE TO ASK QUESTIONS AS I GO ALONG?
Unlimited Q&A will be conducted on the course Slack channel.