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
def OnData(self, data: Slice):
# self.Debug(f"Has data? : {data.HasData}")
if not data.HasData:
return
for i in data.OptionChains: # only one option chain in this case, which is ES
optionchain: OptionChain = i.Value
if len([x for x in optionchain]) == 0:
continue
self.Debug("underlying price:" + str(optionchain.Underlying.Price))
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.
Jay Ma
282
,
Basically, the options on ES is having the same expiration cycles as ES.
Say ES has three expiration cycles, and if each cycle has three options expiration DTE, we should have 3 x 3 = 9 in total.
However the only thing that we get from options on ES contract is three expiration cycles with the SAME DTE as ES itself
0
Louis Szeto
STAFF
,
Hi Jay
We do not support weekly options for Futures yet.
Meanwhile, please note that if multiple Debug messages are sent within 1 second, the rate of its emission will be limited. Also, the message will be cropped to show only the first 2 lines within 200 characters. Please check this doc to find out more.
Best Louis
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.
Jay Ma
282
,
Hello @Louis Szeto,Â
This is NOT the root cause problem about weekly options.
As you can see, even if we print the distinct expiration dates without expiration filtering, we could only still get ONLY ONE expiration date….
Do you know why?
0
Louis Szeto
STAFF
,
Hi Jay
The date of this algorithm started at 18-03-2021, while the contract fetched expires at 18-06-2021, which is not expired yet.
Also, you've set a filter for the future option chain to get only the contract expires in the following 40-60 days. So, given weekly contracts are unavailable, it is expected to get only 1 expiration date or none at all.
Best Louis
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.
Jay Ma
282
,
Hello Louis Szeto,
Do you know when would we have weeklies available for index options / future options?
Thanks
0
Louis Szeto
STAFF
,
Hi Jay
We will include American weekly options for Futures and Index in the future, but right now, we do not have an exact ETA.
Best Louis
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.
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!