Concepts

Edge confidence (CIs on PF + WR)

Your edge metrics are estimates from a finite trade sample. The confidence interval tells you how much of that estimate is signal versus how much is luck. Every new trade narrows the band — your existing data becomes more valuable, not less.

What it is

After 50 trades you might see a profit-factor of 1.4. Is that a real edge or a lucky streak? The 95 % confidence interval answers exactly this. It says: *given the spread of wins and losses you've actually had, the true PF over an infinite sample is — with 95 % probability — somewhere between 1.1 and 1.7.*

Two methods do the heavy lifting:

* Wilson score interval for the win-rate. Closed-form, textbook (Newcombe 1998). Handles small samples and the corner cases of 0 % or 100 % win-rate without producing nonsense — the naïve `p ± 1.96·√(p(1-p)/n)` Wald formula collapses to ± 0 at the corners and would tell you you're 100 % certain on samples that are anything but. Wilson stays meaningful. * Bootstrap interval for the profit-factor. PF is a ratio of two sums, neither of which is normally distributed; the textbook closed-form doesn't exist. Instead we resample the trade list 1 000 times *with replacement*, compute PF on each resample, and read the 2.5th / 97.5th percentile. The result is an empirical CI that respects the actual shape of your win/loss distribution.

Neither method assumes anything about future market conditions. They only quantify how much of your current estimate is supported by the data you've already journaled.

Formula
Wilson WR (95 %) — closed form:
centre = (p + z²⁄2n) / (1 + z²⁄n)
half-width = z·√(p·(1-p)/n + z²⁄4n²) / (1 + z²⁄n)
with z = 1.96 (95 %), p = wins/n.
 
Bootstrap PF — resampling:
for i in 1..1000:
sample = random.choices(trades, k=len(trades))
pf_i = sum(wins(sample)) / |sum(losses(sample))|
CI = (percentile(pf_i, 2.5), percentile(pf_i, 97.5))
Example

47 trades, 26 wins, 21 losses. Average win €220, average loss €140.

ResultWR point estimate = 26⁄47 ≈ 55.3 %. Wilson 95 % CI ≈ **41 % – 69 %** — a 28-percentage-point band. PF point estimate ≈ 1.95. Bootstrap 95 % CI typically lands around **1.3 – 2.7** depending on the win-loss spread. At 200 trades the same underlying distribution would shrink the PF band roughly to **1.7 – 2.2**.
How to read it

Read the band, not just the point estimate. A PF of 1.4 ± 0.3 (CI 1.1 – 1.7) means: with the trades you currently have, you can be 95 % sure your true PF is north of 1.0 — i.e. you have a real edge. A PF of 1.4 ± 0.7 (CI 0.7 – 2.1) means: the lower bound of your edge is below break-even. The point estimate looks identical; the certainty is night-and-day different.

Rule-of-thumb mental model: - n < 30 — too few trades for an honest read. The maths still produces a number; it just doesn't mean much. Don't make scaling decisions yet. - 30 ≤ n < 100 — first signal. The CI is wide; the headline number can swing 30 % in either direction with the next 20 trades. - 100 ≤ n < 300 — the band tightens visibly. The shape of your edge becomes legible. - n ≥ 300 — the CI is roughly half as wide as it was at 100. You can start trusting the headline as more than vibes.

The most important reading is whether the lower bound clears your break-even. If your PF lower bound is above 1.0, you have positive expectancy *with high confidence*. If it's below 1.0, you have a positive point estimate but the data doesn't yet prove the edge — the right next move is more journaling, not bigger size.

Where TradeOnyx uses it

Edge confidence is the unique anti-quitting argument for traders who think in mathematics. Streaks and badges work on casual users; serious traders respond to a 95 % CI shrinking with sample size. It tells you the truth: each new journaled trade isn't just another data point, it's compounding interest on certainty.

The card on the Overview tab shows this directly. Above 30 trades it renders the current PF and WR with their `± half-width` bands in gold (so the uncertainty is visually as prominent as the point estimate), plus a sparkline projecting where the bands shrink to at 100 / 200 / 500 / 1 000 trades — using your actual win-loss distribution, not a generic placeholder. You can literally see the curve flattening as the sample grows.

Below 30 trades the card shows a soft empty state instead of fabricated CIs: *"n=12 — too few for an honest read. Keep journalling; the band tightens fast past 30."* No mainstream trading-journal tool ships this read on a CI band today — most of them stop at the point estimate, which flatters the trader and hides the small-sample noise. It is the most honest motivator in trading software because it doesn't lie and doesn't infantilise — it reflects how you already think about edge.

Pro Plus — ✦ AI analysis button. Below the projection sparkline a `✦ AI analysis` button opens a modal where Claude reads your current CIs and projection out loud: how robust the edge is today, how much narrower the band gets at 200 or 500 trades, and 2–3 concrete sample-discipline take-aways. Strictly self-reflection on your own data — never investment advice, never performance promises. Cached for 7 days per user so re-clicks don't burn additional LLM calls.

Related reading