Skip to content
All library documents

Ratio Deviation Trading for Two Crypto Futures Pairs

Article Strategy library · Author: 小草

Summary

This document provides a trading implementation for two crypto futures instruments on OKX, with an explicit requirement for one-way position mode. It calculates an average historical price ratio from hourly candles, then compares the live ratio with that reference. The size and direction of orders depend on the deviation from the average, a grid-size setting, and current exposure. Orders are sized by a trade-value parameter, split into iceberg-sized orders, and bounded by a maximum position value.

The source refreshes the reference ratio and account equity periodically, checks both positions and tickers in a loop, and cancels submitted orders shortly after placing them. The document does not explain the statistical rationale for the ratio, define an exit or loss-control framework, or provide backtest results. Because it uses a historical average as its anchor, the approach may be exposed to regime changes or a persistent divergence between the two instruments; fees, execution behavior, and contract specifications also matter.

Key ideas

  • The strategy trades two futures legs according to deviations of their live price ratio from an average ratio.
  • Trade direction and target value respond to the ratio deviation relative to a configurable grid size.
  • Iceberg order value and maximum position value constrain order sizing and exposure.
  • The document supplies implementation details but no performance evidence or explicit risk and exit analysis.

Tags

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