Back

Fills in the paper trade broker

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

Update Backtest








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;
}
}

 

1

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.


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.

0

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.

0

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?

0

It refers to units of account currency. In this particular case: $0.1.

0

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.


Update Backtest





0

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.


Loading...

This discussion is closed