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'm trying to make decisions using standard deviation during trading days in another algorithm, but I've noticed that when prices and indicators change significantly during extended hours, it mistakenly throws off standard deviation thinking that levels have taken a significant jump from 4pm to what it thinks is the next step 9:30 the next day.
I'd like to be able to feed my consolidator with extended hours data so that things like standard deviation and other indicators like moving average etc can correctly follow the flow of data during extended hours and into the next trading day. I've tried adding the parameters "fillDataForward=True" and "extendedMarketHours=True" but these don't seem to be adding data to my consolidator. I've also tried making Resolution.Second also with no change. Any ideas/suggestions?
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.
Jonathan Ganucheau
699
,
I can see in the source code here that SubscriptionDataConfig accepts parameters for extendedMarketHours and fillDataForward (lines 86 & 87 and 137 & 138), but I'm seeing a way to push those parameters to self.SubscriptionManager or AddConsolidator for consolidators to be including that extended hour data.
0
Jonathan Ganucheau
699
,
I meant to say I'm NOT seeing a way to push those parameters. Anyone know of a way to do this in Python?
0
Rahul Chowdhury
39.9k
,
Hey Jonathan,
Named parameters are currently not supported. To enable extended market hours you need to fill in all the parameters in AddEquity.
Thank you, Rahul! That did it! I'll have to go through my other algorithms to see if I'm using named parameters anywhere else too. I'm attaching the successful backtest with more consistent std dev and extended hours results. Thanks again!
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!