The Claude Quant PlaybookDownload ebookDownload ebook

Expected value

beginnerProbability5 of 12

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.

Build a trading system with Claude.Download ebook

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

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

  1. List every outcome of the trade and its profit or loss.
  2. Give each outcome its probability; the probabilities must add up to 1.
  3. Multiply each outcome by its probability and add the products.
  4. 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.0
E[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 AgenKit

The worked example and the model run the same code, so every number matches. Models simplify markets on purpose. This is education, not financial advice.