HI,
i need to find all the expiry that are happening today.
I am confused which of the following to use,
option.SetFilter(-7, 7, timedelta(0), timedelta(1)) or option.SetFilter(-7, 7, timedelta(0), timedelta(0))
QUANTCONNECT COMMUNITY
HI,
i need to find all the expiry that are happening today.
I am confused which of the following to use,
option.SetFilter(-7, 7, timedelta(0), timedelta(1)) or option.SetFilter(-7, 7, timedelta(0), timedelta(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.
Akash
found out the answer.We can use sorted with reverse=True and get the expiry present at index[-1].
Akash
HI ,
In some dates i am not able to find the option having expiry for that particular day,
I want to know whether there is expiry for every option(lets say google) every day ?or there are days where option expiry is not present?
Iouri Verchok
Akash,
As a rule, stock options expire on the third Friday of the expiration month. (see cboe's : https://www.cboe.com/products/options-on-single-stocks-and-exchange-traded-products/options-on-single-stocks/equity-options-specs)
Also, growing number of actively traded stocks/ETFs have weekly expirations on each Friday. Still, some even more actively traded securities, say 'SPY' have expirations on Mondays, Wednesdays and Fridays. For more info you may check: https://www.cboe.com/products/weeklys-options/available-weeklys
Akash
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!