DEV Community

Okeke Jenny
Okeke Jenny

Posted on

Size positions from a drawdown budget, not a percentage

Most position-size advice is expressed as a percentage of equity. That is a fine convention and a poor specification, because it never says what the percentage is for. A drawdown rule gives you a much better handle: it hands you a budget, and the interesting question is how many consecutive losses that budget has to survive.

The arithmetic

Risk a fixed fraction r of equity per trade. After N consecutive losses:

equity = start * (1 - r)^N
Enter fullscreen mode Exit fullscreen mode

Set that equal to the floor and solve for N:

N = ln(floor / start) / ln(1 - r)
Enter fullscreen mode Exit fullscreen mode

For a $50,000 account with a $2,500 drawdown, the floor is $47,500 and floor/start = 0.95:

Risk per trade After 5 losses After 10 losses After 15 losses Consecutive losses before the floor
0.5% $48,762 $47,556 $46,378 10.2
1.0% $47,550 $45,219 $43,003 5.1
1.5% $46,361 $42,987 $39,858 3.4
2.0% $45,196 $40,854 $36,928 2.5
3.0% $42,937 $36,871 $31,663 1.7

Read the last column as a specification, because that is what it is. At 2% risk you are betting that you will not lose three trades in a row. That is the entire risk statement, and it is much easier to argue with than "2% is a safe size."

The relationship is not linear either. Going from 1% to 2% does not halve your buffer — it cuts consecutive-loss tolerance from 5.1 to 2.5. The buffer is a logarithm of the risk fraction, so the second percent costs much more than the first.

Why the number is not 10

A buffer of 5.1 consecutive losses sounds comfortable. It is worth stating what it assumes, because the calculation above is deterministic and the world is not:

  • It assumes losses are independent and identical. Real losing runs are correlated. In a volatile regime, the correlation is exactly when it hurts.
  • It assumes you risk r of current equity, so each successive loss is slightly smaller. That is the more forgiving of the two conventions. If you size from a fixed notional instead, the arithmetic is linear and the buffer is shorter, not longer.
  • It counts consecutive losses only. A drawdown can also be produced by a sequence of smaller losses interleaved with wins, and a trailing floor rises while you do it — so the budget available late in an attempt is different from the budget available at the start.
  • It ignores the daily loss limit. If the rulebook has one, the binding constraint may be intraday and smaller than the overall drawdown. For a $50,000 account a common daily limit is $1,250, which at 1% risk is 2.5 losses in one day, not five in a row.

The code

Deterministic arithmetic, so the function is short enough to verify by hand:

const start = 50000, dd = 2500;
const floor = start - dd;                       // 47500

// equity multiplier after n consecutive losses at risk fraction r
const after = (r, n) => start * Math.pow(1 - r, n);

// how many consecutive losses until the floor is touched
const buffer = (r) => Math.log(floor / start) / Math.log(1 - r);

for (const r of [0.005, 0.01, 0.015, 0.02, 0.03]) {
  console.log(
    (r * 100).toFixed(1) + '%',
    'after 5:', after(r, 5).toFixed(0),
    'after 10:', after(r, 10).toFixed(0),
    'buffer:', buffer(r).toFixed(1)
  );
}
Enter fullscreen mode Exit fullscreen mode

Two things to notice about the implementation:

It is a binary search you should not write. There is no need to simulate. buffer(r) is closed-form, so the answer is exact and the "simulation" would only add sampling error to a quantity you can compute. Reach for a Monte Carlo when the quantity depends on the ordinal path; not when it is a logarithm.

The floor is an input, not an output. Notice that floor is derived from the rulebook, not from the amount you would like to risk. If you start from "I want to risk 2%" and then ask whether the account survives, you have the causality backwards. The budget fixes the risk; the risk does not fix the budget.

Turning the buffer into a trade size

The calculation above gives a fraction, not a lot size. To get from one to the other you need the instrument's value per point and the distance to your stop, which is a separate problem:

r * equity  =  size (in points) * value per point per contract
Enter fullscreen mode Exit fullscreen mode

For an index future with a known point value, size = (r * equity) / (stop_distance * point_value). The drawdown budget tells you the maximum r; the stop distance and point value tell you how to express that as contracts. If you find yourself choosing between two sizes that differ by more than the granularity of the contract, you are no longer sizing from the budget — you are rounding, and the rounding is the decision.

This is the part that most sizing calculators get wrong in practice: they accept an account size and a risk percentage, produce a lot size, and never mention that the drawdown rule is what should have set the percentage in the first place.

What I would actually do with this

  1. Compute the buffer for your rulebook before your first trade. Three numbers — account size, drawdown, risk fraction — and one logarithm.
  2. State the assumption out loud. "2% risk means I am betting against three consecutive losses" is a falsifiable claim. "2% is conservative" is not.
  3. Check which constraint binds first. If the daily limit is $1,250 and your overall drawdown is $2,500, the daily rule may be the binding one, and sizing to the overall drawdown will overstate your real buffer by a factor of two.
  4. Prefer the convention that makes the arithmetic conservative. Sizing from current equity is more forgiving than sizing from a fixed notional. If you are unsure which one a platform or tool uses, assume the stricter.

Where this model is wrong

  • It is deterministic by construction. This is not a criticism of the result — it is a warning against adding simulation to it and gaining only noise.
  • Independence of losses is assumed and is false. The buffer column is a necessary condition, not a sufficient one.
  • The floor is treated as fixed. Under a trailing rule the floor rises with the peak, so your buffer is not constant over the life of the account — it shrinks as you get closer to the target, which is the opposite of what most traders assume.
  • The daily limit is handled as an aside. It should be a separate budget with its own buffer, and the binding constraint is whichever is smaller.

The useful reframing is that a drawdown rule is not a limit you bump into. It is a budget you spend, and the risk per trade is the rate at which you spend it. Expressing size as "how many consecutive losses can this survive" turns an intuition into an assertion you can check against your actual loss distribution.

If the constraint that matters most in your rulebook is the daily one rather than the overall drawdown, how daily drawdown is enforced goes through the different measurement conventions — from balance or from equity, reset at midnight or at the first trade — which change the buffer by more than the risk fraction does.

Top comments (0)