Skip to content
TraderCalcs.io

Optimal F Calculator

Find the fixed fraction of capital that maximises geometric growth for a set of trade results you enter.

Optimal f is the fixed fraction of an account that would have grown a specific list of trade results fastest — fixed fractional position sizing fitted to one record rather than to a rule of thumb. It is Ralph Vince's reformulation of the fraction the Kelly criterion finds for a two-outcome bet, computed from the actual results instead of from a win rate and a payoff ratio, which means this Optimal F Calculator uses the whole distribution, including the single loss that does not fit the average.

Formula: maximises the geometric mean of (1 + f x return) across every trade

Your figures

Trade results

The profit or loss of each closed trade, net of costs, with losses entered as negative amounts. At least one loss is needed: it is the loss that sets the scale. Blank rows are skipped.

Trade 1
Trade 2
Trade 3
Trade 4
Trade 5
Trade 6

Optional — turns the fraction into a cash amount per trade and an ending balance for the series.

Results

Optimal f

19.77%

of the account on each trade — US$4,943.01 at the balance entered

Half optimal fHalf the fraction. The two drawdown figures below are the reason it is the more commonly traded of the two.
9.89%
Worst drawdown at optimal fTrading these results in the order entered. Reordering them changes this figure; it does not change the growth figures.
25.26%
Worst drawdown at half optimal fThe same sequence at half the fraction.
12.70%
Growth over the series at optimal fTerminal wealth relative: the multiple of the account after every result has been traded at that fraction.
1.120x
Growth over the series at half optimal fWhat the dilution costs in growth, against what it saves in drawdown above.
1.090x
Growth per tradeThe geometric mean holding period return at optimal f. Below 1.0000 the account shrinks across the series.
1.0191
Risked on each trade at optimal fThe fraction applied to the balance entered.
US$4,943.01
Ending balance at optimal fThe balance entered, multiplied by the growth above.
US$28,010.92
Largest loss in the seriesThe whole scale rests on this one trade: f is the share of the account risked against a loss of exactly this size.
US$420.00
Trades counted3 winning, 3 losing
6

What this means

Expressed in units of the US$420.00 worst loss, these 6 results grow fastest when 19.77% of the account is risked on each trade: the series compounds to 1.120x at that fraction, a growth factor of 1.0191 per trade. Getting there costs a worst decline of 25.26% along the way. Half that fraction compounds to 1.090x with a worst decline of 12.70% instead, which is the trade the figure is usually diluted for. Optimal f maximises the geometric growth of this exact sample and says nothing about how much of it should be risked.

  • The fraction is anchored entirely to the largest loss entered. A future loss larger than any of these makes it too large, and the two sides of optimal f are not symmetrical: trading above it compounds negatively, where trading below it only grows more slowly.
  • The drawdown figures depend on the order the results are entered. The growth figures do not — the same results in any order give the same terminal wealth relative.
  • Each result is treated as one trade at one unit of size. If the results came from positions of different sizes, scale them to a common size first, or the fraction describes a mixture rather than a strategy.
  • A short record produces a precise-looking fraction from very little evidence. One more losing trade, larger than any so far, moves the answer a long way.
  • Enter results net of commission, spread and financing. Nothing is deducted here.

Optimal f: 19.77%

The link reopens this calculator with the same numbers. Nothing you enter is sent to a server.

About the Optimal F calculation

The mechanism is a rescaling. Every result is divided by the largest loss in the series, so the worst trade becomes exactly −1 and every other trade is measured against it. Risking a fraction f of the balance against that worst loss then turns each trade into a multiplier on the account, and the fraction that maximises the product of those multipliers is optimal f. It has no closed form, so this optimal fraction calculator searches for it numerically.

Alongside the fraction, the page reports the growth it produced over the entered series, the growth per trade, and the worst peak-to-trough decline suffered getting there — and then the same three figures at half the fraction. That drawdown column is not a footnote. Geometric growth position sizing maximises compounding speed and nothing else, and the declines it accepts on the way are routinely large enough that the diluted fraction is what practitioners of the method actually trade.

Every result is typed in. Nothing is fetched from a broker, and the fraction describes the sample entered rather than any market, instrument or period beyond it.

