OPEN-SOURCE SCRIPT
Updated

Index Futures vs Cash Arbitrage

319
This indicator measures the statistical spread between major stock index futures and their corresponding cash indices (e.g., ES vs SPX, NQ vs NDX) using Z-score normalization. It automatically detects commonly traded index pairs (S&P 500, Nasdaq, Dow Jones, Russell 2000) and calculates a smoothed spread between futures and spot prices. A Z-score is then derived from this spread to highlight potential overpricing or underpricing conditions.

Traders can use customizable thresholds to identify mean-reversion opportunities where the futures contract may be temporarily overvalued or undervalued relative to the index. The histogram highlights the direction of the Z-score (green = futures > index, red = futures < index), while built-in alerts notify users of key threshold breaches or zero-line crosses.

This tool is designed for discretionary traders, pairs traders, or anyone exploring statistical arbitrage strategies between futures and spot markets. It is not a buy/sell signal by itself and should be used with additional confluence or risk management techniques.
Release Notes
signal line and dynamic shading
Release Notes
wrong chart
Release Notes
update

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.