Free email newsletter with articles on systematic trading







Adaptrade Software Newsletter Article


Short-Term Profit-Based Strategies

by Michael R. Bryant



The E-mini S&P 500 futures is one of the most popular day-trading markets in the world. Many traders are no doubt drawn to its strong intraday volatility combined with its high liquidity, point value ($50 per full-size point), and relatively low margin requirements. Looking at a five minute chart of the ES, it's tempting to think "I should be able to take at least a few points of profit per day from this market." Turning that aspiration into reality is another matter. In this article, I'll explore some of the issues involved in developing a short-term, profit-based strategy for the E-mini market and consider how reasonable it is to try to extract small, consistent profits from the ES.


A High-Accuracy Profit-Target Strategy

It's not difficult to create a strategy for the E-mini S&P 500 futures (ES) that exits at a small profit of a few points and has a high percentage of winning trades -- I'll illustrate this in a moment. However, to achieve this, it's generally necessary to let the trades run, which is what gives the strategy time to hit the profit target. The downside is that a percentage of trades will run for far longer than we'd like, which creates a distorted risk profile.


Consider the equity curve shown below in Fig. 1. This curve represents a strategy for the ES with a perfect winning percentage: not a single losing trade. Is there a catch? Sort of. First, though, let's look at what the strategy is and where it came from. I created it in Adaptrade Builder based on the primary objective of entering on a limit order and exiting at a fixed-size target (limit order). I let the program find the conditions for trade entry and the limit price for entry. I gave it a range of target sizes of between $12.50 (1 tick in the ES) and $250 (5 points). Here are some of the other parameters used in the build process:


3 minute bars
Total range of data: 8/15/2012 - 8/15/2014

Three segments:
Build Segment: 8/15/2012 - 12/17/2013
Out-of-Sample: 12/18/2013 - 4/18/2014
Validation: 4/19/2014 - 8/15/2014

$5 per round-turn for trading costs
1 contract per trade


Equity curve, high-accuracy strategy

Figure 1. Closed-trade equity curve for the high-accuracy profit target-based strategy for the ES.


The goal was to enter low (on a long trade) and exit at a small, fixed profit. I used the option to only consider that limit orders were filled if the limit price was exceeded, rather than just touched, to provide more realistic and conservative simulated trade fills. Only $5 was deducted for costs because there is no slippage due to the fact that both entries and exits are via limit orders. In addition to the build and out-of-sample (OOS) periods, which are built-in to Builder, I used the date controls in the program to set aside a third segment the same size as the OOS period to provide after-the-fact validation.


A population size of 500 was used with 20 generations. The only order types "included" in the strategies were the "Enter at Limit" and "Exit at Target ($)" types; all other order types were left as "consider". Both long and short trades were allowed with separate logic for each side. Most of the other settings in the program were left at the defaults. The solution started to converge after about 16 generations.


Not only does this strategy have no losses over more than 650 trades in a two year period, but it held up in both out-of-sample testing and in the validation segment. In fact, the performance is the same in the validation segment as in the build segment.


So what's the catch? Consider the following performance metrics:


Net Profit: $29,228
Drawdown: $6163
Max MAE: $6138


The equity curve in Fig. 1 is a closed-trade equity curve. It doesn't reveal the equity changes bar-to-bar during trades. However, both the drawdown and the maximum adverse excursion (MAE) reveal a problem in this regard. The drawdown measures the maximum decline in equity on an intra-bar basis; that is, it takes into account the high and low of each bar. The MAE is the drawdown within the trade; i.e., it's the largest open loss on an intra-bar basis. The maximum MAE ("Max MAE") is the largest MAE over all trades.


Despite the straight equity curve, lack of losses, and frequent, small trades, the maximum drawdown is more than $6000. Along the same lines, the fact that the Max MAE is more than $6000 implies that at least one trade had an open loss of more than $6000 before hitting the profit target. How big was the profit target? $37.50. That means you would have been sitting through an open loss of more than $6000 while waiting to earn an eventual profit of less than $38. This particular strategy didn't have a protective stop, but you could easily add one without changing the results, provided it was larger than $6138. That implies you would have been risking $6138 on each trade to make $38 -- a rather lopsided risk/reward profile.


To understand why this strategy has such a large maximum drawdown and such large open losses, it's helpful to look at the trade length in bars for each trade. Fig. 2 shows the distribution of the number of bars in trades. While most (62% of) trades last 10 bars or less, some trades remain open for more than 5000 bars. As I mentioned above, it's the fact that the strategy lets these trades remain open that enables them to eventually hit the price target, resulting in the perfect win rate. However, this also results in large open losses and drawdowns while the trades remain open.


