Skip to content

Writing a basic market making strategy on liquid and illiquid crypto/fiat pairs

Notifications You must be signed in to change notification settings

lkrenn/Market-Making-With-Crypto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Market Making Strategy with Crypto

In this notebook, I will be implementing the market-making methodology outlined in Avellaneda and Stoikov's popular market making whitepaper titled High-Frequency Trading in a Limit Order Book. The paper can be found for free here: https://www.math.nyu.edu/~avellane/HighFrequencyTrading.pdf

In the whitepaper, the optimal behaviour of a market maker given certain assumptions is derived. Ultimately, this derivation yields a spread used to calculate the optimal placement for limit order, which is defined as follows:

This spread is defined around a reservation price i.e. a price at which a market maker is indifferent between their current portfolio and their current portfolio $\pm$ a new share. The reservation price is derived in the whitepaper as follows:

We can get an idea of how this model works by considering the chart below. Red dots indicate that a market order has been submitted and has filled one of our ask-limit-orders. Similarly, a green dot indicates that a market order has filled one of our buy-limit-orders.

Partial Results

While the model still has a ways to go to be considered sufficient, the following chart demonstrates how it works thus far:

The ask-limit-order line appears to be covered by the mid-price line. This means that at this point in time, the model seeks to sell more inventory than buy.

About

Writing a basic market making strategy on liquid and illiquid crypto/fiat pairs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages