How are fills processed in the paper trade broker, is it using the ask price for buy orders and bid for sell orders, or is it using the last price for the order fills?
What I am seeing is that trades in the paper trade brokerage almost always have a 0.01 - 0.02 better fill than trades being placed in my Interactive Brokers account, where I have the same strategy running locally and connecting to TWS API.
These trades are for the Index ETFs (QQQ, SPY, IWM, and DIA), so liquidity should not be an issue.
thanks,
-Rob
Alexandre Catarino
We use last trade price for the fills.
Please checkout the docs under the Reality Modelling section where we explain how to set up a custom slippage model to account for slippage:
// Assigning securities custom slippage models: Securities["SPY"].SlippageModel = new CustomSlippageModel() // Custom slippage implementation public class CustomSlippageModel : ISlippageModel { public decimal GetSlippageApproximation(Security asset, Order order) { return 0.1m; } }
Petter Hansson
I'm studying the same subject at the moment. Reading the link above, I wasn't aware that custom fill models were possible, so I will try that next. Simply putting additional slippage on top of my limit orders won't really cut it for my intraday algo.
Petter Hansson
Implemented a custom fill model tonight that gradually fills orders assuming the worst regarding price, it was very worth the effort. I will share it later on if I'm certain it's free of bugs.
Tim De Lise
Hi Alexandre Catarino I was wondering what the returned value there actually means, since a simple explanation of that is missing from the docs. So 0.1 means 0.1 percent or 0.001 for slippage?
Alexandre Catarino
It refers to units of account currency. In this particular case: $0.1.
Roberto Terpilowski
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!