Back

Weekly options in notebook

Is there any way I can get access to weekly options in a notebook?
The only way to have access to weekly options, that I know of, is that of using a Universe Selection Function. Unfortunately, I know no way to use a Universe Selection Function in a notebook: the examples provided only uses SetFilter().

Using a Universe Selection Function in a notebook would be very useful.

Many thanks!

Update Backtest







Hi Joseph Cohen Bacchilega, we would expect that what you did would work or:

class MyQuantBook(QuantBook):
def UniverseFunc(self, universe):
return universe.IncludeWeeklys().Strikes(-2, 2).Expiration(timedelta(0), timedelta(365*2))
qb = MyQuantBook()
spy = qb.AddOption("GOOG")
spy.SetFilter(qb.UniverseFunc)

but neither works and throw the same exception that doesn't give us much information.

We are going to look into it. Thank you for the report.

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.


Update Backtest





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.


Loading...

This discussion is closed