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:
Mark
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
Mark


Comment