Hi there,

I'm trying to create code that identifies those underlyings that are having earnings days in 7 days, add them to my universe to buy a long straddle, then sell those positions on earnings day.

With my code it seems to be identifying those items in the universe that are having earnings days in 7 days and adding them, however:

                if (data.OptionChains.TryGetValue(OptionSymbol, out chain))

this is never evaluating to true (and I'm thus never executing a trade). I've debuged the OptionSymbol object and it's not undefined or anything, thoughts? According to this file: http://data.quantconnect.com/option/usa/options.txt 'fb,' for instance, should have options data.

My code is attached.

Thanks for the help!

Author