Skip to content
Level 4 · Trading System ResearcherLessonPart 29 · page 3 of 630 min
30Minutes
4Sources
StandardRequires

Risk Metrics: Drawdown and Its Relatives

Return tells you where a system finished. Drawdown tells you what it did on the way, and it is the half of the report that decides whether a person could actually have held the position long enough to collect the return. AmiBroker reports six numbers in this family, and the fastest way to misread all six is to assume they all divide by the same thing. They do not. Two of them divide by a currency amount, two by a percentage, and one is not a ratio at all.

By the end of this lesson you will be able to reconstruct each of them from the others, explain why Recovery Factor and CAR/MaxDD can point in opposite directions on the same report, and name the one property of drawdown that the report does not measure.

Max. system drawdown and Max. system % drawdown

Section titled “Max. system drawdown and Max. system % drawdown”

Max. system drawdown is the largest peak-to-valley decline experienced in portfolio equity, in account currency. Max. system % drawdown is the same decline as a percentage. Their metric strings are "MaxSystemDrawdown" and "MaxSystemDrawdownPercent".

Portfolio equity is available cash plus the value of every simultaneously open position, so these figures include unrealised losses on positions you were still holding. That is the right definition: an account that is 20 per cent underwater on open positions is 20 per cent underwater regardless of whether anything has been sold.

Max. system % drawdown is reported as a negative number, and it is colour-coded: worse than −30 per cent is flagged bad, −30 to −10 per cent neutral, −10 to 0 per cent good.

The drawdown you lived through was worse than the one in the report

Section titled “The drawdown you lived through was worse than the one in the report”

The modern portfolio backtester computes system and trade drawdowns from the close price only, regardless of the settings. The old backtester let you choose Open, Close or the High–Low range as the basis. The guide notes that the current behaviour is “subject to change”, which is a documentation phrase worth taking seriously: re-check it against your own build before you make a strong claim about it.

The practical consequence is that intra-bar excursions do not appear. If your equity fell 28 per cent during a day and closed the day 22 per cent down, the report knows about 22. Someone watching the account knew about 28. On daily bars this gap is usually modest; on weekly or monthly bars it can be large; in a fast decline it is at its largest exactly when it matters most.

Max. trade drawdown and Max. trade % drawdown

Section titled “Max. trade drawdown and Max. trade % drawdown”

These are the same idea applied to a single trade: the largest peak-to-valley decline experienced in any one trade, in currency and in percent. Metric strings "MaxTradeDrawdown" and "MaxTradeDrawdownPercent".

The percentage basis changed between engines and this trips people up. In the old backtester, Max. % trade drawdown was computed against total equity. In the modern portfolio backtester it is computed against the actual trade value at the entry point. The same trade reports very different percentages under the two engines, and a figure quoted from an old forum post is not comparable with yours.

Max. trade % drawdown is a close relative of MAE, the maximum adverse excursion shown per trade in the trade list, which is also expressed in percent. They are not the same statistic — MAE is per trade and appears as a column, this is the worst single value across all trades and appears as a report row — but they answer the same kind of question: how far against you did a position go before it resolved?

Reading the two together is informative. A system whose Max. trade % drawdown is large but whose Max. system % drawdown is small is telling you that individual positions went badly wrong and diversification or position sizing absorbed it. A system where the two are close is telling you that its trades move together, which is a concentration problem wearing a disguise.

Three ratios, three different denominators

Section titled “Three ratios, three different denominators”

Here is the group that causes the most confusion, laid out with one set of illustrative figures so the arithmetic is visible. These numbers are invented to make the relationships legible; they are not a result.

Assume a five-year test starting with 100,000:

Reported figure Value
Net Profit 62,000
Net Profit % 62.00
Annual Return % 10.13
Exposure % 62.0
Max. system drawdown 24,500
Max. system % drawdown −22.4

From those, the three ratios follow:

Ratio Definition Arithmetic Value Colour band
Recovery Factor Net Profit ÷ Max. system drawdown 62,000 ÷ 24,500 2.53 good (above 2)
CAR/MaxDD Annual Return % ÷ Max. system % drawdown 10.13 ÷ 22.4 0.45 bad (below 1)
RAR/MaxDD Risk Adjusted Return % ÷ Max. system % drawdown 16.34 ÷ 22.4 0.73 bad (below 1)