Distribution of trade length in bars.

Figure 2. Distribution of the trade lengths in bars for the high-accuracy ES strategy. The horizontal axis is the category of trade lengths in bars; e.g., 10 represents trade lengths of 1 to 10 bars. The vertical axis is the number of trades in each bar-length category.


It might seem that we could just terminate the longer-running trades earlier, reducing the overall risk at the expense of having some losses. However, this doesn't work for two reasons. First, if you exit trades early -- say, based on the number of bars since entry -- you end up with some large losses that wipe out the majority of the profits from the small, profitable trades. Secondly, once a trade is exited early, the entry conditions start to apply again, which means you end up with many more trades, many of which are not profitable. Basically, trying to fix such a strategy only makes it worse.


I should note that despite the unwieldy risk-reward profile, the original strategy may in fact be tradable if someone had the intestinal fortitude and patience to tolerate the occasional long holding periods and large open losses. The fact that it held up on data not used at all during the build process -- validation segment -- makes me think the basic premise is at least statistically sound, if not suitable for most traders. In practice, I suspect the vast majority of traders would abandon the strategy after the first loss, which would, after all, wipe out the profit from the preceding 139 trades (based on the average trade profit/loss of $44).


A More Reasonable Approach

So what's the alternative? Rather than trying to fix the preceding strategy after-the-fact, a better approach is to start from scratch by specifically addressing the deficiencies in the prior strategy. The basic approach is to build the strategies based on conditions that target the performance metrics that were not acceptable in the prior strategy. Consider the build metrics shown below in Fig. 3.


Build metrics for building a profit-based ES strategy.

Figure 3. Build objectives and conditions used to build the revised profit-based ES strategy. Not shown in the bottom table ("Conditions for Selecting Top Strategies"): Prof Fact >= 1.5 (All Segs).


The build objectives (top group in Fig. 3) are the performance metrics that we want to minimize or maximize. These are kept fairly simple and include maximizing the net profit and Kelly fraction while minimizing the complexity. The Kelly f value was included because strategies that have a high Kelly fraction tend to scale well when position sizing is applied. I used a weight value of 0.5 for this so that it wouldn't bias the results toward high Kelly fractions over high net profit. The complexity was included with a relatively small weight so that, all other things being equal, simpler strategies would tend to rank higher.


The more critical metrics are provided as conditions (middle and bottom groups in Fig. 3). The conditions for the correlation coefficient, significance, and profit factor are general-purpose build conditions that help ensure high quality strategies. As discussed above, the problems with the prior strategy can be described in terms of its high Max MAE value and the fact that the trades are allowed to run for a large number of bars. Accordingly, the key metrics in the conditions are the Max MAE and the "Ave Bars Loss", which is the average number of bars in losing trades. Reasonable goals for these metrics were chosen based on prior build results.


The bottom group in Fig. 3 consists of the same sorts of conditions or requirements as in the middle group. However, the "Conditions for Selecting Top Strategies" are applied differently. Whereas the "Build Conditions" (middle group) are used to rank the fitness of population members during the build process, the conditions in the bottom group are applied after each generation to select strategies that meet the specified conditions. The strategies that meet all the conditions in the bottom group after each generation are added to a separate population of strategies called "Top Strategies."


The Top Strategies population is intended to be a repository for the small number of strategies that meet all the requirements that define what you want. If the conditions are chosen correctly, only a handful of strategies will end up in the Top Strategies tables. The metrics shown in Fig. 3 for this group include strict requirements for the Max MAE as well as for the number of bars in both wins and losses. Notice that the maximum drawdown requirement is about half of what was achieved from the prior strategy and that the requirement for the Max MAE is less than a quarter of what was found for that strategy.


Sometimes, metrics are related to one another. In this example, there's a requirement for the net profit and another one for the average trade. Taken together, those two conditions imply a requirement for the average number of trades. In particular, $25,000 net profit divided by $40 per trade implies 625 trades. In this case, then, it would have been counter-productive, and perhaps contradictory, to have added a separate requirement for the number of trades.


The other build settings were the same as before except that the population size was increased to 1000 with 40 generations. The overall approach was to let the program run until it found strategies meeting the Top Strategies requirements. To do this, I used the option to "Rebuild after 40 generations if the OOS net profit was less than 100,000". Since it was highly unlikely that the OOS net profit would ever exceed $100,000, this guaranteed the program would keep building until the process was cancelled. Any strategies from any generation from any of the builds that met all the Top Strategies requirements would then be copied to the Top Strategies tables, where they could be reviewed later.


