I'm looking to model my commissions and had some questions about the constantslippagemodel.
Suppose I bought and sold 10 units.
The slippage would occur on both sides of this trade, correct?
So suppose I have a slipage model set to 0.0001m, this would be 1 pip, and so if I had this on a forex algorithm, it would be 2 pips in commisisons (buy, and sell) that would add to the spread, so a 4 pip spread would become 6 pips in commissions, right?
Alexandre Catarino
The ConstantSlippageModel represents a slippage model that uses a constant percentage of slip.
If we want a constant value of slip, we need to implement it. Here is an example from the docs:
// 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; } }
The calculated slippage will be added to the fill price.
Yes, you are right. It would become 6 pips.
Andre Stevens
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!