Optimal F formula

scale each result by the largest loss in the series:
  x_i = result_i ÷ largest loss        (the worst trade → −1)

holding period return of trade i at fraction f:
  HPR_i = 1 + f × x_i

terminal wealth relative:
  TWR(f) = Π HPR_i = Π (1 + f × x_i)

optimal f = the f in (0, 1) that maximises TWR(f),
            found by maximising Σ ln(1 + f × x_i)

geometric mean per trade = TWR^(1 ÷ n)
cash risked per trade    = account balance × f
f
The fraction of the account risked on a single trade, between 0 and just under 1. At f = 1 the worst trade takes the account to exactly zero.
x_i
Trade i's result in units of the largest loss. A trade that made twice what the worst trade lost counts as +2, and the worst trade itself counts as −1.
HPR
Holding period return — the multiplier one trade applies to the account at that fraction. A loss of the worst size gives 1 − f.
TWR
Terminal wealth relative — the multiple of the starting balance after every result has been traded in turn at the same fraction.
Π
Product over every trade in the series, the multiplicative counterpart of Σ. It is a product because an account compounds rather than accumulates.

Dividing every result by the largest loss is what turns f into a fraction of the account rather than a number of contracts. The worst trade maps to exactly −1, so risking f against it costs exactly f of the balance and no more. It also makes the answer scale-free: the same record kept in dollars, in pounds or in R multiples produces the same fraction, because multiplying every result by a constant leaves each x_i unchanged.

The quantity being maximised is a product, not a sum, and that distinction is the entire reason the method exists. An account that loses 50% and then gains 50% has averaged zero and is worth 0.75 of what it started with. Arithmetic averages get that wrong and geometric ones do not, so optimal f maximises the compounded outcome rather than the expected one — which is also why a series with a positive average result can still have an optimal fraction of zero.

There is no closed form to solve. Optimal f is a root of a polynomial whose degree is the number of trades, so it is found by searching: a coarse pass over 200 points, then four rounds of narrowing the bracket and subdividing, which lands within about a millionth of the peak. The search works on the sum of logarithms rather than the product, both because a long series with large payoffs overflows a double before the search finishes and because the logarithm is monotonic, so the f that maximises the sum is the f that maximises the product.

The two sides of the peak are not equally wrong, and this is the fact that governs how the output should be read. Below optimal f the account simply grows more slowly. Above it, growth falls away steeply, and beyond roughly twice the fraction it turns negative despite an entirely unchanged edge. Since the fraction is estimated from a sample, and any finite sample understates the worst loss still to come, the error that a record is most likely to produce is the one the arithmetic punishes hardest.

Half optimal f is reported for that reason rather than as a convention. The growth curve is flat near its peak while the drawdown curve is not, so halving the fraction gives up a modest amount of compounding and removes a great deal of the decline — and it leaves room for the sample's worst loss to have been too small.

Optimal F: a worked example

Six closed trades of +$900, −$500, +$400, −$250, +$700 and −$500, entered in that order against a $20,000 account.

  1. Largest loss$500 — the scale for everything else
  2. Results in units of that loss+1.8, −1.0, +0.8, −0.5, +1.4, −1.0
  3. Optimal f found by search0.2075, or 20.75% of the account
  4. Holding period returns at f = 0.20751.3735, 0.7925, 1.1660, 0.8963, 1.2905, 0.7925
  5. Terminal wealth relativetheir product = 1.163x
  6. Growth per trade1.163^(1 ÷ 6) = 1.0255
  7. Cash risked per trade20,000 × 0.2075 = $4,149.82
  8. Ending balance20,000 × 1.163 = $23,267.14
  9. Worst drawdown at optimal f20.75%
  10. Half optimal f10.37%, growth 1.121x, worst drawdown 10.37%

$20,000 compounds to $23,267.14 across the six trades when 20.75% of the balance is risked on each, a growth factor of 1.0255 per trade. Getting there costs a 20.75% decline — the same figure as f, because a single worst-sized loss taken from a peak costs exactly the fraction risked. Halving the fraction still compounds the series to 1.121x while halving the worst decline to 10.37%, which is the exchange the diluted figure exists to make.