In Fig. 4, the equity curve for one of the resulting strategies from the Top Strategies table is shown. The part of the curve to the right of the red line is from the validation segment, which was evaluated after the build process was complete, indicating that the strategy held up well in forward testing. Also, the closed-trade equity curve now reveals the strategy's losses and risks, rather than hiding them in large intra-trade drawdowns that don't show up on a closed-trade equity curve.


Equity curve for short-term ES strategy.

Figure 4. Closed-trade equity curve for the revised short-term profit target-based strategy for the ES.


Some of the key performance metrics for this strategy are as follows:


Net Profit: $26,867.50
Number of Trades: 599
Average Trade: $44.85
Percentage Wins: 81.64%
Profit Factor: 1.591
Drawdown: $3,430.00
Kelly Fraction: 30.32%
Correlation Coeff: 0.9952
Significance: 100%
Ave Bars Wins: 14.46
Ave Bars Loss: 83.63
Max MAE: $1,437.50


As can be seen, all the conditions in the Top Strategies category have been met. While this strategy does not have the perfect winning percentage of the first strategy, it still has a very high win rate. More importantly, the Max MAE has been reduced considerably and the lengths of both wins and losses have been lowered. Compare the distribution of trade lengths in Fig. 5, below, to the corresponding figure (Fig. 2, above) for the prior strategy.


Distribution of trade lengths in bars.

Figure 5. Distribution of the trade lengths in bars for the revised strategy. The horizontal axis is the category of trade lengths in bars; e.g., 10 represents trade lengths of 1 to 10 bars. The vertical axis is the number of trades in each bar-length category.


Whereas the original strategy had trades that lasted more than 7000 bars, the longest trade from this strategy lasts 94 bars. The size in Fig. 5 of the "100" category (trade lengths between 91 and 100 bars) is due to a rule that exits trades after 92 bars. If this rule had been applied to the original strategy, it would have ruined the performance of the strategy. By allowing the build process to include it as a way to meet the performance requirements, it was incorporated into the logic in a way that works.


As a final illustration of the strategy, the following figure shows how applying a 5% fixed fractional position sizing rule after-the-fact affects the results, assuming a starting account equity of $100,000. The results are equivalent to an average annual compounded return of about 90% per year or 5.5% per month with a maximum peak-to-valley drawdown of about 16%.


Equity curve with 5% fixed fractional position sizing.

Figure 6. Equity curve for trading the revised strategy with 5% fixed fractional position sizing starting with $100,000.



This article looked at the process of building a short-term strategy for the E-mini S&P 500 futures that takes small, frequent profits. I think several lessons can be drawn from this. First, it's necessary to look closely at a strategy's performance and trading characteristics to determine if it's actually tradable in practice. The initial strategy seemed ideal on the surface but, on closer inspection, revealed some flaws.


Secondly, the initial strategy, while not what we ultimately wanted, provided some basic performance targets and a baseline for subsequent development. Considering those initial results provided specific targets for drawdown and Max MAE, which were the basis for the second strategy. Having realistic requirements makes it more likely that good results will be achieved.


Lastly, rather than trying to fix the first strategy, building the second one anew from a revised set of requirements allowed the genetic programming process, which is the basis of Builder, to consider every aspect of the strategy as a whole so that all the different elements worked together properly. This is arguably an advantage of the genetic programming approach to strategy development over the more traditional, manual approach.


The revised strategy met all the requirements that were imposed and demonstrated good performance on the validation segment, but there are at least several other steps that could be taken as part of a more complete development process. For example, Monte Carlo analysis could be performed to look at the sensitivity of the results to price changes and/or changes to the strategy parameters. Real-time tracking could be performed to further validate the performance and to determine whether the trading characteristics of the strategy are suitable for the trader.


The purpose of this article was not to develop the perfect strategy for taking short-term profits in the ES, but rather to provide an example of how to approach strategy development using Adaptrade Builder or similar goal-oriented tools. By applying a similar approach to your own strategy development process, you should be able to come up with trading strategies that meet your needs.


Mike Bryant

Adaptrade Software




This article appeared in the September 2014 issue of the Adaptrade Software newsletter.





If you'd like to be informed of new developments, news, and special offers from Adaptrade Software, please join our email list. Thank you.


Join Our Email List
For Email Marketing you can trust




Copyright (c) 2004-2019 Adaptrade Software. All rights reserved.