LibraryWorkspaceDataHub

© 2026 QCA · by Lime Fintech · About QCA · Market data from Massive

PrivacyTermsCookiesDisclaimer
HomeLibrary
DataHub
  1. Library
  2. Report

High-frequency trading in a limit order book (Avellaneda, Stoikov)

Open repository
Apr 23, 2026
Trading and Market Microstructure

Verdict: Partially Reproduced

OverviewExperiments

Executive Summary

Status
Partially Reproduced
Confidence
High

Executive Summary

  • Status: PARTIALLY REPRODUCED
  • Confidence: HIGH
  • Key Insight: The repository successfully reproduces the paper’s theoretical formulas and the main qualitative Monte Carlo findings. Quantitatively, the constant-spread simulation matches the paper reasonably well for most cases, but there is a material discrepancy for the high-risk-aversion case γ=0.5\gamma=0.5γ=0.5, and the repo also correctly identifies a theoretical inconsistency in the paper’s published spread formula.

Results Comparison

Experiment 1 — Theoretical reproduction of Avellaneda-Stoikov formulas

The repository reports full symbolic recovery of the core formulas:

  • Frozen-inventory value function: PASS
  • Reservation ask/bid prices: PASS
  • Average reservation price r:
(s,q,t)=s−qγσ2(T−t)r(s,q,t)=s-q\gamma\sigma^2(T-t)
r(s,q,t)=s−qγσ2(T−t)
PASS
  • HJB ansatz and reduced representation: reproduced
  • First-order optimality conditions: reproduced
  • Exponential-intensity specialization: reproduced
  • Asymptotic approximation formulas: reproduced
  • Spread inconsistency between theory and paper tables: explicitly documented
  • Key theoretical comparison

    MetricPaperReproducedDiffStatus
    Frozen-inventory value function−e−γxe−γqseγ2q2σ2(T−t)/2-e^{-\gamma x} e^{-\gamma qs} e^{\gamma^2 q^2 \sigma^2 (T-t)/2}−e−γxe−γqseγ2q2σ2(T−t)/2Same0Match
    Reservation price centerr=s−qγσ2(T−t)r=s-q\gamma\sigma^2(T-t)r=s−qγσ2(T−t)Same0Match
    Reservation asks+(1−2q)γσ2(T−t)2s+\frac{(1-2q)\gamma\sigma^2(T-t)}{2}s+2(1−2q)γσ2(T−
    Reservation bids+(−1−2q)γσ2(T−t)2s+\frac{(-1-2q)\gamma\sigma^2(T-t)}{2}s+2(−1−2q)γσ2(T
    Exponential-intensity correction(1/γ)ln⁡(1+γ/k)(1/\gamma)\ln(1+\gamma/k)(1/γ)ln(1+γ/k)Same0Match
    Finite-horizon total spreadγσ2(T−t)+2γln⁡(1+γ/k)\gamma\sigma^2(T-t)+\frac{2}{\gamma}\ln(1+\gamma/k)γσ2(T−t)+γ
    Table-consistent constant spread2γln⁡(1+γ/k)\frac{2}{\gamma}\ln(1+\gamma/k)γ2​ln(1+γ/k)Same numeric values as paper tables0Match

    Summary:
    Experiment 1 is essentially fully reproduced. More importantly, the repo highlights that the paper’s numerical tables correspond only to the constant term of the spread, not the full finite-horizon formula implied by the derivation.


    Experiment 2 — Monte Carlo replication using table-consistent constant spread

    This is the main numerical replication against the paper’s published tables.

    Paper vs reproduced metrics

    MetricPaperReproducedDiffStatus
    γ=0.01\gamma=0.01γ=0.01, inventory mean profit66.7868.7714+1.9914Within tolerance
    γ=0.01\gamma=0.01γ=0.01, inventory std profit8.769.0881+0.3281Within tolerance
    γ=0.01\gamma=0.01γ=0.01, inventory mean qTq_TqT​-0.0200.0530+0.0730Minor
    γ=0.01\gamma=0.01γ=0.01, inventory std qTq_TqT​4.705.2049+0.5049Slightly high but acceptable
    γ=0.01\gamma=0.01γ=0.01, symmetric mean profit67.3668.8380+1.4780Within tolerance
    γ=0.01\gamma=0.01γ=0.01, symmetric std profit13.4013.9154+0.5154Acceptable
    γ=0.01\gamma=0.01γ=0.01, symmetric mean qTq_TqT​-0.3100.1170+0.4270Noticeable
    γ=0.01\gamma=0.01γ=0.01, symmetric std qTq_TqT​8.658.7147+0.0647Match
    MetricPaperReproducedDiffStatus
    γ=0.1\gamma=0.1γ=0.1, inventory mean profit62.9464.3702+1.4302Within tolerance
    γ=0.1\gamma=0.1γ=0.1, inventory std profit5.895.9700+0.0800Match
    γ=0.1\gamma=0.1γ=0.1, inventory mean qTq_TqT​0.100-0.0860-0.1860Minor
    γ=0.1\gamma=0.1γ=0.1, inventory std qTq_TqT​2.802.9297+0.1297Match
    γ=0.1\gamma=0.1γ=0.1, symmetric mean profit67.2168.7191+1.5091Within tolerance
    γ=0.1\gamma=0.1γ=0.1, symmetric std profit13.4313.9208+0.4908Acceptable
    γ=0.1\gamma=0.1γ=0.1, symmetric mean qTq_TqT​-0.0180.1170+0.1350Minor
    γ=0.1\gamma=0.1γ=0.1, symmetric std qTq_TqT​8.668.7342+0.0742Match
    MetricPaperReproducedDiffStatus
    γ=0.5\gamma=0.5γ=0.5, inventory mean profit33.9223.8207-10.0993Material
    γ=0.5\gamma=0.5γ=0.5, inventory std profit4.724.9099+0.1899Match
    γ=0.5\gamma=0.5γ=0.5, inventory mean qTq_TqT​-0.020-0.0380-0.0180Match
    γ=0.5\gamma=0.5γ=0.5, inventory std qTq_TqT​1.881.9602+0.0802Match
    γ=0.5\gamma=0.5γ=0.5, symmetric mean profit66.2067.8160+1.6160Within tolerance
    γ=0.5\gamma=0.5γ=0.5, symmetric std profit14.5314.2196-0.3104Match
    γ=0.5\gamma=0.5γ=0.5, symmetric mean qTq_TqT​0.2500.1770-0.0730Minor
    γ=0.5\gamma=0.5γ=0.5, symmetric std qTq_TqT​9.069.1461+0.0861Match

    Summary for Experiment 2

    • Qualitative patterns are reproduced very well:
      • inventory strategy has lower P&L volatility than symmetric: yes
      • inventory strategy has lower inventory volatility: yes
      • symmetric usually has higher mean profit: yes
      • low-γ\gammaγ case makes strategies more similar: yes
    • Quantitative match is decent for γ=0.01\gamma=0.01γ=0.01 and γ=0.1\gamma=0.1γ=0.1
    • Main failure point is γ=0.5\gamma=0.5γ=0.5 inventory mean profit, which is materially below the paper

    So Experiment 2 is partially to mostly reproduced, but not perfect.


    Experiment 3 — Monte Carlo replication using literal finite-horizon spread

    This experiment is not meant to match the published tables exactly; instead it tests whether the paper’s conclusions survive when the theory-consistent spread is used.

    Results summary

    MetricPaper / ExpectedReproducedDiffStatus
    γ=0.01\gamma=0.01γ=0.01 spread at t=0t=0t=0~1.3689 expected under full formula1.36890Match
    γ=0.1\gamma=0.1γ=0.1 spread at t=0t=0t=0~1.6908 expected1.69080Match
    γ=0.5\gamma=0.5γ=0.5 spread at t=0t=0t=0~3.1507 expected3.15070Match
    Inventory std profit < symmetric std profitExpectedYes for all γ\gammaγ—Match
    Inventory std qTq_TqT​ < symmetric std qTq_TqT​ExpectedYes for all γ\gammaγ—Match
    Material deviation from paper tables at high γ\gammaγExpectedYes—Match

    Cross-experiment implication

    Compared with Exp 2, Exp 3 shows:

    • almost no change for γ=0.01\gamma=0.01γ=0.01
    • mild changes for γ=0.1\gamma=0.1γ=0.1
    • large changes for γ=0.5\gamma=0.5γ=0.5

    That is exactly what should happen, since the omitted term in the spread is:

    • 0.04 for γ=0.01\gamma=0.01γ=0.01
    • 0.40 for γ=0.1\gamma=0.1γ=0.1
    • 2.00 for γ=0.5\gamma=0.5γ=0.5

    This experiment strongly supports the repo’s claim that the paper’s tables are based on the constant-spread interpretation, not the literal finite-horizon derivation.


    Statistical & Economic Significance

    Statistical significance

    The repository reports sample means and standard deviations over 1000 Monte Carlo paths, but does not report t-stats, confidence intervals, or p-values. So strict statistical significance cannot be fully verified from the saved results alone.

    Still, the effect sizes are large enough in many cases to be economically obvious:

    • For Exp 2, γ=0.1\gamma=0.1γ=0.1:

      • inventory std profit = 5.97
      • symmetric std profit = 13.92
      • variance reduction is very large economically
    • For Exp 2, γ=0.5\gamma=0.5γ=0.5:

      • inventory std qTq_TqT​ = 1.96
      • symmetric std qTq_TqT​ = 9.15
      • inventory control effect is extremely strong
    • For Exp 3, γ=0.5\gamma=0.5γ=0.5:

      • inventory mean profit = 48.59
      • symmetric mean profit = 58.62
      • but inventory strategy still cuts risk materially

    Economic significance

    Economically, the core message is reproduced:

    • inventory-aware quoting substantially reduces inventory risk
    • it also reduces terminal P&L volatility
    • this is achieved at the cost of some mean profit, especially at higher γ\gammaγ

    That tradeoff is central to the Avellaneda-Stoikov framework and is clearly preserved.

    The biggest economically meaningful discrepancy is:

    • Exp 2, γ=0.5\gamma=0.5γ=0.5, inventory mean profit 23.82 vs paper 33.92
    • This is too large to dismiss as noise and likely reflects implementation or interpretation differences

    Discrepancies

    1. Material discrepancy in Exp 2 for γ=0.5\gamma=0.5γ=0.5 inventory mean profit

    • Paper: 33.92
    • Reproduced: 23.82
    • Difference: -10.10 (~30% lower)

    This is the single biggest mismatch and exceeds the suggested return tolerance by a wide margin.

    Likely explanations:

    • discrete-time Bernoulli approximation vs exact point-process simulation
    • simultaneous bid/ask fills allowed within a step
    • common random numbers and implementation details not specified by the paper
    • possible ambiguity in update ordering (executions before price update)
    • the paper may have used a slightly different quote construction or execution mechanism
    • Monte Carlo noise alone is unlikely to explain a gap this large with 1000 paths

    2. Mean inventory values differ somewhat, but not materially

    Several mean final inventory values differ in sign or magnitude from the paper, especially near zero. These are likely not economically important because:

    • the magnitudes are small
    • the paper’s main point is about dispersion, not tiny mean bias
    • std qTq_TqT​ matches much more closely than mean qTq_TqT​

    3. Theoretical spread inconsistency in the original paper

    This is not a reproduction failure of the repo; it is an important finding against the paper’s internal consistency.

    The repo shows:

    • derived finite-horizon spread = γσ2(T−t)+2γln⁡(1+γ/k)\gamma\sigma^2(T-t)+\frac{2}{\gamma}\ln(1+\gamma/k)γσ2(T−t)+γ2​ln(1+γ/k)
    • paper tables match only = 2γln⁡(1+γ/k)\frac{2}{\gamma}\ln(1+\gamma/k)γ2​ln(1+γ/k)

    This discrepancy is:

    • small at γ=0.01\gamma=0.01γ=0.01
    • moderate at γ=0.1\gamma=0.1γ=0.1
    • very large at γ=0.5\gamma=0.5γ=0.5

    This likely explains why theory-consistent Exp 3 diverges from the published tables, especially for larger γ\gammaγ.


    Methodology Issues

    The methodology appears largely aligned with the experiment specifications and with the paper’s intended setup:

    • synthetic single-asset simulation: followed
    • exponential intensities: followed
    • one-share fills: followed
    • binomial ±σdt\pm \sigma\sqrt{dt}±σdt​ mid-price process: followed
    • quoted spread formulations clearly separated between Exp 2 and Exp 3: good practice
    • explicit logging of ambiguous implementation decisions: strong point

    Potential methodology limitations:

    • no statistical inference reporting
    • Bernoulli discretization of arrivals may differ from any continuous-time interpretation
    • allowing simultaneous bid and ask fills in the same time step may or may not match the original implementation
    • no exact indication whether the paper used identical RNG treatment

    None of these undermine Experiment 1, but they could affect Monte Carlo table matching.


    Reliability

    Stability and consistency

    The results are internally consistent:

    • all theory checks in Exp 1 pass
    • all qualitative Monte Carlo comparisons go in the expected direction
    • cross-experiment behavior changes sensibly with γ\gammaγ
    • Exp 3 behaves exactly as expected if the omitted spread term is restored

    Red flags

    • lack of t-stats / confidence intervals
    • one major quantitative mismatch at γ=0.5\gamma=0.5γ=0.5 inventory profit
    • no raw logs beyond the summary markdown

    Confidence assessment

    • High confidence in the theoretical reproduction
    • Medium-high confidence in the qualitative numerical reproduction
    • Medium confidence in exact quantitative replication of the paper’s table values

    Figures

    Experiment 2 summary comparison

    Experiment 2 vs Experiment 3 comparison

    Experiment 3 spread decay

    Experiment 2 path / histogram charts

    Exp2 path gamma 0.01 Exp2 histogram gamma 0.01

    Exp2 path gamma 0.1 Exp2 histogram gamma 0.1

    Exp2 path gamma 0.5 Exp2 histogram gamma 0.5

    Experiment 3 path / histogram charts

    Exp3 path gamma 0.01 Exp3 histogram gamma 0.01

    Exp3 path gamma 0.1 Exp3 histogram gamma 0.1

    Exp3 path gamma 0.5 Exp3 histogram gamma 0.5


    Verdict

    Final Decision: PARTIALLY REPRODUCED

    Why:
    The repository successfully reproduces the paper’s theoretical derivations and the main economic conclusions of the numerical study: inventory-sensitive quoting reduces both profit volatility and inventory risk, while often sacrificing some mean profit. Quantitative replication is good for γ=0.01\gamma=0.01γ=0.01 and γ=0.1\gamma=0.1γ=0.1, but a material mismatch remains for the γ=0.5\gamma=0.5γ=0.5 inventory-profit result. The repo also convincingly identifies a nontrivial inconsistency between the paper’s finite-horizon derivation and its published table spreads.

    Experiments

    Theoretical reproduction of Avellaneda-Stoikov optimal quoting formulas

    Reproduce the paper’s theoretical finite-horizon formulas and approximations for market making under exponential utility, including the frozen-inventory value function, reservation bid/ask prices, average reservation price, HJB reduction, first-order optimality conditions, exponential-intensity specialization, and asymptotic approximation in inventory.

    Monte Carlo replication of the published numerical tables using the table-consistent constant-spread interpretation

    Replicate the paper’s main numerical results by simulating a single synthetic stock under a discrete-time market-making model, comparing an inventory-sensitive strategy against a symmetric benchmark. This experiment uses the interpretation most likely to match the published tables: quotes are centered on the reservation price for the inventory strategy and on the mid-price for the symmetric strategy, with a constant total spread equal to (2/gamma) ln(1+gamma/k).

    Monte Carlo replication under the literal finite-horizon spread formula implied by the derivation

    Replicate the same finite-horizon Monte Carlo market-making experiment, but use the literal equation-based approximation derived in the paper: the reservation price is inventory-sensitive and the total spread is time-varying, equal to gamma sigma^2 (T-t) + (2/gamma) ln(1+gamma/k). This experiment tests whether the published qualitative findings persist under the theory-consistent finite-horizon quoting rule, even if the exact tables are not matched.

    Run QCA on your paper
    t
    )
    ​
    Same
    0
    Match
    −
    t
    )
    ​
    Same
    0
    Match
    2
    ​
    ln
    (
    1
    +
    γ/k)
    Same
    0
    Match