Back to Community
A simple market making algo with a net Sharpe ratio > 7 year-to-date

Below is a simple market making algorithm:

  • It takes the 300 least liquid stocks from the QTradableStocksUS universe
  • Every 10 minutes and on each of those stocks, it places a bid at price-0.01 and an offer at price +0.01.

With contest commissions and slippage (but 1M$), this algo supposedly generated a Sharpe ratio of 7.29 YTD.

Clone Algorithm
77
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 5a1d573892f86e3f37f54d20
There was a runtime error.
6 responses

I agree with your initial idea that this performance are due to the bug in the limit orders.

Here is a backtest with a patched Slippage model. It is not perfect but it less optimistic regarding filled price of limit orders than current zipline implementation.

EDIT:
The only change I made to the original zipline slippage model is relative to the filled price of a limit order: when the limit price is crossed zipline fills the order at the new price (close price of the current minute bar) while in reality and in this patched Slippage model the fill price is exactly the limit price.

Clone Algorithm
16
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 5a1e92e134ca7f44710018ca
There was a runtime error.

Indeed, the performance was clearly unrealistic, and very likely due to this bug.

I removed my initial comment on this, as it could be interpreted as a gratuitous attack on the performance of all algos that use limit orders.

Thanks for your custom slippage model code, which clarifies the matter.

Some detail just tracking GSM orders (lowest PnL in first 5 days)

The non marketable limit orders still haven't been fixed...?

Also, does the OP know this holds both long and short?

I assume the algo is meant to buy and then sell - not outright short a positions, right?

Can we add a check after the limit order is placed before the sell limit order is placed?

@tyler: Like any market maker, this strategy can indeed go both long and short.

Anyway, this strategy has no interest whatsoever.

@Luca -- is there a way to update the slippage model to give worse treatment to odd lots (orders of less than 100 shares)? Because odd lot orders aren't printed to the tape, they require the spread to cross their limit price before they fill (basically the opposite of round lot limit orders, which earn the spread).