Back

Options Strategy - Covered Call

Here is a basic covered call options strategy (sell call options + buy the underlying stocks) developed with Python. 

Update Backtest






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.



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.

0

Hi Shawn Wong, check the algorithms in this updated tutorial 

https://www.quantconnect.com/tutorials/applied-options-covered-call/
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.


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: 128


Am I missing something here? Thanks.

  

0


Hi Shawn, this is an old post I've already fixed the algorithm in the tutorial. 

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