Skip to content
All library documents

Monitoring the Price Spread Between Weekly and Quarterly Crypto Futures

Article Strategy library · Author: 发明者量化-小小梦

Summary

This visual strategy example monitors the price difference between OKEX’s current-week and quarterly futures contracts. It selects each contract, repeatedly fetches their ticker data, skips an iteration if either ticker is unavailable, then subtracts the quarterly last price from the weekly last price. The result is logged and passed to a profit-logging function, with a short pause between updates.

The example demonstrates spread observation across two maturities, which can help traders study futures basis behavior. It does not define entry or exit conditions, execute trades, or explain how to account for contract specifications, fees, funding, or execution slippage. No market data, backtest results, or evidence of profitability are provided, so it is a monitoring illustration rather than a tested spread strategy.

Key ideas

  • The example selects weekly and quarterly futures contracts and reads their latest prices.
  • It calculates the spread as the weekly last price minus the quarterly last price.
  • It logs the spread repeatedly while skipping iterations with missing ticker data.
  • The example contains no trading signals, order execution, or performance evidence.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.