PROTECTED SOURCE SCRIPT
Market Breadth & Forward Returns

This indicator shows how future index performance has historically behaved after different levels of market breadth. The heatmap reveals which breadth zones have tended to precede better or worse forward returns. This is strictly a statistical conditional-expectation map, not a set of signals.
Scope
This is not meant for any arbitrary asset.
It is meant for broad indices only (S&P 500, Nasdaq 100, Dow, Russell, major sector families).
The breadth data is derived from index-level market universes.
Do not apply this on single stocks, crypto or FX. The method only makes sense with large diversified universes.
Core method
Daily breadth is normalized 0 to 100.
For each bar, six forward horizons are evaluated on the index: performance after X days.
Each observation is placed into a breadth bin.
Each bin/horizon pair has mean, variance and count computed.
Each bin/horizon mean is t-tested against zero.
Benjamini-Hochberg False Discovery Rate weighting allocates weight only to horizons where evidence exists.
Weighted horizon means are aggregated and annualized (252 trading days).
The map displays annualized conditional forward returns per breadth bin.
Why this is robust
Non-repainting. Breadth is in the past, returns are strictly future, lookahead_off.
Multiple horizons avoid single-window biases.
Variance, t-tests and FDR correction drastically reduce false positives.
Bins with poor sample size are visually suppressed to avoid over-interpretation.
How to use
Daily timeframe only.
Select the correct index family (S&P 500, Nasdaq 100, Russell…).
Bin size 5 to 10 points is a realistic range.
Min occurrences per bin ≥ 5 recommended.
FDR alpha 0.05 to 0.10 is a good working envelope.
Interpret as conditional expectations, not a forecast guarantee.
Notes
Do not use on random assets.
Do not extrapolate outside the chosen index family.
Always keep symbol and timeframe visible when publishing.
Indicator by Julien Eche
Scope
This is not meant for any arbitrary asset.
It is meant for broad indices only (S&P 500, Nasdaq 100, Dow, Russell, major sector families).
The breadth data is derived from index-level market universes.
Do not apply this on single stocks, crypto or FX. The method only makes sense with large diversified universes.
Core method
Daily breadth is normalized 0 to 100.
For each bar, six forward horizons are evaluated on the index: performance after X days.
Each observation is placed into a breadth bin.
Each bin/horizon pair has mean, variance and count computed.
Each bin/horizon mean is t-tested against zero.
Benjamini-Hochberg False Discovery Rate weighting allocates weight only to horizons where evidence exists.
Weighted horizon means are aggregated and annualized (252 trading days).
The map displays annualized conditional forward returns per breadth bin.
Why this is robust
Non-repainting. Breadth is in the past, returns are strictly future, lookahead_off.
Multiple horizons avoid single-window biases.
Variance, t-tests and FDR correction drastically reduce false positives.
Bins with poor sample size are visually suppressed to avoid over-interpretation.
How to use
Daily timeframe only.
Select the correct index family (S&P 500, Nasdaq 100, Russell…).
Bin size 5 to 10 points is a realistic range.
Min occurrences per bin ≥ 5 recommended.
FDR alpha 0.05 to 0.10 is a good working envelope.
Interpret as conditional expectations, not a forecast guarantee.
Notes
Do not use on random assets.
Do not extrapolate outside the chosen index family.
Always keep symbol and timeframe visible when publishing.
Indicator by Julien Eche
Script protégé
Ce script est publié en source fermée. Toutefois, vous pouvez l'utiliser librement et sans aucune restriction - en savoir plus ici.
Plan the trade ⚡ Trade the plan
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script protégé
Ce script est publié en source fermée. Toutefois, vous pouvez l'utiliser librement et sans aucune restriction - en savoir plus ici.
Plan the trade ⚡ Trade the plan
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.