Back

Option data in research environment

I am trying the tutorial for options in the research environment.

When I type:

opt = Options('spy', 'yahoo')

I get the error message: error name 'Options' is not defined

Do I need a library to import? How do I get data for options in the research environment?

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.


Hi Rupert,

I believe you are working with this, correct me if I'm wrong. This tutorial was written in a few years ago, and the main purpose is to introduce the ideas and mathematics behind Historical Volatility and Implied Volatility. And it was not written in our research environment, so you could run it as normal python script on your computer. Meanwhile, pandas.io.data has been replaced by pandas_datareader since pandas 0.19.0, so for Options you might want to import like this:
```from pandas_datareader.data import Options```
However, pandas_datareader has annouced that Yahoo! and Google have been immediately deprecated due to large changes in their API and no stable replacement. You could check back on their website for latest update and run the tutorial example once they resume support for Yahoo options.

Hope it helps!

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