|
||
|
|
Reverse Engineering a Trading Strategy by Michael R. Bryant
Reverse engineering is the process of deconstructing an
object in order to duplicate it. Essentially, you start with the finished
product, take it apart, figure out how it works, and base your duplicate design
on what you learn.
It turns out there is. By working backwards from the reported performance, we can systematically try different combinations of strategy logic until we find one that matches the reported results. This doesn't guarantee we'll find the same logic used in the strategy, but we can probably find something that's pretty close.
Figure 1. MiniMax one-contract trading results for the E-mini S&P. Trading costs: $30 per round-turn.
MiniMax Strategy Performance Metrics
Using Adaptrade Builder, I set the build goals as shown below in Fig. 2.
Figure 2. Build goals to reverse engineer the MiniMax system.
Figure 3. Selecting entry and protective stop orders to reverse engineering the MiniMax strategy.
Other information available about MiniMax allows one to surmise that the long and short sides are symmetric, rather than being based on completely different logic. Accordingly, I've selected the Long/Short Symmetry option.
MiniMax is based on daily bars of the ES with trading costs of $30 per round turn. After loading price data for the ES that matches the equity chart shown above in Fig. 1, I set the population size to 5000 with 20 generations. Since I know that MiniMax has held up well out-of-sample, my approach is to reverse engineer the strategy over the entire reported period, without saving any data for out-of-sample (OOS) testing. If successful, I could always go back and repeat the build over a shorter period, leaving some data for OOS testing as a way to verify the integrity of the build process.
The resulting equity curve for the top strategy is shown below in Fig. 4. Comparing this to Fig. 1 reveals a pretty close correspondence.
Figure 4. One-contract trading results for the E-mini S&P strategy obtained from reverse-engineering MiniMax. Trading costs: $30 per round-turn.
The table below compares the performance metrics between MiniMax and the reverse-engineered strategy, labeled as the MiniMax Clone. As can be seen from the table, most of the metrics are pretty close.
Strategy Performance Metrics Comparison
Examples of recent trades taken by MiniMax (Fig. 5) and the MiniMax clone (Fig. 6) are shown below. Many of the trades are similar. More importantly, the trading characteristics seem to be quite similar.
Figure 5. Recent trades taken by MiniMax.
Figure 6. Recent trades taken by the MiniMax Clone strategy.
The MiniMax clone strategy has five inputs, which is actually fewer than MiniMax, which bodes well for future (out-of-sample) performance. I repeated the build process with the same settings over a shorter time period, leaving 20% of the data for OOS testing and adjusted the performance targets for the shorter in-sample period. Similarly close correspondence was found between MiniMax and its clone, and, more importantly, the OOS results looked good as well, which suggests that the build process is robust.
As the developer of MiniMax, I obviously have access to the logic for the strategy. So, did the clone identify the same logic used in MiniMax? Not quite. Interestingly, the entry conditions and exit logic in the clone are somewhat simpler than in MiniMax while producing nearly the same results. This probably shouldn't be surprising given that many indicators are highly correlated, which means that different indicators are capable of producing the same results.
While it may not be possible to determine the exact logic used in a trading strategy using this approach, it can nonetheless be used to develop a strategy given a set of realistic performance goals. The benefit of trying to duplicate an existing strategy is that you know the performance results are realistic, and duplicating a strategy that has a good real-time record may increase the likelihood of getting good real-time performance in the clone.
This process has one other interesting application. Because the reverse-engineering process is based almost solely on the performance metrics, it can be applied to a discretionary track record as well. Suppose, for example, you're a discretionary trader looking to make the switch to systematic trading. You could reverse-engineer your own track record to create a strategy that will, in principle, trade the same way you do.
Put your clone to work and go on vacation. Sounds good to me!
Mike Bryant Adaptrade Software
*This article appeared in the September 2011 issue of the Adaptrade Software newsletter.
HYPOTHETICAL OR SIMULATED PERFORMANCE RESULTS HAVE CERTAIN INHERENT LIMITATIONS. UNLIKE AN ACTUAL PERFORMANCE RECORD, SIMULATED RESULTS DO NOT REPRESENT ACTUAL TRADING. ALSO, SINCE THE TRADES HAVE NOT ACTUALLY BEEN EXECUTED, THE RESULTS MAY HAVE UNDER- OR OVER-COMPENSATED FOR THE IMPACT, IF ANY, OF CERTAIN MARKET FACTORS, SUCH AS LACK OF LIQUIDITY. SIMULATED TRADING PROGRAMS IN GENERAL ARE ALSO SUBJECT TO THE FACT THAT THEY ARE DESIGNED WITH THE BENEFIT OF HINDSIGHT. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFITS OR LOSSES SIMILAR TO THOSE SHOWN. |
If you'd like to be informed of new developments, news, and special offers from Adaptrade Software, please join our email list. Thank you.
For Email Marketing you can trust
The strategy developed for this article is included as a free bonus when purchasing Adaptrade Builder. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright (c) 2004-2019 Adaptrade Software. All rights reserved.