Skip to content
All library documents

Numerically Solving a High-Frequency Trading Control Equation

Article Quant Q&A · Author: JMNQC

Summary

The document concerns a value-function integro-differential equation from a high-frequency trading model with limit and market orders. The question asks how to solve it numerically when the equation couples multiple market states and includes optimization over order choices. The answer describes a backward-in-time computation on a grid, evaluating candidate controls through brute-force searches over the supremum and infimum at each grid point. It also notes that the model's numerical results were reproduced in simulation.

The response is primarily an anecdotal warning about applying the strategy live. Its author reports a loss after substantial stock turnover and attributes the gap between simulated and live outcomes to the model's Cox-process assumption, suggesting Hawkes processes as a potentially more realistic alternative. This is one practitioner's experience, not controlled evidence that the model or strategy will fail generally. The excerpt gives only a high-level numerical procedure and does not provide implementation details or a validated replacement model.

Key ideas

  • The equation couples value functions across market states and includes choices over order controls.
  • The answer describes solving backward from the end of the trading day on a grid.
  • It suggests brute-force evaluation of candidate controls at each grid element.
  • The author reports matching simulation results but a loss in live trading.
  • The response argues that the Cox-process assumption may limit real-world performance, based on one practitioner's experience.

Tags

Full text
# How to solve numerically the IDE of GUILBAUD & PHAM model?


# How to solve numerically the IDE of GUILBAUD & PHAM model?












By the Guilbaud & Pham model (Optimal high frequency trading with limit and market orders, 2011), the authors said that integro-differential-equation (IDE) can be easily solved by numerical method.

$$ \begin{gathered} \max \left[-\frac{\partial \varphi_{i}}{\partial t}+\left(b \eta y-\frac{1}{2} \sigma^{2}(\eta y)^{2}\right) \varphi_{i}-\sum_{j=1}^{m} r_{i j}(t)\left[\varphi_{j}(t, y)-\varphi_{i}(t, y)\right]\right. \\ -\inf _{\left(q^{b}, \ell^{b}\right) \in \mathcal{Q}_{i}^{b} \times[0, \bar{\ell}]} \lambda_{i}^{b}\left(q^{b}\right)\left[\exp \left(-\eta\left(\frac{i \delta}{2}-\delta 1_{q^{b}=B b_{+}}\right) \ell^{b}\right) \varphi_{i}\left(t, y+\ell^{b}\right)-\varphi_{i}(t, y)\right] \\ -\inf _{\left(q^{a}, \ell^{a}\right) \in \mathcal{Q}_{i}^{a} \times[0, \bar{\ell}]} \lambda_{i}^{a}\left(q^{a}\right)\left[\exp \left(-\eta\left(\frac{i \delta}{2}-\delta 1_{q^{a}=B a_{-}}\right) \ell^{a}\right) \varphi_{i}\left(t, y-\ell^{a}\right)-\varphi_{i}(t, y)\right] \\ \left.\varphi_{i}(t, y)-\inf _{e \in[-\bar{e}, \bar{e}]}\left[\exp \left(\eta|e| \frac{i \delta}{2}+\eta \varepsilon\right) \varphi_{i}(t, y+e)\right]\right]=0, \end{gathered} $$

I know about the finite differential method, but the problem is the summation term. I don't know about the set of solutions $\varphi = (\varphi_{i})_{\in I}$ thus, I can't guess what the $\varphi_{j}$ is.

How can I solve the DE? Plus, what is optimal control?

## Answer by crow (score 2)

https://quant.stackexchange.com/a/71865

Don't bother. I implemented the strategy and took it live and only lost 4000 dollars after turning over 10 million dollars worth of stock. The Cox process assumption is the flaw in this paper. It might work with a more realistic model like Hawkes processes but the hft traders have this arena locked down IMHO. Good luck. And yes, it was extremely challenging to implement . You have to work backwards from the end of the day, and basically do a brute force iteration for the sup and inf to calculate the value of each grid element. In simulations I reproduced the results of the paper. Live was a different story.

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.