Dynamic Balance Rebalancing Between Crypto and Fiat
Summary
The document presents a dynamic-balance strategy for a crypto and fiat account. It compares the marked value of the coin holdings with the fiat balance, using bid and ask prices adjusted by a spread parameter. When the coin side is valued above the fiat side, it calculates a sale intended to move the imbalance partway back toward balance; when it is below, it calculates a purchase. Orders are rounded to an amount increment and filtered by a minimum trade size. The code also checks open orders, cancels stale orders, and periodically logs estimated profit relative to initial account value.
The document supplies implementation code but no backtest, live results, or parameter guidance. It does not establish that rebalancing is profitable, and the outcome will depend on market path, fees, spread, liquidity, and execution. Its profit calculation and order handling are presented without a discussion of these limitations, so the code should be treated as an example of a rebalancing mechanism rather than evidence of returns.
Key ideas
- The strategy compares the marked value of coin holdings with the fiat balance and trades when they diverge.
- It uses spread-adjusted bid and ask prices to estimate the imbalance and size orders.
- The calculated trade aims to reduce the difference between the two sides rather than fully rebalance them.
- Order sizing observes minimum quantity and increment parameters, and the program manages pending orders.
- The document gives code but no performance evaluation or guidance on fees, liquidity, or parameter selection.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.