Skip to content
All library documents

LeeksReaper Strategy: Order-Book Signals and Inventory Rebalancing

Article FMZ digest · Author: 发明者量化-小小梦

Summary

This installment analyzes the structure and selected mechanics of the LeeksReaper cryptocurrency trading strategy. It describes a polling loop that repeatedly updates recent trades, order-book data, account balances, and a short series of prices. The strategy derives reference bid and ask prices from the best quotes, and builds a weighted price series from the first three order-book levels. It also monitors the relative value of coin and cash holdings and places small orders to rebalance inventory when that allocation moves beyond set bounds.

The article explains the program’s constructor and polling structure, then focuses on interpreting its price calculations and data flow. The supplied code also contains burst-based trade triggers and volume adjustments, but this installment does not fully analyze those parts. It reports no backtest results or evidence of profitability. The described order-book weighting and inventory rules are implementation choices, and the discussion does not establish that they remain effective across venues or market conditions.

Key ideas

  • The strategy runs its trading logic repeatedly through a polling function.
  • It tracks recent trades and constructs a price series from weighted quotes across three order-book levels.
  • Reference buy and sell prices are calculated by weighting the best bid and ask.
  • Account holdings are monitored and rebalanced when the coin-to-cash allocation crosses thresholds.
  • The installment explains code mechanics but provides no performance evidence.

Tags

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