VALYNOXSTRATEGY RESEARCH TECHNOLOGY
AlphaPrimeAlphaPrime
ACADEMY / Backtesting and validation

Futures risk indicator: calculation and drawdown sizing

The risk indicator is account equity divided by the initial margin of your open positions, and a margin call starts when equity falls below the total maintenance margin. Size the account so that a loss larger than the worst backtest drawdown still leaves the ratio above the floor you choose.

By · Published · updated · Editorial policy

Contents
  1. What is the risk indicator (風險指標) on a futures account?
  2. How do you calculate the futures risk indicator?
  3. Why does the risk indicator fall?
  4. Which backtest numbers measure the same risk?
  5. Max drawdown
  6. Ulcer index
  7. Longest losing streak
  8. How do you link the worst backtest drawdown to the margin ratio?
  9. Why can't a backtest show the worst future drawdown?
  10. Frequently asked questions
  11. References

What is the risk indicator (風險指標) on a futures account?

A futures account's risk indicator (風險指標) is account equity divided by the initial margin your open positions require, shown as a percentage. A margin call starts when equity falls below the total maintenance margin. Check the exact definition and trigger levels on your broker's statement. A backtest's worst drawdown helps you size the account to stay above that level.

Think of the risk indicator as a fuel gauge for your margin. A full tank means a thick cushion. A needle near empty means the broker will soon ask for more money.

Three terms carry the whole idea. Equity (權益數) is the cash in the account plus or minus the open profit or loss of your positions, valued at the current market price. Maintenance margin is the minimum equity per contract that the exchange and your broker require while a position stays open. Initial margin is the larger amount per contract you need to open a new position.

One bar for a single contract in a hypothetical account. Maintenance margin is the lowest mark, initial margin is higher, and equity is at the top. The gap between equity and maintenance margin is the cushion before a margin call. How thick is your cushion? One contract, hypothetical account Cushion Equity Initial margin Maintenance margin Cushion = equity above maintenance. Below it, a margin call starts.
Equity, initial margin and maintenance margin per contract shown as three levels on one bar. The gap between equity and maintenance margin is the cushion before a margin call.

How do you calculate the futures risk indicator?

The calculation is one division: equity divided by the total initial margin of all open positions, times 100%.

Risk indicator = equity ÷ total initial margin × 100%

Here "equity" is the value described above, including open profit and loss. "Total initial margin" is the initial margin per contract times the number of contracts, added up over all open positions. A result of 100% means equity equals the initial margin needed to open those positions. Maintenance margin is lower than initial margin, so the margin call starts below 100%, at the point where equity falls under the total maintenance margin. For example, if maintenance margin were 75% of initial margin, that point would be a risk indicator of 75%.

Some platforms instead show a version based on maintenance margin, where 100% means equity has fallen exactly to the maintenance level. Accounts that hold options also add or subtract option values. Your broker's statement shows which version it uses and the levels that trigger a margin call or forced liquidation (代為沖銷). Exchanges adjust margin levels, for example when volatility rises, so the exchange's contract or margin page is the final word on current values. The TAIEX futures margin calculator shows per-contract margin for TAIEX, Mini-TAIEX and Micro-TAIEX futures.

Hypothetical example

You hold one contract with an initial margin of 100,000 and a maintenance margin of 75,000. Your equity is 300,000, so the risk indicator is 300,000 ÷ 100,000 × 100% = 300%. The market moves against you and the open loss reaches 90,000. Equity is now 210,000 and the ratio is 210%. If the open loss reaches 225,000, equity is 75,000 and the ratio is 75%. At that point equity equals the maintenance margin, and any further loss brings a margin call.

Risk indicator scale for a hypothetical account: it starts at 300 percent, falls 90 points to 210 percent after an open loss, passes 100 percent at the initial margin, and a margin call starts below 75 percent at the maintenance margin Where the margin call starts Risk indicator, hypothetical account Loss −90 pts 300% 210% 100% 75% Start After loss Initial margin Maintenance Margin call below A call starts below 75%, not 100%. So: check your broker's trigger level.
Hypothetical account: equity on top, initial margin below, and the maintenance level where a margin call starts.

Why does the risk indicator fall?

