Posted By: AndrewAMD
[Test] mode: Simulate both market *and* limit orders - 07/05/22 13:59
This much is obvious:
1) To simulate market orders, you need bid and ask. Your order fills at an unfavorable price.
2) To simulate limit orders, you need tick data. Your order may fill at a favorable price... or it won't fill at all.
But how do you realistically simulate both simultaneously? It sounds like you need both bid-ask and tick data, so there would be multiple datasets loaded per asset, correct?
Example scenario: I patiently open a limit order at 4pm. It's now 4:29pm and the order did not fill yet. I become impatient because the market closes at 4:30pm and convert the order into a market order.
1) To simulate market orders, you need bid and ask. Your order fills at an unfavorable price.
2) To simulate limit orders, you need tick data. Your order may fill at a favorable price... or it won't fill at all.
But how do you realistically simulate both simultaneously? It sounds like you need both bid-ask and tick data, so there would be multiple datasets loaded per asset, correct?
Example scenario: I patiently open a limit order at 4pm. It's now 4:29pm and the order did not fill yet. I become impatient because the market closes at 4:30pm and convert the order into a market order.