Back

Option strategy - Long butterfly

Hi, testing Long Butterfly on SPY.

  • Buy 1 ATM Call
  • Buy 1 ATM Put
  • Sell 1 OTM Call to decrease cost of Long Call
  • Sell 1 OTM Put to decrease cost of Long Put

Overall, it works as expected, but I'm getting a lot of errors like this. Does anybody know why and how to fix it?1181 | 05:18:56: Backtest Handled Error: The security with symbol 'SPY 180202P00266000' is marked as non-tradable.
1182 | 05:18:57: Backtest Handled Error: The security with symbol 'SPY 180202P00261000' is marked as non-tradable.
1183 | 05:18:58: Backtest Handled Error: SPY 180207P00255000: asset price is $0. If using custom data make sure you've set the 'Value' property.
1184 | 05:19:00: Backtest Handled Error: SPY 180209P00253500: asset price is $0. If using custom data make sure you've set the 'Value' property.
1185 | 05:19:00: Your algorithm messaging has been rate limited to prevent browser flooding.

Update Backtest








For OptionChainProvider, you need to wait until the next time step to receive the data after adding the contract with "AddOptionContract()". Therefore, the first time you place the order over the contract which was just added at the same time, there is the error message.

1

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