2023R0

Dynamic Price Adaptation: Enhancing Algorithmic Trading Through Position-Aware Fair Pricing

After developing Strategy v3, I began exploring ways to further improve it. While reviewing log files, I noticed that my position often hit the limit, so I considered becoming more aggressive in inventory management. For example, when my position reached the upper limit of 20, I would be willing to sell at or even below my fair price to free up space for buying cheaper bananas.

To quantify this behavior, I researched academic literature and decided to implement a simple negative feedback mechanism:
fair_new = fair_old – alpha * position
This way, when position > 0, the system would lower the fair price to encourage selling, and vice versa.

Additionally, I analyzed price trends and found a strong negative correlation (-0.43) between the current price change (from t-1 to t) and the next price change (from t to t+1). This suggested some predictability in fair price movements, so I expanded the formula to:
fair_new = fair_old – alpha * position – beta * current_price_change

Another improvement came from studying the order book. I observed that the volume imbalance between best bid and best ask could also predict future price movements. For instance, if the best bid had 50 contracts while the best ask only had 3, I inferred upward price pressure—since it would take 50 trades to clear the bid but only 3 to clear the ask. Statistical analysis confirmed a weak negative correlation between volume difference and future price changes, leading to the final formula:
fair_new = fair_old – alpha * position – beta * current_price_change – gamma * volume_diff

By integrating this enhanced pricing model into Strategy v3, I achieved 2,500+ profits on bananas—a 25% improvement over the original version. Combined with earlier gains from pearls, my total profits exceeded 6,000, which was extremely satisfying.

Leave a Reply