NexusFi: Find Your Edge


Home Menu

 





Fisher Transform - a sample size problem?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one drolles with 8 posts (6 thanks)
    2. looks_two Trader.Jon with 4 posts (2 thanks)
    3. looks_3 wccktrader with 3 posts (0 thanks)
    4. looks_4 Fat Tails with 1 posts (0 thanks)
    1. trending_up 12,518 views
    2. thumb_up 8 thanks given
    3. group 4 followers
    1. forum 16 posts
    2. attach_file 5 attachments




 
Search this Thread

Fisher Transform - a sample size problem?

  #1 (permalink)
 drolles 
London, UK
 
Experience: Beginner
Platform: TradeLink, OpenQuant, considering anything that works...
Trading: if it trades...
Posts: 94 since Oct 2010
Thanks Given: 24
Thanks Received: 39

Hi,

I’m wondering if anyone has had any experience trading John Ehlers’s interpretation of the Fisher Transform?

I’ve built and backtested a simple trading strategy around this and I’m a bit confused. I’ve done an optimisation on this and it appears that shorter look back periods of the channel length perform better. The strategy appears to perform better with shorter lookback periods. Does this pose a sample size problem? Basic statistics tells us we need a sample size of above 30 to be valid. I’ve included an optimisation result from which optimises on Expectancy ( Optimizer Type: Max. [AUTOLINK]Expectancy[/AUTOLINK] - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum) while adjusting the target values of channel look back and Fisher Transform threshold value to target mean revision on a set of FX crosses. Here we show the Profit Factor as the performance measure (y axis) with the channel look back on the x-axis and threshold value on the z-axis.

My (very much conjecture here) explanation is that once the channel size gets too long, the threshold value no longer reflects the current market action. I’ve realised that there is no weighing to the most recent bars.

Kind regards,

drolles

Attached Thumbnails
Click image for larger version

Name:	F transform - optimised values.JPG
Views:	305
Size:	50.7 KB
ID:	33194  
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
MC PL editor upgrade
MultiCharts
Exit Strategy
NinjaTrader
REcommedations for programming help
Sierra Chart
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
21 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


Could you give more details on your strategy, or eventually post it, as it is simple.

Sample size and curve fitting are frequent problems.

Reply With Quote
  #4 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184


drolles View Post
Hi,

I’m wondering if anyone has had any experience trading John Ehlers’s interpretation of the Fisher Transform?

.. and it appears that shorter look back periods of the channel length perform better. ..
My (very much conjecture here) explanation is that once the channel size gets too long, the threshold value no longer reflects the current market action. I’ve realised that there is no weighing to the most recent bars.

Kind regards,

drolles

I have not done more than backtest, and the FisherTransform (NT native version) is only part of the conditions for entry: based on that, I have found with 4 range bars and with FT periods of 7 to 11 a fairly common optimization result, though I have had a maximum of 22 when I used it as a longer values filter. Only trying EURUSD .

My analysis is no where as extensive as your use of other than NT tools. With regards to optimization, I have also been using (a derivative of) expectancy with the PH Genetic. 30 results is 30 results. My strategy tends to average 7 entries @3 targets per, perday. So I dont have 30 per day either if that is what you are speculating about.

TJ

Writing to you from the wonderful province of Ontario, Canada. Home to the world's biggest natural negative ion generator, the Niagara Falls, and to those that dare to know how to go over it in a barrel. SALUTE!
Reply With Quote
Thanked by:
  #5 (permalink)
 
wccktrader's Avatar
 wccktrader 
Singapore
 
Experience: Intermediate
Platform: NinjaTrader, Sierra Charts
Broker: Thinkorswim, IQFeed
Trading: Options of SPY, IWM, QQQ
Posts: 47 since Nov 2010
Thanks Given: 54
Thanks Received: 149


drolles View Post
Hi,

I’m wondering if anyone has had any experience trading John Ehlers’s interpretation of the Fisher Transform?

