TradingView Backtesting

Burke Ratio: Multiple Drawdowns and Sampling Conventions

The Burke ratio divides excess return by the square root of a sum of squared drawdown depths. This page uses one maximum percentage depth per peak-to-recovery episode, including the unfinished episode at the sample end. Modified Burke needs an explicit normalization count: dividing the squared-depth sum by all return observations differs from dividing it by the number of episodes. Neither operation replaces episode depths with every underwater observation.

See the decision guide

Define what counts as a drawdown

Start with positive, cash-flow-adjusted equity E0. At each observation t, set Pt = max(E0, E1, ..., Et) and underwater depth ut = 1 - Et/Pt. An episode begins when equity falls below its running peak and ends when equity reaches or exceeds that peak. Its depth Dj is the largest ut within that episode. A positive return that leaves equity below the peak does not start a new episode.

  • Use all episodes in the chosen window for this calculation. Selecting only the largest k episodes is a different specification; report k if that is the method you need to reproduce.
  • Include the deepest observed loss of an unfinished final episode and mark it unrecovered. Its eventual depth and recovery date remain unknown.
  • State whether a peak before the test window carries forward. Here E0 is the starting peak; there is no earlier history.
  • Consecutive negative-return runs are another possible segmentation. The inspected PerformanceAnalytics BurkeRatio source uses that approach, while its findDrawdowns function tracks underwater episodes. The calculation below follows the stated episode rule, not a claim of identical output from every function named BurkeRatio.

Separate the event count from the observation count

Write m for the number of drawdown episodes and N for the number of return observations. Let X = Rp - Rf, using the same return horizon and units for both terms. The PerformanceAnalytics documentation defines modified Burke using the full-series observation count. TraderWaves documents an episode mean-square version. Both carry the modified name, so the formula must accompany a comparison.

  • A symbol such as n does not identify the method by itself. Check its definition and the index of the sum. Using the number of losing months instead of N or m introduces a third count.
  • Dividing excess return by the Ulcer Index gives the Martin or Ulcer Performance Index convention. It generally differs from modified Burke because an episode can contribute many underwater observations.
  • The examples use decimal returns: 10% is 0.10. Consistent percentage-point inputs give the same ratios; mixing 20 with 0.20 produces a hundredfold error.
ConventionFormulaWhat enters the sum
Burke, all episodesX / sqrt(sum(Dj²))One depth for each j = 1, ..., m
Modified Burke, N normalizationX / sqrt(sum(Dj²) / N) = Burke × sqrt(N)The same m episode depths; divide by all N observations
Modified Burke, episode normalizationX / sqrt(sum(Dj²) / m) = Burke × sqrt(m)The same m depths; divide by the episode count
Ulcer Index denominatorsqrt(sum(ut²) / N)All N underwater observations, including zeros

Reconstruct three episodes from twelve month-end valuations

Assume a hypothetical one-year account starts at E0 = 100 currency units. These are twelve consecutive month-end valuations, including open-position values and all assumed costs. There are no deposits or withdrawals. Starting equity supplies the initial peak but is not a thirteenth return observation. The risk-free investment earns 3.5% over the same year.

  • Episode depths are 1 - 99/110 = 0.10, 1 - 96/120 = 0.20 and 1 - 117/130 = 0.10. The last depth is 10%, even though the year ends only 5% below its peak.
  • The month 3 and month 7 rebounds remain inside their existing episodes. Counting only consecutive negative months would split the path differently.
  • Portfolio return Rp = 123.5/100 - 1 = 0.235. Excess return X = 0.235 - 0.035 = 0.20. This is a full-year return, so no extrapolation is needed.
MonthEquityRunning peakUnderwater depthEpisode status
11101100%At high
29911010%Episode 1
3104.51105%Episode 1 continues
41101100%Episode 1 recovered
51201200%New high
69612020%Episode 2
710812010%Episode 2 continues
81201200%Episode 2 recovered
91301300%New high
10123.51305%Episode 3
1111713010%Episode 3 trough
12123.51305%Episode 3 unrecovered

Recalculate Burke and both modified conventions

The episode squared-depth sum is S = 0.10² + 0.20² + 0.10² = 0.06. Its square root is 0.244949. Using X = 0.20, m = 3 and N = 12 gives the following results. The episode denominator can exceed the 20% maximum drawdown because it aggregates separate events.

  • The underwater squared sum is 0.10² + 0.05² + 0.20² + 0.10² + 0.05² + 0.10² + 0.05² = 0.0775. It counts seven underwater months, whereas the Burke sum counts three episode maxima.
  • Discarding the unrecovered episode would reduce S to 0.05 and raise Burke to 0.8944 with the same numerator. That excludes an observed loss and answers a completed-episodes-only question.
  • A maximum-drawdown denominator would be 0.20 and give 1.0000 with this excess numerator. A conventional Calmar calculation using CAGR without risk-free subtraction instead gives 0.235/0.20 = 1.1750. Match both numerator and denominator before attributing a difference to risk.
  • Pain uses the average underwater depth rather than squared episode depths. In this example, the monthly average depth is 0.65/12 = 5.4167%; it does not reproduce the Burke denominator.