How to use the Optimal F calculator

  1. Enter each closed trade's profit or loss net of costs, with losses as negative amounts. Blank rows are skipped, so a partly filled list still returns an answer.
  2. Include at least one losing trade. It is the loss that sets the scale, and a series without one has no anchor at all — the calculator rejects it rather than answering "risk everything".
  3. Make sure the results came from positions of a comparable size, or scale them to a common size first. A mixture of sizes produces a fraction that describes the mixture rather than the strategy.
  4. Add the account balance to turn the fraction into cash per trade and the series into an ending balance. It is optional and changes none of the growth figures.
  5. Read the drawdown next to the fraction, and read the half-f row next to both. The three together are the actual output; the fraction on its own is half a sentence.
  6. Add the worst loss you think is plausible but have not yet had as an extra row, and recalculate. How far the fraction moves is a direct measurement of how much of it rests on one trade.

Limitations of the Optimal F calculator

Every calculation makes assumptions. These are the ones that matter here.

  • The whole scale rests on the single largest loss entered. One future loss bigger than any in the sample makes the fraction too large, and too large is the direction that compounds against the account rather than merely slowing it down.
  • The drawdown figures depend on the order the results are entered; the growth figures do not. The same six trades shuffled give an identical terminal wealth relative and a different worst decline, so treat the drawdown as one plausible path rather than the path.
  • A short record produces a precise-looking fraction from very little evidence. Twenty trades is a handful of coin flips, and the peak of the growth curve shifts a long way when one of them changes.
  • The answer assumes the next trades are drawn from the same distribution as the entered ones. A strategy whose behaviour changes invalidates the fraction silently, because the calculation has no way to notice.
  • Each result is treated as one trade at one unit of size, with no allowance for overlapping positions. Two trades held simultaneously are exposed together and are not two independent applications of the fraction.
  • Nothing is deducted for commission, spread, slippage or financing. Enter the results net of them, or the fraction has been fitted to a gross series that no account produced.

Frequently asked questions about Optimal F

How is optimal f different from the Kelly criterion?

Ralph Vince's optimal f and the Kelly criterion maximise the same thing — expected logarithmic growth — from different inputs. Kelly's formula assumes two outcomes of known size and takes a win rate and a payoff ratio. Optimal f takes the actual list of results, so it accounts for the spread of outcome sizes and, crucially, for the one loss much larger than the others. Where results really are two-valued the two agree.

Why is the fraction so much larger than the 1% or 2% usually risked per trade?

Because it optimises growth alone and treats the sample's worst loss as the worst loss there is. A fraction above 20% is entirely typical of this method, and so are drawdowns of 40% or more at that fraction. The gap between it and conventional per-trade risk is not a mistake in either figure; they are answers to different questions, one about compounding speed and one about tolerance.

The calculator says the optimal fraction is zero. What does that mean?

That no fixed fraction above zero finishes the entered series with more than it started. The losses are large enough relative to the wins that compounding any share of the account against them shrinks it, so the growth-maximising fraction is none of it. It is a statement about the results entered and about geometric growth, not a prediction about the next trade.

Does the order of my trades change the answer?

It changes the drawdown and nothing else. Multiplication is commutative, so the terminal wealth relative, the growth per trade and the fraction itself are identical whatever order the results are entered in. The worst peak-to-trough decline is path-dependent, which is exactly why entering the real order matters for that figure alone.

What is terminal wealth relative?

The multiple of the account after every trade in the series has been taken at the same fraction. A TWR of 1.163 means the balance finished 16.3% higher than it started; a TWR below 1 means the series lost money at that fraction. It is the product of the per-trade multipliers, which is why it is reported alongside the geometric mean per trade rather than instead of it.

Why does the page report half optimal f so prominently?

Because the growth curve is flat near its peak and the drawdown curve is steep, so halving the fraction costs relatively little compounding and removes a large share of the decline. It also builds in tolerance for the estimate being wrong in the direction it is most likely to be wrong, which is a sample that has not yet contained its worst loss.

Last reviewed . See our methodology and editorial policy.

More performance calculators