20, 21, 22. I like numbers and patterns, which explains why I am drawn to trading. Humans are wired to pattern match, and it is our ability to pattern match better than any other species that has allowed us to rise above the other animals on this planet (that and these rather useful opposable thumbs).
This system is a redux of SAT2021-18, the Aggregate Fisher Index, based on Sofien Kabaar’s original idea. That week was a disaster and the idea was not properly tested. This week, I put this through my entire process and see if this idea is a good one or not. I am really excited to see what we get.
I won’t rehash the system, so you can read the prior system to learn the general idea (click the link in the prior paragraph). Let’s get to it.
Phase 1: Plan & Design
1. Trading Idea
Rather than describing this Aggregate Fisher Index again, I will assume you read the earlier post. It is fairly complex and I don’t think it is necessary to describe again here. The idea is this:
- Calculate the Aggregate Fisher Index (AFI)
- If the AFI reaches into the upper bound, sell short
- If the AFI reaches into the lower bound, buy
- Stop loss = 1 ATR (Average True Range over 20 bars)
- Trailing ATR stop for exit (multiple of 20 bar ATR)
Seems simple right? Yes, it is deceptively simple. Here is a short entry:
2. System Definition
I will use the following position sizing:
- Futures: 1 contract
|UpperBound||Double||2.24||Suggested by Kaabar, based on the Golden Ratio plus it’s reciprocal; his is a starting point, but I want to be able to optimized these|
|LowerBound||Double||-2.24||The negative of the UpperBound; optimizable|
|Price||Double||–||Median price, i.e. High+Low/2|
|LongATR||Double||3||Multiplier for ATR in our trailing long stop; optimizable|
|ShortATR||Double||3||Multiplier for ATR in our trailing short stop; optimizable|
|MyATR||Double||0||20 period ATR for stop loss and trailing stop calculation|
|MaxH||Double||0||Maximum High over n-periods, used in FT calculation|
|MinL||Double||0||Minimum Low over n-periods, used in FT calculation|
|AggFisherIndex||Double||0||Holds the averaged sum of all the FT calculations|
|StopPrice||Double||0||Variable to hold the stop price|
|PosHigh||Double||0||Position High, for trailing stop on long positions|
|PosLow||Double||0||Position Low, for trailing stop on short positions|
There is one change to the entries from the prior system; enter only when flat. This will allow the ATR exits to ride the trend as long as they can before exit. I hope.
- If flat and
- AggFisherIndex < LowerBound and
- AggFisherIndex[1 bar ago] > LowerBound and
- AggFisherIndex[2 bars ago] > LowerBound then
- Buy next bar at market
- If flat and
- AggFisherIndex > UpperBound and
- AggFisherIndex[1 bar ago] < UpperBound and
- AggFisherIndex[2 bars ago] > UpperBound then
- Sell short next bar at market
- Profit targets: none
- Stop Loss: 1 * MyATR from Entry Price
- Trailing sell stop, PosHigh – (LongATR * MyATR)
- Trailing buy to cover stop, PosLow + (ShortATR * MyATR)
- The AFI calculation is complex, but I solved this a few weeks ago
- I think the UpperBound and LowerBound may vary from instrument to instrument. I may have to optimized these one by one, rather than in bulk.
3. Performance Objectives
The system will meet the following objectives:
|System Type (trend, mean-reversion, day, swing, etc.)||Swing|
|Risk of Ruin||0%|
|Profit Factor||>= 1.4|
|Win Percent||>= 35%|
|Max Drawdown %||< 35%|
|Profit/Drawdown Ratio||>= 2.0|
This idea is S.M.A.R.T.: Specific, Measurable, Achievable, Realistic, Time-bound
4. Market Selection
I want to test on everything, but I will exclude equities and reserve that for a future week. Go big or go home.
|Energies||Crude Light, Natural Gas, Gasoline, Heating Oil||CL, NG, RB, HO|
|Currencies-Futures||Futures: Euro FX, Australian Dollar, British Pound, Swiss Franc||EC, AD, BP, SF||I am including Euro FX again, even though I previously tested it.|
|Fixed Income||TY, US|
|Agriculture||Soft Red Wheat, Soybeans, Corn||W, S, C|
|Softs||Cocoa, Sugar, Coffee||CC, SB, CO|
|Indexes||E-mini S&P, E-mini Russell 2000, E-mini Dow, E-mini Nasdaq 100||ES, RTY, YM, NQ|
Chart Type, Timeframe, Session, Time Zone:
|Chart Type||Regular Candlestick||Charting is only useful for validating entry and exit signals|
|Timeframe / Interval(s)||Daily, 60, 360 minute||I initially wanted more timeframes, but this is reasonable.|
Phase 2: Build
5. Manual Test
The manual test passed last time, so on to the build.
The entry, as noted earlier, is a little different. We are not reversing positions, only taking new entries if we are flat (no position).
7. Unit Test
When working on the original system, I could not get my ATR trailing stops working. Considering I have built them multiple times in the past, there really was not excuse for them to be broken. I think I was trying to be cute by building them from scratch, instead of doing the obvious: reuse code.
Lesson learned. I went back to SAT2021-13 and reused the exits. The unit test passed perfectly. Duh.
Here it is, not optimized, on Cocoa futures:
Note: Unit Test verifies that the system is executing the trading rules correctly. It is, essentially, quality control.
Phase 3: Test
I noticed that different instruments had different extremes. Kabaar’s system, presented in the context of forex, had set UpperBound and LowerBound values. Given the differences in futures, I decided to optimize the bounds and the ATR values:
|UpperBound||2.25 to 6.25||.5|
|LowerBound||-6.25 to -2.25||.5|
|LongATR||2.5 to 4||.5|
|ShortATR||2.5 to 4||.5|
This gives me 1,296 combinations, which approaches the upper threshold of my tolerance for such things. The only justification I have is that I really do not have to go one-by-one through the instruments and find the ideal upper and lower bounds. I’m using a blunt-force instrument here, which might be the correct choice, or might be a bad choice.
Running the optimizations for this system are very processor intensive and unfortunately the optimization engine erred a few times because a scheduled trading platform backup interrupted the process and loss of internet connectivity. I lost some of my optimizations, so I decided to only test two instruments at the 60 minute timeframe, since this was the most time-consuming of the three timeframes: British Pound and Euro FX futures.
Optimization was successful.
9. Walk-Forward Analysis
Walk-forward analysis failed, but it was not as terrible as I expected. The 60 minute timeframe failed all around, probably because the estimated trading costs, i.e. commission and slippage, make this idea too expensive to trade. All profit factors were below 1.0, meaning we were losing more money than making.
Nothing passed in the 360-minute or Daily timeframes, but they were not horrible. Here are the best performers from the Daily and 360-minute timeframes:
Each of these had decent return-to-max drawdown ratios, though max drawdowns would be difficult to stomach by themselves. It was nice to see a couple softs (Sugar-SB and Cocoa-CC) make their appearance. It may be that these would perform better in a non-correlated portfolio, which would hopefully smooth the equity curve and lower the total drawdown.
Here are some equity curves for various instruments on the 360-minute timeframe (Dow E-mini, Corn, and Nasdaq 100 E-Mini, respectively):
10. Monte Carlo Simulation
We did not make it this far.
We did not make it this far.
Phase 4: Deploy
We did not make it this far.
Trading System Result: FAIL
Notes and Commentary
As mentioned last time I tried it, I love this idea. Since most trading ideas fail our rigorous testing (>95%), I am not surprised or terribly disappointed. I like the results and I see a lot of places to improve this idea. I took the improvements from last time and applied them, with decent results. I liked the 1 ATR stops on initial entry, as they seemed to work well. We got close here, I think, just not quite over the hump.
Why did it fail? One problem with adapting this idea to futures markets is that the upper and lower bounds vary based on the instrument, just due to the differences in price, point sizes, and minimum moves. I applied optimization like a blunt instrument, hoping to hit something. It was not laziness, but rather I wanted to see what would happen.
Another problem may be that we need an additional filter or maybe a profit target (e.g. 2 x ATR), in other words a little something to make it pop. This is a counter-trend/contrarian system, so maybe the exits need to be a little more opportunistic, since a lot of trades just ended up following the existing trend. I have some ideas for future iterations of this system.
From the Continuous Improvement department, here is what I will do for the next version of this system:
- Find better optimization ranges based on the individual instrument, then optimize the upper and lower bound in ranges that are appropriate for that instrument; this will require measuring each instrument’s extreme AFI high and low
- Apply a trend filter
- Apply an ATR based profit target that would get us closer to a 1.4 profit factor
- Create and test this as a portfolio
This was a lot of fun, despite the outcome, and I will continue to work with this.
Thank you for reading and I hope you enjoyed. Feel free to leave a comment below and let me know what you think.
Next week’s idea: I am not sure yet, but I think a mean-reversion or scalping idea seems good. See you next Friday!
- The Fisher Aggregate Index, Sofien Kaabar
- Cycle Analytics for Traders, John Ehlers
- Trading Systems and Methods, 6th Edition, Perry Kaufman
Did you like what you read? Do you want to see more? Subscribe now and receive our weekly email, with the Trading System Idea of the Week and other fun stuff.
Don’t worry, we will never, ever, ever sell, overuse, or donate your email address. Promise.