I have been looking on the forums for hours but couldnt find template for this simple algo. There is one from Ekz but it throws a key error. I am referring to - 

"Runtime Error: '?SPY' wasn't found in the OptionChains object, likely because there was no-data at this moment in time and it wasn't possible to fillforward historical data. Please check the data exists before accessing it with data.ContainsKey("?SPY") in DataDictionary.cs:line 228"

Could someone please help me to resolve the error in this backtest?