The ratio falls for two reasons: the top number (equity) shrinks, or the bottom number (margin) grows.

What happensPart of the ratio that changesEffect on the risk indicator
Open loss on a position growsEquity goes downFalls
A losing trade is closed, or you withdraw cashEquity goes downFalls
The exchange raises initial and maintenance marginMargin goes upFalls, even with no price change
You add contractsMargin goes upFalls
You close contractsMargin goes downRises

The dangerous case is two causes at once. A sharp market move creates open losses. The same volatility often leads the exchange to raise margin. The numerator falls and the denominator rises in the same week. The article on futures margin by broker and backtest account size covers how margin levels affect account size.

Hypothetical path of a risk indicator: open losses lower it gradually from 300 percent, then a margin raise drops it in one step, moving it closer to the 75 percent margin call level Two ways the ratio falls Risk indicator over time, hypothetical 300% 75% Margin call level Open losses Margin raise A margin raise cuts it in one day. So: keep room for higher margin.
Hypothetical path of a risk indicator. Losses lower it gradually; a margin raise lowers it in one step on the day the new margin applies.

Which backtest numbers measure the same risk?

Max drawdown, ulcer index and longest losing streak describe the same danger as the risk indicator, but in history instead of live. The risk indicator tells you where you stand today. These three tell you how deep, how long and how fast equity has fallen in the past.

Max drawdown

Max drawdown is the largest fall of the equity curve from a previous peak to a later low. Read it in money per contract, not only as a percentage. A percentage depends on the starting capital the backtest assumed, and that number is often arbitrary. Money per contract can be compared directly with margin per contract. The drawdown calculator finds the maximum drawdown and the recovery time from any equity series.

Check how the drawdown was measured. A drawdown built from closed trades only can miss the low point inside a trade. Your broker values open positions during the trade, so the drawdown that includes open profit and loss bar by bar is the one that matches the risk indicator.

Ulcer index

The ulcer index is a measure that combines how deep and how long equity stays below its previous peak. In plain words, it averages how far below the previous peak equity sits on every bar, and it weights deep falls more heavily than shallow ones. Two strategies can share the same max drawdown. One recovers in a week. The other stays underwater for a year. Max drawdown treats them the same. The ulcer index gives the second one a much higher value. Like a percentage drawdown, it depends on the starting capital, so compare strategies at the same capital.

Longest losing streak

The longest losing streak is the largest number of losing trades in a row. Count the money lost during the streak as well as the number of trades. Losses in a streak arrive back to back, with no winning trade to restore equity in between. That makes the streak a direct test of whether the cushion above maintenance margin is thick enough.

An equity curve falls from a peak and stays below it for a long time. Max drawdown marks only the single deepest point, while the ulcer index summarises the whole shaded area of time spent below the previous peak. Deepest point or whole fall? Equity curve, shaded below the peak Ulcer index Max drawdown One depth can hide a long time down. So: read ulcer index with drawdown.
Max drawdown marks the single deepest point. The ulcer index summarises the whole time spent below the previous peak.
MeasureWhat it tells youBest unit for margin planning
Risk indicatorEquity compared with the margin of your open positions right nowPercent
Max drawdownDeepest past fall from a peakMoney per contract
Ulcer indexDepth and duration of past falls togetherIndex value at a fixed starting capital
Longest losing streakHow many losses can arrive in a rowNumber of trades and money lost

Size the account so that, at a loss larger than the worst backtest drawdown, the risk indicator still stays above a floor you choose in advance. The steps are:

  1. Get an honest worst drawdown. Run the backtest with commission, slippage and realistic execution. AlphaPrime (Valynox) backtesting includes fees, slippage, next-bar execution and trading sessions in every evaluation. A drawdown without costs is too shallow.
  2. Scale it to your size. Multiply the worst drawdown per contract by the number of contracts you plan to trade.
  3. Add a buffer. Multiply by a factor such as 1.5 or 2, because the future can be worse than the past. The next section explains why.
  4. Choose a floor. Pick the lowest risk indicator you accept at that loss, comfortably above the level that triggers a margin call.
  5. Add them up. Required equity is the floor times total initial margin, plus the buffered drawdown.
  6. Test a margin raise. Repeat step 5 with margin raised, for example by 20%, and check the ratio again.

