Performance Metrics

Understanding Confidence Bands

Learn how confidence bands show expected performance range and help identify when a strategy stops working.

7 min readBeginner friendly

What you'll learn

Learn how confidence bands show expected performance range and help identify when a strategy stops working.

Confidence bands show you the expected range where your equity curve should fall based on your strategy's historical trade variance. They help you understand if your current performance is within normal expectations or if something has changed.

In Simple Terms: Confidence bands answer: "Is my strategy performing normally, or is something wrong?" They show where your equity should be 90% of the time.

How Confidence Bands Work

VivaTrades uses bootstrap resampling to generate confidence bands:

  1. Takes your historical trades and randomly resamples them 500 times
  2. For each resample, builds a simulated equity curve
  3. Calculates the 5th percentile (lower band), 50th percentile (median), and 95th percentile (upper band)

The result: a realistic range showing where 90% of possible outcomes would fall given your strategy's trade distribution.

The Three Lines

LineMeaningWhat It Tells You
Lower Band (5th)Bottom 5% of outcomesOnly 5% of simulations would be worse than this
Median (50th)Middle outcomeThe expected equity curve
Upper Band (95th)Top 5% of outcomesOnly 5% of simulations would be better than this

When to Worry

Your strategy might be broken if:

  • Below lower band for 2+ months: This is not normal variance. Either market conditions changed or the strategy is failing.
  • Below lower band for 6+ months: Stop trading immediately. The strategy is not working as expected.
  • Above upper band consistently: Might indicate overfitting to historical data. Future performance may revert to mean.

Understanding Band Width

The width of the confidence bands tells you about your strategy's consistency:

Band WidthWhat It MeansImplication
Narrow (15%)Low variance, consistent returnsPredictable outcomes, can size positions larger
Medium (15-30%)Moderate varianceSome fluctuation expected, normal for most strategies
Wide (30%+)High variance, unpredictableResults heavily depend on luck and timing, size conservatively
Important: Confidence bands are based on historical trade variance. They assume future trades will have similar characteristics. If market structure changes fundamentally, the bands may no longer be valid.

Real-World Example

Trader A has a strategy with narrow bands (12% width):

  • Expected return: 25% annually
  • Lower band: 22% | Upper band: 28%
  • If equity drops to 15% return after 6 months: Red flag, investigate immediately

Trader B has a strategy with wide bands (45% width):

  • Expected return: 25% annually
  • Lower band: 5% | Upper band: 50%
  • If equity drops to 8% return: Still within expected range, might just be bad luck

Using Confidence Bands in Live Trading

  1. Set position size based on band width: Narrower bands = can trade larger positions
  2. Define exit rules: "If below lower band for X consecutive days, reduce position size by 50%"
  3. Avoid premature shutdowns: Brief drops into the lower band are normal and expected ~5% of the time
  4. Don't expect to stay in the median: Your equity will fluctuate between the bands
Pro Tip: Track the "duration outside bands" metric. If you spend more than 10% of time outside the bands, your strategy is likely not performing as the backtest predicted.

Limitations

  • Assumes similar market conditions: Bands won't account for regime changes
  • Requires sufficient trades: Need at least 50+ trades for reliable bands
  • Not prediction: Bands show historical variance, not future guarantees
  • Ignores sequence risk: The order of wins/losses matters for actual trading

In VivaTrades

Enable confidence bands by toggling the switch on your equity curve chart. VivaTrades calculates them automatically and provides analysis on band width, your current percentile position, and duration spent outside the expected range.

Ready to test this?

Apply what you've learned with real Indian stock data.