Machine Learning and optimal trading

C.-A. Lehalle

Enseignant : Charles-Albert Lehalle, Capital Fund Management (CFM)

Travaux Dirigés : Sophie Laruelle, UPEC

Machine learning started to be studied by investment banks around 2016, while hedge funds started to use it few years earlier. A lot of FinTechs (ie start-ups leveraging on new technology) are proposing services based on “deep something” for banks, insurances or regulators.

Intra day and high frequency finance is using at least stochastic approximations for long, since the number of data generated by trading activity is huge (around 50,000 trades per day for a liquid stock, and 10 times this updates of the orderbook close to the best prices), cf

Moreover, the financial industry as a whole is now impacted by all these techniques (see for a generic paper on the influence of IA on market participants, in French).

As a consequence, we decided to include explicitly elements of Machine Learning (ML) in the course. The table of contents is modified to include ML related topics; to make room for them, we removed some elements of market microstructure that were more detailed than before (but you can rely on our book on this topic to go further by your own: ).

The goal is not to go away from the core topic of the course: how to build optimal trading strategies (execution and market making) using a quantitative, mathematically founded, approach in the era of modern markets (ie dealing with liquidity fragmentation, different type of matching mechanisms, dark pools, high frequency and low latency trading, etc)? We will simply show you how to use the new tools provided by machine learning to build optimal strategies, exploiting data with more accuracy, and solving optimization problems in higher dimension.

Here is the new content of the course; you can read that we will deal with neural networks (with a focus on dense ReLU perceptrons), Bayesian networks, Stochastic Approximation and Reinforcement Learning. We will mix generic results with illustrations of their use for high frequency finance. As usual, Sophie Laruelle will show you how to put some of these techniques on real data, using python.


1. Market Microstructure: Algorithmic trading in the XXIst century

  1. Stylized facts
  2. Recent ways of trading

2. Orderbook dynamics

  1. Dynamics and predictibility
  2. What is a (ReLU) perceptron?
  3. Deep learning on order book

3. Market impact

  1. Metaorders and latent variables
  2. What is a Bayesian network?
  3. Market impact estimation with partial information

4. Smart Order Routing

  1. Dealing with market fragmentation
  2. From online stochastic algorithms to reinforcement learning

5. Optimal control of trading

  1. From mean-variance to stochastic control
  2. Parametric stochastic control with deep networks
  3. Dealing with optimal trading with partial information thanks to reinforcement learning

6. Regulation and open questions



This course is addressing the main elements of high frequency trading for proprietary trading and brokerage:

  • a good knowledge of the market micro-structure

  • an understanding of the price formation process

  • intra day risk control optimisation techniques, to find the balance between trading too fast (to avoid market impact) and too slow (to avoid tracking error); moreover, an inventory-driven view of intra-day trading will be presented

  • high frequency statistics

  • asynchronous programming techniques, adapted to the communication with matching engines of the trading venues.

Python will be the programming language used during the practical sessions, to confront market making algos to a realistic market simulator:

Python web useful web resources:

Sorbonne Université Sciences et École Polytechnique
en collaboration avec l’E.S.S.E.C.