LEAN is the open source
algorithmic trading engine powering QuantConnect. Founded in 2013 LEAN has been built by a
global community of 80+ engineers and powers more than a dozen hedge funds today.
Alpha League Competition: $1,000 Weekly Prize Pool
Qualifying Alpha Streams Reentered Weekly Learn
more
I have the data pulling in properly however it appears that there is forward bias in executing the trades during backtesting. For example, the algorithm fires a sell signal based on end of day data on 1/26 and issues a market on open order but that order is filled based upon opening prices on 1/26. I changed the frequency for the custom data import to daily and also modified the time property for the custom data to be at 5 PM as opposed to 00:00. Both the log entries for my slice events and the trade history shows the events occurring at 5 PM.
Any assistance / observations about using daily custom data in a backtesting scenario would be greatly appreciated!
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.
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.
Derek Tishler
16.1k
,
Could it be related to the use of fillforward for fills?
https://github.com/QuantConnect/Lean/issues/1572
0
Matthew Jones
70
,
Actually, I think I figured it out after trying the fillDataForward to False (which had no effect); I had the resolution for both my equities and my custom data set to daily based upon the sample code that I was borrowing from. I removed the daily resolution specification from the equity which is being bought/sold but left it in there for the custom data and the trades then executed at the market open price on the subsequent day following the signal.
I'm not sure if this is the correct solution as I would have thought that disabling the forward fill would prevent filling with previous days data. Could possibly have something to do with time zone / UTC?
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...
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!