Performance Metrics — The Equity Curve and Drawdown (Part 2 of 4)

--

Welcome

Hello and welcome to our eleventh article. This issue explains the Equity Curve and Drawdown with reference to backtesting reports in MetaTrader 4 (MT4). All articles are saved at our Medium page and on the IQT website, which has a clickable version of the map of all articles: https://theiqt.com/blog.

These articles are based on my experience from consulting and product development at The IQT. Do let us know if there are topics you would like us to cover, questions you would like to resolve, or if there are insights you would like to share from your own experience. Hit that reply button!

Last Time

In Article 10 — “Performance Metrics — Profitability (Part 1 of 4)”, we explored key metrics used to define and assess a strategy’s profitability with reference to backtesting reports in MT4.

Overview

1) The Balance Curve and Equity Curve are a visual representation of a strategy’s performance. They serve to highlight other measures such as Drawdown.

2) Drawdown is the difference between a peak and a trough in the Equity Curve. A variety of measures exist based on this concept, such as Absolute Drawdown, Maximum / Maximal Drawdown and Maximum Drawdown Duration.

3) Other measures which are complimentary to Drawdown measures in MT4 reports are the maximum lossmaking trade, the maximum number of consecutive losses, the maximum sum of consecutive losses, the average number of consecutive wins and the average number of consecutive losses.

Main Points

Below is the MT4 backtesting report from last time. We will use it to discuss the Equity Curve and Drawdown.

A Sample MT4 Backtesting Report

1) The Equity Curve

· The chart shows the Equity Curve (green line) and Balance Curve (blue line) of the strategy.

· For this strategy, the curves are almost identical so almost everywhere the blue line is drawn on top of the green line and it looks like only the Balance Curve is visible. The Equity Curve only deviates slightly from the Balance curve about a third of the way in from the left, where the green line dips slightly below the blue line.

· The Balance Curve shows the current value in the account, excluding the value of any open trades. It only updates after a trade closes.

· The Equity Curve shows the current value in the account, including the value of any open trades. It constantly updates in real time as the value of open trades changes. If open trades are currently making a profit, the Equity Curve will temporarily rise above the Balance Curve, while if they are loss-making, the Equity Curve will temporarily fall below the Balance Curve, as in the chart here. Whenever all trades are closed, the Equity Curve and Balance Curve re-join.

· Ideally, we want the Equity Curve to be an upward sloping line or curve; this would indicate that the strategy predictably generates returns without ever making losses, which cause downward deviations. In the chart shown here, the Equity Curve moves upwards overall and there are upward sloping sections, but there are significant sections where the curve moves downwards or sideways due to non-performing trades.

2) Drawdown

The downward deviations in the Equity Curve are related to the concept of Drawdown;

· In general, a drawdown is the fall in account value from a peak to a trough of the Equity Curve. Including the initial deposit as a peak, we might count 9 drawdowns in the chart above.

· Drawdowns are usually expressed as a percentage loss from the latest peak, but can also be expressed in absolute / currency terms. Strictly they should be quoted as a negative percentage / number, but not everyone follows this, and neither does MT4.

· Absolute Drawdown is the difference between the initial deposit (£10000 here) and the minimum equity in the account. Here it is listed as £70.48.

· Maximum / Maximal Drawdown is the largest drawdown as a percentage of the account equity, i.e. the largest (trough value — peak value) / peak value. Here is a link to Investopedia for more information: https://www.investopedia.com/terms/m/maximum-drawdown-mdd.asp

· “Relative Drawdown” in the MT4 report is what we define as Maximum Drawdown. It is 1.26% here. I have come across traders with strategies which go as high as 30%, which sounds very psychologically painful.

· “Maximal Drawdown” in the report is the absolute / currency number for “Relative Drawdown”, and is £128.09 here.

· Maximum Drawdown Duration is the longest time length of drawdown. Unfortunately MT4 does not show this information, but analysis of the list of trades (not shown here) shows that the value is approximately 16 days for this strategy.

· Note that the Maximum Drawdown Duration is not necessarily the duration of the Maximum Drawdown; we might have an Equity Curve which recovers quickly from the Maximum Drawdown, but then takes a longer time to recover from another drawdown.

· Finally, remember that Drawdowns are measured using the Equity Curve, not the Balance Curve. Since MT4 reports only show account balances after each trade, you may not be able to duplicate their exact numbers using the list of trades. E.g. the screenshot below shows the beginning of the list of trades in the MT4 report. It could not show all the variation in the asset price and account equity without being considerably longer.

Beginning of the List of Trades

3) Other Psychological Metrics

The Equity Curve and Drawdown information give traders an idea of how psychologically painful the lows of a strategy are. Even if a strategy has been proven in the past (and will be in the future), the worse it does in the present in terms of drawdown, the greater the likelihood of a trader concluding there has been a regime change; market conditions have significantly changed and it is time to stop using the strategy.

Similar information is conveyed in the rest of the MT4 report by:

· “Largest loss trade”: the largest loss in currency terms, -£12.80 here.

· “Maximum consecutive losses”: the largest number of consecutive lossmaking trades before a profitable trade

· “Maximal consecutive loss”: the largest sum of losses from consecutive lossmaking trades, in currency terms

· “Average consecutive wins” and “Average consecutive losses”: together these give an idea of how long upswings and drawdowns last on average.

Further Reading

In the next article, we will discuss Data Quality, which underpins all inference in the MT4 backtesting report.

Thanks and happy trading!

--

--

The Institute of Quantitative Technology

The IQT offers Tools, Solutions and Training to Algorithmic Traders to help them maximise returns and optimise strategies.