Trading Idea #022 – Aggregate Fisher Index 2

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 Trading Idea #018, the Aggregate Fisher Index, based on Sofien Kabaar’s original idea.  That week was a disaster and the idea was not properly tested.  Today, 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

Position Sizing:

I will use the following position sizing:

  • Futures: 1 contract

Input Parameters:

InputData TypeDefaultDescription
UpperBoundDouble2.24Suggested 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
LowerBoundDouble-2.24The negative of the UpperBound; optimizable
PriceDoubleMedian price, i.e. High+Low/2
LongATRDouble3Multiplier for ATR in our trailing long stop; optimizable
ShortATRDouble3Multiplier for ATR in our trailing short stop; optimizable


VariableData TypeDefaultCalculation
MyATRDouble020 period ATR for stop loss and trailing stop calculation
MaxHDouble0Maximum High over n-periods, used in FT calculation
MinLDouble0Minimum Low over n-periods, used in FT calculation
AggFisherIndexDouble0Holds the averaged sum of all the FT calculations
StopPriceDouble0Variable to hold the stop price
PosHighDouble0Position High, for trailing stop on long positions
PosLowDouble0Position 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.

  • Long:
    • If flat and
    • AggFisherIndex < LowerBound and  
    • AggFisherIndex[1 bar ago] > LowerBound and
    • AggFisherIndex[2 bars ago] > LowerBound then
    • Buy next bar at market
  • Short:
    • 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


  • Long:
    • Trailing sell stop, PosHigh – (LongATR * MyATR)
  • Short:
    • Trailing buy to cover stop, PosLow + (ShortATR * MyATR)


  • The Aggregate Fisher Index 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
Walk-forward Efficiencyn/a
Risk of Ruin0%
Profit Factor>= 1.4
Win Percent>= 35%
Max Drawdown %< 35%
Profit/Drawdown Ratio>= 2.0
Ready Date2021/07/02

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 time.  Go big or go home.


EnergiesCurrenciesFixed IncomeAgricultureMetalsSoftsIndexesEquities


Market SectorInstrumentSymbolComments
EnergiesCrude Light, Natural Gas, Gasoline, Heating OilCL, NG, RB, HO 
Currencies-FuturesFutures: Euro FX, Australian Dollar, British Pound, Swiss FrancEC, AD, BP, SFI am including Euro FX again, even though I previously tested it. 
Fixed Income TY, US 
AgricultureSoft Red Wheat, Soybeans, CornW, S, C 
SoftsCocoa, Sugar, CoffeeCC, SB, CO 
IndexesE-mini S&P, E-mini Russell 2000, E-mini Dow, E-mini Nasdaq 100ES, RTY, YM, NQ 

Chart Type, Timeframe, Session, Time Zone:

Chart TypeRegular CandlestickCharting is only useful for validating entry and exit signals
Timeframe / Interval(s)Daily, 60, 360 minuteI initially wanted more timeframes, but this is reasonable.
Time ZoneExchange 

Phase 2: Build

5. Manual Test

The manual test passed last time, so on to the build.

6. Build

Process Diagram

Aggregate Fisher Index


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

8. Optimization

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:

UpperBound2.25 to 6.25.5
LowerBound-6.25 to -2.25.5
LongATR2.5 to 4.5
ShortATR2.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. 

11. Incubation

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 Aggregate Fisher Index 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 time’s idea:  I am not sure yet, but I think a mean-reversion or scalping idea seems good. 


Did you like what you read? Do you want to see more?  Subscribe now and receive our email twice per month, with a new Trading System Idea and other fun stuff.

Don’t worry, we will never, ever, ever sell, overuse, or donate your email address. Promise.

Did you like what you read? Do you want to see more?  Subscribe now and receive our email twice per month, with a new Trading System Idea and other fun stuff.

Don’t worry, we will never, ever, ever sell, overuse, or donate your email address. Promise.

Leave a Reply

Your email address will not be published. Required fields are marked *