MeasureCalculationResult
Burke0.20 / sqrt(0.06)0.8165
Modified Burke, N = 120.20 / sqrt(0.06 / 12)2.8284
Modified Burke, m = 30.20 / sqrt(0.06 / 3)1.4142
Ulcer Index, monthly observationssqrt(0.0775 / 12)8.0364%
Martin ratio using the same excess return0.20 / sqrt(0.0775 / 12)2.4887

Sampling and annualization change the comparison

If the same account is observed only at months 4, 8 and 12, its sampled values are 110, 120 and 123.5. Each exceeds the previous sampled peak. The observed denominator becomes zero, even though the monthly path contains three drawdowns. Coarser sampling can miss both peaks and troughs; monthly results do not describe intramonth risk.

  • N normalization adds a separate frequency effect. If a finer grid doubles N while preserving the same episode depths and excess return, modified Burke rises by sqrt(2). This is a consequence of the definition, not improved performance.
  • For Y years with no external flows, an explicitly annualized numerator can use Rp = (Eend/Estart)^(1/Y) - 1 and a risk-free annual return on the same basis. State the day-count convention and the entire window used for drawdowns.
  • For a holding-period numerator, compound the risk-free investment over that same period. Do not subtract an annual yield from one monthly return. Compounding periodic excess returns is also generally different from subtracting separately compounded portfolio and risk-free returns.
  • The factor sqrt(N) defines this modified statistic; it is not a general annualization rule. Do not apply an additional Sharpe-style sqrt(12) or sqrt(252) multiplier to Burke.
  • Trade exits form an irregular event sample. Their count is neither the number of calendar months nor the number of drawdown episodes. Compare strategies on the same valuation grid, date range, leverage and cost assumptions.

Handle zero denominators and negative excess returns

No observed drawdown means S = 0. Report the ratio as undefined and show the return separately; do not turn a smooth or undersampled path into a finite performance score. Zero excess return divided by a positive denominator is zero, while 0/0 remains undefined.

  • With X = -0.02 and S = 0.06, Burke is -0.0816. Increasing S to 0.12 gives -0.0577, which is numerically higher despite a larger denominator. Ranking negative-excess strategies by this ratio alone can reward greater drawdown risk.
  • Reject an empty series, missing valuations and nonpositive equity for this positive-equity convention. Resolve cash flows before constructing the path; a withdrawal is not a trading drawdown.
  • Keep unrecovered status and recovery duration beside the score. Episode depth alone does not show how long the investor remained underwater, and normalizing by N does not restore that information.
  • There is no universal good Burke threshold across formulas, frequencies and windows. Evaluate frozen strategy rules on separate data and retain the equity path for review.

Audit TradingView exports before calculating Burke

TradingView exports each Strategy Report tab separately. The trade list and the performance summary contain different information. A list of exits cannot generally reconstruct every month-end account valuation, including open positions, needed by this example.

  • Backtest Deep Report accepts TradingView List of Trades CSV files. Its current equity calculation adds imported closed-trade net P&L to initial capital and places points at trade exits. Reconcile capital, record order and P&L before using that curve.
  • The current report includes maximum drawdown and Ulcer metrics but does not expose Burke or modified Burke. Calculate the chosen Burke formula independently from a suitable equity series; a per-trade MAE field is not an account drawdown episode.
  • Pine Script AI Coding Agent can help draft a custom statistic after you specify the sampling grid, episode rule, final unrecovered episode, return basis and normalization count. Review and validate the generated script, then compare its output with an independent calculation.
Where Pineify fits

Backtest Deep Report

Review imported TradingView trades and supported risk metrics. Calculate Burke separately after defining the required equity observations and episode rule.

Also useful: Pine Script AI Coding Agent. Draft a custom equity statistic with explicit conventions, then check its code and reconcile its results independently.

Review exported trades

Frequently asked questions

Educational information, not investment advice. All equity paths and numerical results on this page are hypothetical. Historical drawdown ratios do not establish future returns or loss limits.

Sources and verification

Published by Pineify. Pineify is an independent product and is not affiliated with TradingView. Sources support the technical explanations; examples do not establish trading performance.