Calibrating Infinite-Horizon Avellaneda–Stoikov Market-Making Quotes
Summary
The post describes an attempted infinite-horizon Avellaneda–Stoikov market-making implementation. It gives a nonlinear equation for an inventory value function, with an inventory penalty, bid and ask arrival rates, fill-decay parameters, and maker rebates or fees. It then uses neighboring inventory values to form reservation-price adjustments and bid and ask spreads. The author reports quotes only tens of cents wide for an asset priced around $3,500, while stated maker and taker fees appear large relative to that spread; adding a fee adjustment causes orders not to fill during a one-second posting interval.
This is a troubleshooting question rather than a validated strategy or answer. It highlights the need to check units, sign conventions, parameter scaling, and how fees enter both the value equation and quote placement. It provides no derivation, calibration procedure, fills, or profitability evidence, and does not establish which implementation detail is wrong. The short cancellation interval and market conditions may also affect fill rates, so the reported outcome cannot diagnose the model on its own.
Key ideas
- The implementation sets quotes using inventory-dependent value differences and fill-decay corrections.
- The model includes an inventory penalty and separate bid and ask execution parameters.
- The author reports spreads that are small relative to stated trading fees and poor fills after fee adjustments.
- The post provides no resolution or evidence that the resulting quotes are profitable.
- Parameter units, sign conventions, fee treatment, and cancellation timing are relevant checks.
Tags
Full text
# Setting quotes for Infinite time horizon Avellaneda Stoikov
# Setting quotes for Infinite time horizon Avellaneda Stoikov
I am trying to implement a modified version of AS Market making model with infinite horizon.
Using the following equation to solve for $h(n)$:
$$h(q) = -\phi (q - q^*)^2 + C_1 e^{\kappa_p (\text{netCash} + h(q-1) - h(q))} + C_2 e^{\kappa_m (\text{netCash} + h(q+1) - h(q))}$$
where $q$ is current inventory, $q^*$ is target inventory, $\phi$ is inventory penalty, $\lambda_p,\ \lambda_m$ are bid and ask arrival rates, $\kappa_p,\ \kappa_m$ are fill rate decay parameters with
$C_1=\lambda_p e^{−(\frac{1}{\kappa_p}-\text{netCash})}\\ C_2=\lambda_m e^{−(\frac{1}{\kappa_m}-\text{netCash})}$
while net cash = rebate - maker fee.
Then, I am using this calculation to get my reservation price as
- ask_correction = 1/kappa_p
- bid_correction = 1/kappa_m
- bid_spread = self.h[q_idx, t_idx] - self.h[q_idx + 1, t_idx]
- ask_spread = self.h[q_idx, t_idx] - self.h[q_idx - 1, t_idx]
- bid_spread += bid_correction
- ask_spread += ask_correction
- reservation_price = (current_price + 0.5 * (h_next - h_prev))
- bid_price = reservation_price - bid_spread
- ask_price = reservation_price + ask_spread
Now these are my quotes, but for the asset I am trading, it's price is around 3500$ and the calculated bid and ask price spread comes out to be 20-40 cents, compared to the fee of 0.05% per trade (taker) and 0.02% maker.
I have no idea what I am doing wrong but It's not profitable and if I add fee to it,
bid_price = reservation_price - bid_spread - fee ask_price = reservation_price + ask_spread + fee
Orders don't get filled at all. Currently I place an order let it hanging for 1sec and then cancel it.Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.