I am building out an ATS stack to connect with IB (using the TradeLink framework to connect) and wanted to see if anyone has advice regarding how to best simulate order execution.
I rely heavily on limit orders at or slightly inside the NBBO (so a buy limit equal to best bid or best bid + 0.01) rather than market orders. I think this will create a couple of issues with regard to accurately testing my executions.
1) I assume when I use my papertrading account, which is based on live market data, my papertrading buy order doesn't appear on the NBBO since it's not real.
2) Also, I'm not sure whether the IB paper trading account is smart enough to execute my limit order (which is not displayed on the real NBBO) when the quote crosses it, or only an executed trade. As an example, the market is at 1.00 x 1.02, I place a (paper) limit buy order at 1.01. If the market moves to 1.00 x 1.01 but no order has been executed at 1.01 or less, will my buy order simFill?
If TWS paper trading doesn't handle these situations, does anyone know of a good solution? I've verified that TradeLink's simulator is not sophisticated to handle this scenario so that's not an option at present.
I know one route is to build my own simulator from scratch but I'd prefer to avoid that if at all possible
I rely heavily on limit orders at or slightly inside the NBBO (so a buy limit equal to best bid or best bid + 0.01) rather than market orders. I think this will create a couple of issues with regard to accurately testing my executions.
1) I assume when I use my papertrading account, which is based on live market data, my papertrading buy order doesn't appear on the NBBO since it's not real.
2) Also, I'm not sure whether the IB paper trading account is smart enough to execute my limit order (which is not displayed on the real NBBO) when the quote crosses it, or only an executed trade. As an example, the market is at 1.00 x 1.02, I place a (paper) limit buy order at 1.01. If the market moves to 1.00 x 1.01 but no order has been executed at 1.01 or less, will my buy order simFill?
If TWS paper trading doesn't handle these situations, does anyone know of a good solution? I've verified that TradeLink's simulator is not sophisticated to handle this scenario so that's not an option at present.
I know one route is to build my own simulator from scratch but I'd prefer to avoid that if at all possible