Two of those say the system is poor and one says it is good, from the same report. Nothing is broken. They measure different things:

  • Recovery Factor divides a total, non-annualised profit by a currency drawdown. Run the same system for ten years instead of five and Net Profit roughly doubles while the worst drawdown probably does not, so Recovery Factor roughly doubles too. It is not comparable across tests of different lengths, and it flatters long tests.
  • CAR/MaxDD divides an annualised percentage by a percentage. The length of the test is already handled by the annualisation, so it is far more portable. This is why it is AmiBroker’s default optimization target for walk-forward testing.
  • RAR/MaxDD divides the exposure-adjusted return by the same drawdown. Because RAR has already been divided by Exposure %, a system with tiny exposure produces an enormous RAR/MaxDD. It answers a different question, not a better version of the same one.

Max. system % drawdown is printed as a negative number, while CAR/MaxDD and RAR/MaxDD are colour-coded on thresholds of 1 and 2 and described as “good if greater than 2”. The magnitude of the drawdown is therefore what enters the ratio. Confirm the sign convention on your own report the first time you use these numbers rather than assuming it from this page.

CAR/MaxDD is AmiBroker’s version of what the wider industry calls the MAR ratio or the Calmar ratio. AmiBroker reports neither name, and the definitions used elsewhere differ in detail — Calmar is conventionally computed over a rolling three-year window, for instance. Do not write “Calmar 0.45” in your notes on the strength of an AmiBroker report.

Note also the spelling trap. The HTML report row reads CAR/MaxDD. The programmatic metric string, the optimization result-list column and the walk-forward Optimization target drop-down all read CAR/MDD. Same number, two spellings, and typing the wrong one into the walk-forward target field simply does not match anything.

Ulcer Index is defined as the square root of the sum of squared drawdowns divided by the number of bars. Metric string "UlcerIndex". Lower is better, and it is not colour-coded.

The squaring and the per-bar averaging are what make it interesting: it responds to how long the account spent underwater as well as to how far down it went. Two five-bar sequences of percentage drawdown make the point:

Bar Series A Series B
1 0 0
2 −5 −10
3 −10 0
4 −4 0
5 0 0

Both have a worst drawdown of −10. Series A gives (0 + 25 + 100 + 16 + 0) ÷ 5 = 28.2, and the square root of that is 5.31. Series B gives (0 + 100 + 0 + 0 + 0) ÷ 5 = 20, whose square root is 4.47. Identical maximum drawdown, different Ulcer Index, because A stayed down for three bars and B for one.

Ulcer Performance Index is defined as (Annual profit − Treasury notes profit) ÷ Ulcer Index. Metric string "UlcerPerformanceIndex"; the settings dialog abbreviates it to UPI. Using the figures above with the default rate of 5.4:

UPI = ( 10.13 − 5.4 ) / 5.31 = 0.89

Because a rate is subtracted from the numerator, UPI can be negative for a system that made money. A profitable system that earned less than the assumed rate has a negative UPI, which is a statement about the comparison, not a sign that the system lost.

Both metric pages still say the Treasury-notes figure is “hardcoded at 5.4” and that “in a future version, there will be a user setting for this”. That version has arrived: the setting is not absent — Settings → Report contains Risk-free rates, with two editable fields, and the description does not reflect that.

  • The field labelled UPI: defaults to 5.4 and feeds Ulcer Performance Index.
  • The field labelled Risk-free rate for Sharpe ratio: is not used here — it defaults to 5 and feeds Sharpe Ratio of trades only.

Change either and the corresponding metric moves. Two reports produced on machines with different values there are not comparable, and nothing on the report says so.

The thing the report does not measure: how long

Section titled “The thing the report does not measure: how long”

Search the documented metric list for a drawdown duration and you will not find one. AmiBroker reports how deep the worst decline was, in currency and in percent, and how deep the worst single trade went. It does not report how many bars the account spent below a previous peak, how long the longest such stretch was, or how long the worst drawdown took to recover.