I’ve built and backtested a simple trading strategy around this and I’m a bit confused. I’ve done an optimisation on this and it appears that shorter look back periods of the channel length perform better. The strategy appears to perform better with shorter lookback periods. Does this pose a sample size problem? Basic statistics tells us we need a sample size of above 30 to be valid. I’ve included an optimisation result from which optimises on Expectancy ( Optimizer Type: Max. [AUTOLINK]Expectancy[/AUTOLINK] - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum) while adjusting the target values of channel look back and Fisher Transform threshold value to target mean revision on a set of FX crosses. Here we show the Profit Factor as the performance measure (y axis) with the channel look back on the x-axis and threshold value on the z-axis.

My (very much conjecture here) explanation is that once the channel size gets too long, the threshold value no longer reflects the current market action. I’ve realised that there is no weighing to the most recent bars.

Kind regards,

drolles

It appears from my backtesting/optimization with Fisher Transform that it works better with daily bars (lookback periods of 5 to 10) than with intraday bars. Perhaps John Ehlers had designed the indicator based on the daily bars.

Reply With Quote
  #6 (permalink)
 drolles 
London, UK
 
Experience: Beginner
Platform: TradeLink, OpenQuant, considering anything that works...
Trading: if it trades...
Posts: 94 since Oct 2010
Thanks Given: 24
Thanks Received: 39

All,

Thanks very much for your replies.

I’ll try to consolidate answers and replies into this reply so I can cover everyone’s feedback, thanks again for those whom have replied.

Sample size
To clarify here, I wasn’t referring to a sample size problem with regards to trades or strategy validation. I’ve got intra-day data on some of the FX crosses going back to 2003, I’m able to generate enough trades to be confident in the strategy itself. It appears to be consistent. Given it is a mean revision strategy unsurprisingly it does not do as well during the financial crisis years late 2006 – 2008 on FX and probably on Equities as well. However, if you model it across a portfolio of reasonable crosses – focusing generally on majors – it appears to hold up relatively well.

Therefore, with regards to sample size I’m not concerned on that front. My backtests to date generate somewhere over 1000 trades. I’m not concern about sample size in that respect.

My concern around sample size was specifically on the Fisher Transform indicator. The default setting in 10 if you load it in NinjaTrader. Given the indicator relies on the building of a PDF (Probability Distribution Function – see the link to the actual paper below) , I would have thought that the PDF would require a look back length of at least 30 to be statistically valid. Just surmising here, one could argue that there is more information than just than the close (i.e. Open, Low and High) prices in the channel defined by the look back period therefore the PDF could well be valid. However, the immediate counter argument is that this data, while it exists, is not being modelled by the indicator.

Curve fitting
I’m not too concern on this front. The strategy is very simple and the selection of the time frame was fairly random. As you can see the optimisation values are positive across a relatively wide range of results. And the strong results do not appear random – they are clustered around the same values. In fact I’m relatively impressed with the Profit Factor of the strategy that is relatively “out of the box” with very little tweaking hence my interest in it. I think if you look to improve the trade management above a standard mean revision model (possibly turning to short-term trend following after the revision) you might well be able to improve the strategy considerably.

The trading strategy
The trading strategy is, for all intense and purposes, detailed by John Ehlers here: https://www.mesasoftware.com/Papers/USING%20THE%20FISHER%20TRANSFORM.pdf. This is an excellent paper well written and structured.

It is a mean revision strategy using entry trigger where the Fisher Value is over a certain threshold – positive or negative. My implementation is a little different to Ehlers. I’m not filtering through a RSI. I am using price. I did test the RSI version, however, it came back with a lower Profit Factor and Expectancy. It did appear to have a smoother equity curve though – i.e. handled adverse periods a little better.

The outright (as opposed to relative) mean revision strategies are all similar. For further reference you might want to see my earlier post on Stridsman’s Meader strategy - . Also a cross post on the Trade2Win forum and the replies there: Meander System - any success stories? | Trade2Win Forums.