Hypothetical example

One contract has an initial margin of 100,000 and a maintenance margin of 75,000. The backtest's worst drawdown, with costs, is 150,000 per contract. With a buffer of 1.5, you plan for a loss of 225,000. You want the risk indicator to stay at or above 150% at that loss, which needs 1.5 × 100,000 = 150,000 of equity left. Required equity is 150,000 + 225,000 = 375,000, a starting risk indicator of 375%. If the exchange raises margin by 20%, initial margin becomes 120,000 and maintenance margin 90,000. The same planned loss leaves 150,000 ÷ 120,000 = 125%. Equity of 150,000 is still above the 90,000 maintenance margin, but the cushion is thinner.

Hypothetical account sizing for one contract, in multiples of initial margin: a margin floor of 1.5 times, plus the worst backtest loss of 1.5 times, plus a buffer of 0.75 times, adds up to a required account of 3.75 times the initial margin Plan for the loss, not margin One contract, in multiples of margin 1.5× 1.5× 0.75× Floor Worst loss Buffer Account needs 3.75× margin Floor + buffered loss = account. So: hold 3.75× margin, not just 1×.
Hypothetical account sizing: the margin floor you want to keep, plus a drawdown larger than the worst one in the backtest.

Do the same check with the losing streak. Take the money lost in the longest streak, apply the same buffer, and confirm the ratio stays above your floor. If the streak loss is larger than the max drawdown in your sizing, use the larger number.

Why can't a backtest show the worst future drawdown?

A backtest shows the worst drawdown of one past path, and the future is a different path. Think of the highest flood mark on a river bank. You build your house above it, but nothing stops the next flood from rising higher. Since the future is another path, the Monte Carlo simulator can draw many alternative paths from your own trade results and show how much deeper a drawdown may run than the backtest's one.

  • One path only. The same trades in a different order can produce a deeper drawdown. Reshuffling your trade list, as in Monte Carlo simulation in Excel, shows a range of drawdowns instead of one number.
  • More time, more chances. Max drawdown is a single worst event. The longer you trade, the more chances a worse event has to appear.
  • Selection makes it look better. When you pick the best of many tested variants, part of its good result is luck, so its performance tends to be weaker on new data (Bailey et al., 2014), and its drawdown can be deeper than the backtest shows. Harvey and Liu (2015) argue that backtest results should be discounted for the number of tests behind them.
  • Conditions change. Volatility, liquidity and margin levels in the future may differ from the backtest period.

The practical answer is the buffer in step 3, plus a rule decided in advance: if live drawdown passes the backtest's worst drawdown, reduce size or stop and review the strategy.

What this means if you use AlphaPrime: read the equity, drawdown and trades of a strategy in the Performance Report from a backtest that includes fees and slippage, take the worst drawdown and losing streak in money per contract, and size the account so the risk indicator stays above your floor at a larger loss than either.

Frequently asked questions

How is the futures risk indicator (期貨風險指標) calculated?

Divide account equity, including open profit and loss, by the total initial margin of your open positions, and multiply by 100%. For example, equity three times the initial margin gives a risk indicator of 300%. Some platforms use maintenance margin in the denominator or add option values, so check the definition on your broker's statement.

At what risk indicator level do you get a margin call?

The broker issues a margin call when equity falls below the total maintenance margin. With the common definition (equity ÷ initial margin), that happens below 100%, at the ratio of maintenance margin to initial margin, so check the exact level on your broker's statement. If the ratio keeps falling to the level set by the exchange rules and your broker agreement, the broker can close positions for you.

Can a backtest tell me how much money my futures account needs?

A backtest gives you the worst past drawdown and losing streak, which are the starting points for sizing. Add margin at a floor you choose, plus a buffer above the worst drawdown, because the future can be worse than the backtest. Recheck the result with higher margin.

What is the difference between max drawdown and the ulcer index?

Max drawdown is the single deepest fall from a peak. The ulcer index combines how deep and how long equity stays below its peak. Two strategies with the same max drawdown can have very different ulcer index values if one recovers quickly and the other stays underwater for months.

References

  • Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5), 458–471.
  • Harvey, C. R., & Liu, Y. (2015). Backtesting. The Journal of Portfolio Management, 42(1), 13–28.