Parts I and II of the series Chaos in Technical Analysis and Backtesting discussed some of the problems that arise in the context of technical analysis and backtesting when using split and dividend adjusted data. In this post I discuss the effect of split-adjusted stock data on backtesting results. Although experienced trading system developers are aware of the issues that arise from the use of split-adjusted data, it appears that many, especially novice system developers quite often are not.
In the part I I demonstrated how the process of adjusting for dividends often results in a non-linear distortion of the price series backwards in time and thus one may arrive at wrong conclusions when using technical analysis and trying to identify chart patterns.
The trading systems to backtest are simple and used solely for the illustration of the effects of the adjustments on backtesting results. They are long-only systems that signal a position at the next open. Two different types of stops are applied to study the effects of split-adjusted data on the backtest results; (a) a 10% percent profit target and stop-loss based on entry price and (b) 2 points for the profit target and 2 points for stop-loss both based on the entry price. Again, these exits are used only for illustration of the effects of adjusted data on backtesting results.
Actual data (no adjustments)
Below is the chart of the stock for the test period before the first split took place:
The discontinuity after the vertical blue mark shows the effect of the first split. The analysis will not include data after the split as it took place after the end of the backtesting period.
Split-adjusted data
Below is the chart of the stock for the test period that accounts for all three splits:
Backtesting results
In all backtests the position size is 100 shares. No commissions or slippage are included because the purpose of this analysis is to demonstrate split-adjustment affects.
Case 1: Long entry: Close < High of yesterday, Profit-target and stop-loss equal to 10%.
Metric | No Data Adjustments | Split-adjusted Data |
Win rate | 63.16% | 63.16% |
Trades | 36 | 36 |
Profit factor | 1.51 | 1.52 |
Sharpe ratio | 2.05 | 2.07 |
Payoff ratio | 0.88 | 0.89 |
Avg. trade | $104.42 | $8.92 |
Avg. Bars | 5.89 | 5.89 |
As expected, when percent exits are used, all metrics considered retain their values except those that reflect dollar amounts. In this latter case, identical values can be obtained if position size is adjusted accordingly based on the number of forward splits. For example, if a stock had only a 2:1 split, all positions before the split must be doubled so that backtests based on adjusted data reflect how the system would have performed in reality. However, most studies seen in the literature ignore this while presenting equity curves based on split-adjusted data that basically make no sense and returns obtained from them, like the CAR, and even percent drawdown levels, may be misleading.
Case 2: Long entry: Close < High of yesterday and Open > Close, Profit-target = stop-loss = two points.
This example demonstrates what happens if exits based on points or dollar values are not scaled properly when using split-adjusted data:
Metric | No Data Adjustments | Split-adjusted Data |
Win rate | 53.49% | 100% |
Trades | 43 | 3 |
Profit factor | 1.15 | N/A |
Sharpe ratio | 2.08 | 2.19 |
Payoff ratio | 1.00 | N/A |
Avg. trade | $14.30 | $151.66 |
Avg. Bars | 2.74 | 79.67 |
In the case of split-adjusted data, the large in comparison to adjusted prices profit target and stop loss of two points transforms a short-term trading system into a trend-following one as it may be seen from the difference in number of trades and average bars in trades. This is a trivial result that nevertheless demonstrates that point stops, stops based on dollar values and specific price exit levels are not suitable for use with split-adjusted data. However, some trading system developers, especially those who use programs that design trading system automatically, are usually unaware of the issues and their implications. Ignorance of the effects of adjusted data on backtest results can cost much more than ignorance about the operation of the markets and proper risk and money management techniques.
The next and final post about data adjustments and their effects on backtesting will be about futures data.
Disclosure: no relevant position at the time of this post and no plans to initiate any positions within the next 72 hours..
Charting program: Amibroker (Charts created with AmiBroker – advanced charting and technical analysis software. http://www.amibroker.com/”)