Skip to main content

MMSIM Algorithm

Overview

Ember offers a simple algorithm that simulates a market maker liquidity provider. It can be used to maintain a desired number of passive orders on an Ember-hosted matching engine (or any destination). This can be handy for UAT environments where we want an animated order book.

This algorithm trails reference prices of specified instruments.

Features

  • The algorithm maintains a given number of limit BUY and SELL orders on a given market (Ember destination).
  • Limit prices are constantly adjusted to follow the reference price (price source is defined by algorithm subscription). `
  • Limit orders use a randomized price from a formula defined in the config below.
  • The frequency of price adjustments is throttled by the orderSubmitIdleInterval parameter.
  • The algorithm respects the trading schedule of a given exchange (defined using a trading calendar). Does not submit orders during exchange downtime.

Configuration

  MMSIM: ${template.algorithm.default} {
factory = deltix.ember.service.algorithm.samples.marketmaker.MarketMakerSimulationAlgorithmFactory

settings {
exchange: NIAGARA # (OPT) destination and exchange name for submitted orders

calendarName: "365D" # 24/7 by default (if calendar is not available)
orderSubmitIdleInterval: 1000 # minimal allowed interval between new order/replace requests (in ms)

maxSideDepth: 5 # bot maintains the given number of orders per instrument per side
maxSizeDeviationInTicks: 10000 # bot generates random size of order by formula: minSize + (sizeIncrement * random(0, maxSizeDeviationInTicks))
maxPriceDeviationInTicks: 1000 # bot generates random price of order by formula: bestPrice +/- (priceIncrement * random(1, maxPriceDeviationInTicks))

defaultMinSize: 0.0001 # if not available in Security Metdata
defaultSizeIncrement: 0.00000001 # if not available in Security Metdata
defaultPriceIncrement: 0.1 # if not available in Security Metdata

maxFailedOrders: 100 # (OPT) max failed orders. If total failed orders > maxFailedOrders then submitting of new orders will be stopped with warning in log
}

subscription {
streams = ["COINBASE"]
symbols = [BTC/USD,BTC/EUR]
}
}