Look back for the FT
Thanks for those that shared their optimisation and backtest results. That’s good news that we have found similar results. As you can see that the optimisation values cluster around the same values that have resulted from your backtests. I also take the news that you have been varying the timeframes and seeing the same results as good news. That means we have found the same artefact across multiple timeframes. Weissman in his book Mechanical Trading Systems ( Mechanical Trading Systems: Pairing Trader Psychology with Technical Analysis Wiley Trading: Amazon.co.uk: Richard L. Weissman: Books) gives an interesting take on the time frames that are mean reverting for various instruments – see P 91. This appears to fit with the testing done with this strategy.

FX vs Equities
I’m assuming that you both have worked on FX – Trader.Jon mentions EURUSD. Have you done any testing on Equities? In his example Ehlers uses the Emini to model the S&P 500 (see link to paper above). I’ve done some very rough and ready testing on Equities (Dow 30) and at first pass the strategy appears to be relatively strong when operated across a portfolio. My modelling of equities was on intra-day data. More testing required here in this respect – e.g. correlation of trading dates / times for risk analysis would be one area of immediate concern – very high correlation of returns and volatility within the DOW30 could increase your risk exposure greatly if more than a couple of trades are opened across instruments at one time.

Backtest results
I’ve attached backtest results for a portfolio of currencies modelled with a starting value of 50,000 on 01/01/2003 and using a Fixed Fractional position sizing methodology with 1% risk per trade. It can be improved very quickly by taking a look at the constituents of the portfolio and analysing the crosses that are consistently unprofitable. I feel that one can build a fundamental story around the crosses that are unprofitable – they are very disconnected economies with very different interest rates. The crosses that are profitable are those where the USD is very dominate or that the economies are tightly integrated and alike e.g. USDCAD.

Thanks and regards,

drolles

Attached Thumbnails
Click image for larger version

Name:	Old port equity curve.JPG
Views:	358
Size:	78.2 KB
ID:	33312  
Started this thread Reply With Quote
  #7 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184

Thanks for the further detail ... I have only tested out on EURUSD and have not considered any other instrument for the moment.

The graph in your first post .. is that Mathlab or Xcel or ??

Jon

Writing to you from the wonderful province of Ontario, Canada. Home to the world's biggest natural negative ion generator, the Niagara Falls, and to those that dare to know how to go over it in a barrel. SALUTE!
Reply With Quote
  #8 (permalink)
 drolles 
London, UK
 
Experience: Beginner
Platform: TradeLink, OpenQuant, considering anything that works...
Trading: if it trades...
Posts: 94 since Oct 2010
Thanks Given: 24
Thanks Received: 39


Trader.Jon View Post
Thanks for the further detail ... I have only tested out on EURUSD and have not considered any other instrument for the moment.

The graph in your first post .. is that Mathlab or Xcel or ??

Jon

Jon,

It is Excel 2007. I graphed the output of a Pivot Table.

Kind regards,

drolles

Started this thread Reply With Quote
  #9 (permalink)
 
wccktrader's Avatar
 wccktrader 
Singapore
 
Experience: Intermediate
Platform: NinjaTrader, Sierra Charts
Broker: Thinkorswim, IQFeed
Trading: Options of SPY, IWM, QQQ
Posts: 47 since Nov 2010
Thanks Given: 54
Thanks Received: 149

I have backtested it for US equities. As the indicator is based on price distribution (pdf), it does a good job in finding cyclical turning points. It is also less sensitive to the lookback period as compared to other momentum indicators such as RSI, CCI and Stochastic. Such indicator would work well if their lookback periods are in-sync with actual cycle period of the market. However, they often give poor results when the actual cycle period of the market changes. I suppose this is one of the reasons for their poor walk forward testing results.

Reply With Quote
  #10 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184



drolles View Post
Jon,

It is Excel 2007. I graphed the output of a Pivot Table.

Kind regards,

drolles

Do you have a specialized workbook for doing that directly out of NT? I have a feeling that is only a small part of what you have done in terms of analysis.

Jon

Writing to you from the wonderful province of Ontario, Canada. Home to the world's biggest natural negative ion generator, the Niagara Falls, and to those that dare to know how to go over it in a barrel. SALUTE!
Reply With Quote




Last Updated on March 15, 2011


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts