But cant fully understand why midprice would be better in historical order simulation.
Good question. In both cases you will have to create a model that will get over the execution threshold, obviously, and thus have to apply transaction costs to the backtest. If you are backtesting it at mid as I am suggesting, you will know your strategy risk parameters as well as trade value (i.e. changes in target quantity), PnL per tradevalue and periodic volume participation. Taking the TCA data for your execution setup (which can be arbitrarily complex even if you are a retail trader), you will see if your strategy is making enough to overcome your expected execution cost. The benefits are (in no particular order):
- being able to use much larger set of TCA data to optimize execution. If you want to be anal, you can have your strategy also output tradevalue per intraday buckets so you can use TCA specific to the volume skew.
- take into account recent changes in liquidity or microstructure. Imagine that something has changed fairly recently, but you are backtesting for the last 10 years. You can use the most recent data to figure out what the expected T-costs are currently and apply that to your full backtest.
- you will be instantly able to re-evaluate viability of each strategy (live or in-conservation) when you change your execution setup by adding new broker algos or new order types. That also includes the case where you add another strategy and start crossing positions between the two strategies when necessary.
- finally, it will give you an easy set of metrics to watch if you are tweaking parameters to increase PnL/tradevalue. There are various techniques to increasing PnL per trade without overfitting the strategy such as adding hysteresis or cost-of-risk parameters.