Expected value
The expected value is the average result you would get if you could repeat the same bet many times. Each outcome counts in proportion to how likely it is.
01The formula
- the random outcome, here: the profit or loss of one trade
- each possible outcome
- the chance of that outcome
- the expected value: the probability-weighted average outcome
02See it move
03Where it is used
- Retail traderChecks that a setup's wins, weighted by how often they come, beat its losses before trading it.
- Market makerQuotes so that the spread earned is larger than the expected loss to informed traders, giving a positive expected value per trade.
- Portfolio managerCompares positions by their expected return across scenarios, not by the best case.
04Why traders use it
A trade with positive expected value makes money over many repetitions, even if it loses often. A trade with negative expected value loses over time however good the wins look.
05Worked example
A trade hits its target ($300) with chance 40%, hits its stop ($200 loss) with chance 35%, and otherwise scratches at zero. Its expected value is $50.00 per trade, about $5,000 over 100 trades. At this stop chance and these sizes you need to hit the target 23.3% of the time just to break even.
06How it is built
- List every outcome of the trade and its profit or loss.
- Give each outcome its probability; the probabilities must add up to 1.
- Multiply each outcome by its probability and add the products.
- Over independent trades the total has expected value .
07The common mistake
Judging a trade by its win rate. A strategy that wins 80% of the time can still have negative expected value if the losses are much bigger than the wins.
08In Python and LaTeX
import numpy as np
x = np.array([-200, 0, 300])
p = np.array([0.35, 0.25, 0.40])
ev = (x * p).sum()
print('EV per trade:', round(ev, 2)) # 50.0E[X] = \sum_i x_i\,P(X = x_i)
09Where it fits
Rather not code the maths yourself? Describe your trading idea and let AI build the bot.
Build a bot with AgenKitThe worked example and the model run the same code, so every number matches. Models simplify markets on purpose. This is education, not financial advice.