Single-Asset Dynamic Rebalancing Around a 50% Cash Target
Summary
This educational example maintains a BTC/USDT portfolio by comparing its cash share with a 50% target. It begins by using half of the account balance to buy the asset. On each polling cycle, it estimates total account value from cash and coin holdings, then trades when the cash ratio moves beyond the target by a configurable threshold. If cash is too high it buys; if cash is too low it sells, aiming to correct half of the deviation. The example sets a 60-second interval and a 10% switching threshold.
The published settings describe a daily-period backtest on OKEX from January through October 2019, but no performance results are supplied. The document presents the code as a teaching exercise and cautions against live use. It does not discuss fees, slippage, minimum order constraints, or how the initial all-cash assumption and asset price movements affect risk, so its behavior and viability cannot be inferred from the example alone.
Key ideas
- The example targets an allocation with half of portfolio value in cash and half in one asset.
- It initiates the position by spending half the starting cash on the asset.
- Subsequent trades respond to deviations in the cash share beyond a configurable threshold.
- The example is educational, cautions against live use, and supplies no reported performance evidence.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.