Hi Guys,
I have a strategy that always loose money. Thats fine because in many cases only doing the inverse will make you earn money. Its like accepting the alternative hypotesis... lol.
The problem is that even changing the positions directions I still have a constant down slope in my equity curve.
So I start debuging to see what I'm doing wrong and put slippage and fee models to None to be more easy to find the error. But we still loose money. After another debug I found that the inverse orders are being executed with a huge price difference only changing the direction and this is including in the MOC orders that should be executed at the MOC official price, right?
Lets make an example:
- 1st backtest - Buy XLV at MOC - filled at @100.71
- 2nd backtest - Sell XLV at MOC - filled at @100.68
There is something that I need to read about fill orders? because I cant find how market and moc orders are filled. And there some way to change ir to execute at mid bid/ask or open bar price or for moc orders at the auction close price? my orders are quite small in notional.
tks,
Alexandre Catarino
Hi Felipe Palhares Hampshire ,
Right, MOC orders should be filled at the official closing price and they are being filled with the ask and bid prices.
We are aware of the issue with MOC orders introduced with new support for L1 data for Equity and will review our default fill model as soon as possible. Meanwhile, the algorithm can implement a custom fill model with the desired behavior.
Oldrich S
I have noticed the behaviour as well, it's quite confusing.. I suppose same issue apply to the opening auctions, right?
It will be great to have this fixed, because auctions are becoming quite popular in equities quant world and many people can come to wrong conclusions based on this error...
Oldrich S
Issue at github for this:
https://github.com/QuantConnect/Lean/issues/4655Felipe Palhares Hampshire
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!