Downloading...
OPEN-SOURCE SCRIPT

Spread Analysis

187
Spread Analysis - Futures vs Spot Price Analysis

Advanced spread analysis tool that compares futures/perp prices with spot prices across multiple exchanges, providing insights into market sentiment and potential trading opportunities.

  1. Multi-Asset Support: Automatically detects and analyzes crypto perpetual vs spot spreads, index futures vs cash indices (ES/SPX, NQ/NDX, YM/DJI), and commodity futures vs spot prices (GC/GOLD, CL/USOIL)
  2. Multi-Exchange Aggregation: For crypto, aggregates prices from Binance, BitMEX, Kraken, Bybit, OKX, and Coinbase to calculate mean perp and spot prices
  3. Z-Score Based Alerts: Uses statistical Z-score analysis to identify extreme spread conditions that may signal potential reversals or continuation patterns
  4. Visual Histogram Display: Shows spread differences as colored columns - green for futures premium, red for futures discount
  5. Flexible Calculation Methods: Supports absolute price differences, percentage spreads, or basis point calculations


  • Trading Applications: Identify market sentiment divergence, spot potential reversal opportunities, and confirm trend strength
  • Risk Management: Use extreme Z-scores to identify overvalued conditions and potential mean reversion setups
  • Market Analysis: Understand the relationship between futures and spot markets across different asset classes
  • Timing Tool: Spread momentum often precedes price moves, providing early signals for entry/exit decisions


Perfect for traders who want to understand the relationship between futures and spot markets, identify divergences, and spot potential reversal opportunities across crypto, indices, and commodities.


Key Features:
• Automatic asset detection and appropriate spread calculation
• Configurable Z-score alerts for extreme conditions
• Comprehensive tooltips and information guide
• Multiple calculation methods (absolute, percentage, basis points)
• Clean, customizable visual display

Use Cases:
• Crypto traders analyzing perp vs spot relationships
• Futures traders monitoring basis relationships
• Mean reversion strategies using extreme spreads
• Trend confirmation using spread momentum
• Market sentiment analysis across asset classes

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.