Tools › Investing › Portfolio and Risk › Position Size and Risk › Method
Position Size and Risk: Method
Open the Position Size and Risk tool
Position Size and Risk: How It Works
What it does
The page answers one question: how many shares make a trade lose a chosen amount of money if it is closed at its stop? It starts from the money you are prepared to lose on one trade, divides by the loss on one share, and reports the number of shares, what the position is worth and how large it is beside the account. With a target price and a win rate it adds the reward-to-risk ratio, the win rate at which that ratio breaks even and the average result per trade. Advanced mode then looks at a run of such trades: the chance of a chosen fall in the account, the longest losing streak, and the Kelly fraction as a reference point. Every step is printed as formula, numbers put in, answer. The page describes what a set of choices implies; it does not say which choices to make.
The method
Symbols. A0 is the account size; rf the risk per trade as a fraction of the account (1 % is 0.01); Pin, Pst and Ptg the entry, stop and target prices per share; pw the win rate, the fraction of trades that reach the target before the stop, and q = 1 − pw.
Money at risk. Rm = A0 rf is what the account loses if the trade is closed at the stop.
Risk per share. A stop is the price at which the position is closed to limit the loss. For a long position (bought first) the loss per share at the stop is Lsh = Pin − Pst; for a short position (sold first) it is Pst − Pin.
Shares. Nsh = Rm / Lsh, rounded down to a whole share so that the loss at the stop, Nsh Lsh, stays within Rm.
Position value. Vpos = Nsh Pin, and its share of the account is Vpos / A0. This is not the same thing as the risk: a position can be 16 % of the account while 1 % of the account is at risk. A stop close to the entry gives a large position for the same risk, and the page notes when the position passes the whole account (it would need borrowed money) or a maximum of your own.
Reward to risk. The gain per share at the target is Gsh = Ptg − Pin (long) and the reward-to-risk ratio is RR = Gsh / Lsh.
Break-even win rate. Over many trades a fraction p wins RR units and the rest lose one unit each. The gains and losses cancel when p RR = 1 − p, so p = 1 / (1 + RR).
Expectancy. The average result per trade: X = pw Nsh Gsh − (1 − pw) Nsh Lsh in money, or pw RR − (1 − pw) as a multiple of the loss at the stop.
Advanced: stop from volatility. The average true range (ATR) is the average over recent days, often 14, of each day's true range: the largest of the day's high less its low, the high less the previous close and the previous close less the low. The stop is placed na average true ranges from the entry: Pst = Pin − na ATR for a long position, Pin + na ATR for a short one.
Advanced: costs. A commission c1 and a slippage allowance s1 per share are counted on the way in and on the way out, crt = 2 (c1 + s1). They are added to the loss per share and taken off the gain per share.
Advanced: a run of trades. The model is a sequence of T independent trades. Each risks the same money Rm, wins b Rm with probability pw and loses Rm with probability q. The payoff ratio b is the reward-to-risk ratio of the trade unless another is entered.
Chance of a fall. The account is said to fall by a fraction D when it is D A0 below its starting value at any point in the run. In units of Rm that is k = D / rf losses, net of wins. The page estimates the chance by a Monte Carlo simulation: 20,000 runs are drawn with a seeded random-number generator and the runs that touch the level are counted. The estimate P has a standard error of √(P (1 − P) / 20,000). When b = 1 the problem is the classic gambler's ruin and has closed forms. With m the whole number of net losses that reaches the level, the chance of ever reaching it with unlimited trades is (q / p)m for p above one half and 1 otherwise; within T trades it is the sum, over n = m, m + 2, … up to T, of (m / n) C(n, (n + m) / 2) q(n + m) / 2 p(n − m) / 2, where C is the binomial coefficient.
Longest losing streak. For each length L the page follows, trade by trade, the probability that the current run of losses has length 0, 1, … L − 1 and that no run of L has yet happened. After T trades what is left is the chance of no streak of L, and one minus it is the chance that the longest streak is L or longer.
Kelly fraction. f = p − q / b is the fraction of the account risked per trade that maximises the expected logarithm of the account, and so its long-run growth rate, when p and b are known.
What it assumes
The trade is closed exactly at the stop or exactly at the target, with nothing in between. Whole shares only. In Simple mode there are no costs. In the run of trades every trade has the same win rate and payoff, no trade depends on any other, and the money risked is the same on every trade: the account is not re-measured after each one. Re-measuring would shrink the losses as the account falls, so the fixed amount gives a somewhat higher chance of a given fall.
When it misleads
A stop is not a guarantee. When the price gaps past the stop, for instance overnight or on news, the position is closed at the next available price and the loss is larger than the money at risk. The page's loss is the loss at the stop price, not a ceiling.
The win rate is a guess. The expectancy, the chance of a fall and the Kelly fraction all follow from the win rate and payoff entered. A record of past trades gives an estimate, usually from a small sample, and the future need not repeat it. A win rate a few points lower can turn a positive expectancy negative; Figure 1 shows how close the entered rate is to break-even.
Trades are not independent. Positions held at the same time often lose together, and losses cluster in some market conditions. Real losing streaks and falls can therefore be longer and deeper than the model gives.
The simulation has its own error. A Monte Carlo figure is an estimate; the standard error printed beside it says how far it may be from the model's true value. It says nothing about how far the model is from reality.
The Kelly fraction is a property of the model. It is the growth-maximising size only if the win rate and payoff are exactly right, and even then it comes with deep falls along the way. It is shown so the entered risk can be placed beside it, not as a size to adopt.
Position value against liquidity. A large position in a thinly traded share may not be closed near the stop price at all. The page does not look at trading volume.
Worked example
The default case: an account of 50,000, a risk of 1 % per trade, entry at 40.00, stop at 37.50, target at 46.00 and a win rate of 40 %.
Money at risk: 50,000 × 0.01 = 500. Loss per share: 40.00 − 37.50 = 2.50. Shares: 500 / 2.50 = 200. Position value: 200 × 40 = 8,000, which is 16 % of the account, within the maximum of 25 % entered.
Gain per share: 46.00 − 40.00 = 6.00. Reward-to-risk ratio: 6.00 / 2.50 = 2.40. Break-even win rate: 1 / (1 + 2.40) = 29.41 %.
Expectancy at a 40 % win rate: 0.40 × 1,200 − 0.60 × 500 = 480 − 300 = 180 per trade, or 0.40 × 2.40 − 0.60 = 0.36 of the money risked.
In Advanced mode the default commission of 0.005 and slippage of 0.02 per share add 2 × 0.025 = 0.05 to the loss per share: 2.55, so 500 / 2.55 = 196.08 and the size is 196 shares. The reward-to-risk ratio becomes 5.95 / 2.55 = 2.33 and the break-even win rate 30 %. A fall of 10 % is 10 losses net of wins; over 100 trades the simulation puts its chance near 5.6 % (the exact value for the model is 5.8 %). The longest losing streak in 100 trades averages 7.9 losses. The Kelly fraction is 0.40 − 0.60 / 2.333 = 14.3 % of the account per trade, against the 1 % entered.
A calculator for education and analysis, not investment advice.