Systematic Trading research and development, with a flavour of Trend Following
Au.Tra.Sy blog – Automated trading System header image 2

e-ratio: How to measure your trading edge in 4 easy steps

October 30th, 2009 · 19 Comments · Backtest

e-ratio is a metrics that measures the edge of a trading system component. For example, we could use it to quantify the edge gained from a donchian channel breakout entry signal.

The concept

The e-ratio quantifies the edge by calculating the overall amount trades go in your favor versus the overall amount trades go against you. The higher value the value of the e-ratio, the more trades move in your favor – giving you a good indication of the edge measured.

Take all the trades generated by the entry signal.
Close each trade after a given duration of n days.
Calculate the e-ratio based on data from all trades (formula detailed in 4 steps below). This gives you the e-ratio for a trade duration of n days.
Repeat the operation for various values of n to chart the e-ratio curve as a function of the number n of days – as illustrated below:

The e-ratio of the entry criteria is plotted above. The higher the value of the e-ratio, the better the edge. In the instance above the 45-day e-ratio is 1.21 but the edge degrades over time and the e-ratio value drops to 1.07 for day 68.

The e-ratio of the entry criteria is plotted above. The higher the value of the e-ratio, the better the edge. In the instance above the 45-day e-ratio is 1.21 but drops to 1.07 for day 68.

Step 1: Record MAE and MFE for each trade

For each trade, measure the Maximum Favorable Excursion and the Maximum Adverse Excursion.
Maximum Excursions are the maximum amount the price goes against you (Adverse) or in your favor (Favorable) during the trade. MAE is calculated between the entry price and the lowest price during the trade. MFE is calculated between the entry price and the highest price during the trade. Note that both values are positive.

Step 2: Normalise MAE and MFE values

To be able to compute the e-ratio across different markets, the Excursion values should be normalised to a common denominator – such as a unit of volatility. The Average True Range is a good measure of volatility. In many systems it is also used to drive the position sizing, making it really relevant.
Divide all MAE and MFE values by the ATR calculated at the beginning of the trade. In this example we use the same period for the ATR and the Donchian Channel.
This gives you comparable values across all markets and conditions.

Step 3: Average MAE and MFE values across all trades

Simple maths here: just add all normalised MAE values calculated in step 2 and divide by the number of trades. Repeat the operation for the MFE values.

Step 4: Final division = e-ratio

Simply divide the average MFE by the average MAE to give you the e-ratio. The higher the number, the better, with any values above 1 implying a positive edge.

Analysis

Plotting the e-ratio across different durations allows you to check the edge offered by the signal and what timeframe works best for the signal parameters.

You can also combine e-ratios for different parts of a system to see how they impact each other.
Another component of a trading system could be a trade filter, for example, trade with the main trend:

Only buy when the moving average (at a higher timeframe) is rising and below the price.
Only sell when the moving average (at a higher timeframe) is declining and above the price

The second e-ratio plotted is from a combined entry signal and trade filter. You can see the improvement a filter logic makes!

The second e-ratio plotted is from a combined entry signal and trade filter. You can see the improvement a filter logic makes!

The e-ratio is one tool in the box of an automated trading system developer. It can quickly give you an overall feel for a component to include in the trading system

Credits: e-ratio was introduced to me by Curtis Faith in his Way of the Turtle book.

Note: The e-ratio was calculated using TradersStudio (and Excel). The system tested was a Donchian Channel Breakout (17 days) with 7 Futures markets. The MA used for filtering was 108 days. I will follow-up with a post containing the code used to calculate it.

Related Posts with Thumbnails

Tags: ·

