Simulated Trade Matching Engine

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MarkInLondon
    Junior Member
    • Aug 2019
    • 3

    #1

    Simulated Trade Matching Engine

    Hello all, this is my first post here so please forgive any rules I may unintentionally break!

    I am in the process of refining my trading bot, which uses the Betfair Streaming API and has been written in .Net (C#).

    I have collected a healthy amount of real-time streaming data, against which, I have set-up back tests (segregated into 3 distinct samples, with a view to minimising the possibility of curve fitting, etc).

    I have developed my own Price Feed simulator, which does a pretty good job of simulating the Betfair streaming API sending changes and ultimately snapshots to my client strategy.

    One thing, which I want to simulate but have yet to figure out how, is a way to simulate my orders being matched on the exchange.
    Obviously, any historic data, which I use, however it was collected, will only show trades, which occurred at the time this data was collected. When I introduce new trades into that data sample (via my own back testing trades), I am now dependent on having my back test trades “matched” by the exchange matching engine.

    I am aware that by simulating (if I can) the matching of a new, external (to this dataset) trade, I am effectively skewing the original dataset, but for the time-being, this is a price I am prepares to pay.

    My problem is coming up with the mechanics of simulating a matched trade. Ideally, I would like to simulate back testing trades being matched on the exchange, taking random amounts of time, including full matches, partial matches and even non-matches, etc.

    Short of developing a fully blown exchange matching engine component (which I will if I really must), I can’t think of an effective but simple way to simulate back tested trades being matched on the exchange.

    I would be very interested to hear:
    • How others have achieved this (if at all)
    • Any ideas members may have as to how to get around this problem
    Thanks in advance
    Mark
  • LiamP
    Junior Member
    • Oct 2015
    • 284

    #2
    This was discussed on the Betfairlightweight slack group recently (feel free to join)

    https://betfairlightweight.slack.com...82716087067600

    Comment

    • Gamblr
      Junior Member
      • May 2020
      • 5

      #3
      I'd also be interested in this, how can I get an invitation to this slack group?

      Comment

      • LiamP
        Junior Member
        • Oct 2015
        • 284

        #4
        https://betfairlightweight.herokuapp.com/

        Comment

        Working...
        X