Skip to content
All library documents

Multi-Asset Threshold Rebalancing from Recent Price Moves

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

Summary

This educational example monitors several crypto pairs and maintains a separate reference price for each. When the last price moves beyond a configured percentage threshold above that reference, it submits a buy sized as a fraction of available quote balance; a sufficiently large downward move triggers a sell sized as a fraction of the held asset. After placing an order, it resets that asset’s reference price to the latest price. The example also applies exchange precision settings and periodically cancels open orders.

The published setup uses BTC/USDT, ETH/USDT, and LTC/USDT on one-minute data over a stated historical interval, but includes no reported performance metrics. The code does not define a portfolio-level allocation or loss limit, and its independent per-asset sizing can lead to uneven exposure. It uses ticker prices and limit orders without describing fill handling, fees, or slippage; the periodic cancellation behavior also affects execution. Treat it as a teaching example of threshold-based trading and order management, not a demonstrated profitable strategy.

Key ideas

  • Each asset has an independent reference price that resets after an order is submitted.
  • A percentage rise above the reference triggers a buy sized from available balance, while a threshold decline triggers a sale from holdings.
  • The example applies asset-specific amount and price precision and periodically cancels outstanding orders.
  • The backtest configuration covers three crypto pairs on one-minute data, but no results are provided.
  • There is no portfolio-wide exposure control, and execution costs and order fills are not evaluated.

Tags

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