Here is a basic covered call options strategy (sell call options + buy the underlying stocks) developed with Python.
QUANTCONNECT COMMUNITY
Here is a basic covered call options strategy (sell call options + buy the underlying stocks) developed with Python.
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.
Shawn Wong
Thanks for the sample code! I have noticed a couple of issues with this sample code:
1. The contracts list isn't always correct. It's expected that the ATM options are always chosen, but it seems that this isn't the case. Probably the filtering logic for options isn't working as expected?
2. chain.Underlying.Price returns different result from self.Securities[self.symbol].Price. It seems that the one from Securities is correct.
Jing Wu
Hi Shawn Wong, check the algorithms in this updated tutorial
Shawn Wong
I have cloned your sample code and printed the prices and ATM strikes. However, they defer quite largely:
2016-01-04 09:31:00 :Price: 125.53601268750; ATM Strike: 1352016-02-19 00:00:00 :Price: 124.09711442700; ATM Strike: 1292016-02-20 00:00:00 :Price: 124.67792676900; ATM Strike: 128Am I missing something here? Thanks.
Jing Wu
Hi Shawn, this is an old post I've already fixed the algorithm in the tutorial.
Jing Wu
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!