That is a real gap, because depth and duration are experienced completely differently:

  • A 25 per cent decline that recovers in four months is a bad quarter.
  • A 25 per cent decline that takes four years to recover is most of a decade of your investing life in which the strategy gave you nothing, while asking you to keep taking every signal it generated.

Those two produce an identical Max. system % drawdown. They produce a different Ulcer Index, which is the only built-in metric that responds to duration at all, and it does so implicitly rather than in units anyone can act on.

To get the duration you have to compute it. The last lesson in this part builds a formula that reads portfolio equity from the special ~~~EQUITY symbol after a backtest and reports both the deepest decline and the longest stretch spent below a previous peak.

Max. system drawdown and Max. system % drawdown measure the worst peak-to-valley decline in portfolio equity, on close prices only, with the percentage reported negative. Max. trade drawdown does the same for a single trade, with the modern engine basing the percentage on the trade’s entry value. Recovery Factor divides total profit by the currency drawdown; CAR/MaxDD and RAR/MaxDD divide annualised returns by the percentage drawdown; and the first of those flatters long tests while the last flatters low-exposure ones. Ulcer Index and Ulcer Performance Index bring duration in indirectly, and depend on a rate setting that the documentation still describes as fixed.

And the report is silent on how long you would have had to wait. That silence is the subject the final lesson picks up.

Check your understanding

Question 1. A report shows Net Profit 40,000, Max. system drawdown 16,000 and Max. system % drawdown −20.0, with Annual Return % of 9.0. What is Recovery Factor?
Show the answer and why

Answer: 2.50

Recovery Factor is Net Profit divided by Max. system drawdown — the currency figure, not the percentage one: 40,000 / 16,000 = 2.50. Dividing Annual Return % of 9.0 by the percentage drawdown of 20.0 gives 0.45, which is CAR/MaxDD, a different number answering a different question.

Question 2. Two systems have identical Max. system % drawdown but very different Ulcer Index values. What does that most likely indicate?
Show the answer and why

Answer: One spent much longer below its previous peaks than the other

Ulcer Index is the square root of the sum of squared drawdowns divided by the number of bars, so it accumulates every bar spent underwater rather than recording only the worst point. The same worst decline held for longer produces a larger Ulcer Index. That is precisely the dimension the maximum drawdown figure discards.

Question 3. Which statements about drawdown reporting are correct? Select all that apply.
Show the answer and why

Answer: The modern portfolio backtester computes system drawdown from close prices only, regardless of settings, Max. trade % drawdown is based on the trade’s entry value in the modern backtester, Max. system % drawdown includes unrealised losses on open positions

Close-only drawdown computation, the trade-entry-value basis for trade percentages, and the inclusion of unrealised losses through portfolio equity are all documented. There is no drawdown duration metric anywhere in the report; Ulcer Index responds to duration implicitly but does not report it in bars or days.

Question 4. A system optimised on RAR/MaxDD returns a parameter set that trades roughly six times per decade. Why is that outcome predictable?
Show the answer and why

Answer: Because RAR is Annual Return % divided by Exposure %, so a nearly-flat system with tiny exposure produces a very large ratio

RAR is already exposure-adjusted, so dividing by a very small Exposure % inflates it, and dividing that inflated figure by the drawdown inflates RAR/MaxDD further. A system that is in the market almost never scores enormously well on it. CAR/MaxDD, which uses the unadjusted annual return, does not have this failure mode, which is one reason it is the default walk-forward optimization target.

Sources for this lesson

4 verified · checked 2026-08-31

  1. 01AmiBroker User's Guide — System test report window§ New backtester reportamibroker.com/guide/w_report.html2026-08-31
  2. 02AmiBroker User's Guide — Portfolio-level backtestingamibroker.com/guide/h_portfolio.html2026-08-31
  3. 03AmiBroker User's Guide — System test settings window§ Report tabamibroker.com/guide/w_settings.html2026-08-31
  4. 04AmiBroker User's Guide — Portfolio Backtester Interface Reference§ Stats object metric namesamibroker.com/guide/a_custombacktest.html2026-08-31

Every technical claim on this page was checked against the official AmiBroker documentation on the date shown. Where the course disagrees with folklore, the source is how you can tell which one to trust.