19 Comments so far ↓

  • Millward

    Thanks for another great article, I’m in the rudimentary stage of building and algo for the futures, mainly specializing in FX, and your blog is a perfect fit for my daily quest for knowledge in this field.
    I just noticed in your blogroll the aggregate link to all you perfered blogs, excellent collection.

    thanks again, cheers

  • Jez

    Millward,
    Glad it helps..
    If you have any other blogs that you think might be of interest for the blogroll, please let me know.
    -Jez

  • Millward

    Hi Jez,

    You pretty well have the algo side of blogs covered, its difficult to find good ones under this genre, but will do.
    Cheers.

  • Jez

    Thanks – I’ll check it out.

  • The “e-ratio” system measurement | Flirting With Models

    [...] for interesting system measurements, I stumbled across the “e-ratio,” described here. The concept is to graph your normalized (volatility-adjusted) MFE (maximum favorable excursion) to [...]

  • Bharaata

    Fabulous article and demo . Awesome.

  • montechristo

    Hi Jez,
    Could you clarify one point:
    You say to divide MAE and MFE by the number of trades and then divide average MAE by average MFE. But (MFE/n)/(MAE/n) is equal to MFE/MAE. So E-ratio is not linked to the number of trades and you don’t have to caculate the average of MFE and MAE or I missed something ;-)

  • Jez

    montechristo,
    Conceptually it is easier to grasp the idea that the e-ratio compares the average MAE to the average MFE, hence that step in the calculation – however, I’ll give you that mathematically this is completely equivalent to comparing (and dividing) Total MAE with Total MFE (and step 3 can be considered “optional”

  • LuckyF00L

    Hi Jez,
    I am using the free trial version of Trading Blox and I am trying to test the edge of different entry signals. I am basically progressing from a random entry to dual MA, Donchian etc. Is there a predefined Blox that already calculates and plots the e-ratio or do i need write the code from scratch. Or if u have already addressed e-ratio calculation in TB in a different article can u pls point me to it? Thanks

  • Jez Liberty

    Hi LuckyF00L,
    I haven’t redevelopped the e-ratio in TB… There is some discussion about the e-ratio on their forum:
    link1

    And the implementations of the e-ratio calc (in TB) from the discussion above are available for download, but I believe you will not have access to it with the free version of TB (ie they are in the Blox marketplace, which I think is only accessible for paid customers):
    link2

    link3

  • Kushal

    Hello sir,
    I have came across ur blog to find any afl for auto trading for the amibroker for stock markets of india.
    I will highly appreciate if u can make 1 of the auto trading system in which I can define my formula to trade.
    Thank U,

    Regards,
    Kushal..

  • Jez Liberty

    Hi Kushal – thanks for the comment. Unfortunately, I do not use AmiBroker any more so the possibility of publishing other afl code is very remote.
    There is a large user base though with yahoo groups being very responsive and other collections of afl codes available fairly easily, so you might have more luck over there

  • Matt

    Hi,

    Excellent post … wondered if you’d had any thoughts on aggregating MFE/MAE across all “n” results to come up with a single ratio for the indicator type? This would then be used to rank indicators rather than comparing the graphs?

    Do you think the MFE/MAE could also be normalised by expressing them as a percentage?

    Matt

  • Jez Liberty

    Matt,
    This is definitely a good idea – you would “lose” the info about which timeframes are performing best (which was one of the idea behind this methodology), but you could aggregate one figure for many indicators indeed.
    Re: your percentage question, the e-ratio (MFE/MAE) is already a percentage-type value, ie an e-ratio of 1.4 means that the MFE is on average higher than the MAE by 40% so if I undertand correctly, this is just a matter of writing conventions?

  • Matt

    Re: aggregation. Agree its a blunt instrument, but perhaps it has a use in highlighting where to concentrate analysis, when faced with hundreds of indicators.

    Re: percentage – not the final ratio, I was thinking more about the use of the ATR to normalise across markets. If the MAE/MFE are a percentage figure, then there is no need to use the ATR to bring them down to a common unit. Unless I’ve missed something :)

  • Jez Liberty

    Agree on both counts, the blunt instrument can be good to cut through a lot of indicators and using the MAE/MFE as a percentage figure for each trade would make it easier to calculate – albeit the results will not be identical with both methods.

  • The trend is your friend! | Guide FX

    [...] the quality of input. This tool will be the MER (Maximum Excursion Ratio). Others call it the e-Ratio. It consists of evaluating the relationship between the advantage offered a position in the market [...]

  • WmA.

    Have you used this in combination with the Kelly criterion for position sizing?

Leave a Comment