Hi, Folks:

I am a newbie with QC and am building a backtester for weekly covered calls.  Because of the weekly calls, I have to access the option chain from the Slice argument in OnData(), using the following code snippet that I found in a QC thread:

OptionChain otmCalls;

if (slice.OptionChains.TryGetValue(_equitySymbol.Value, out otmCalls))  {

    // do something

}

It turns out that TryGetValue is always returns nothing because the AMD option chain is actually named "?AMD" instead of "AMD".  So for now, I can get it to work by prepending "?" to the equity name, but this feels like a hack.  Is this a bug in OptionChains, or am I doing something wrong here?

To give you the whole picture, algo.Initialize() contains the following code that sets up the equity and option for the covered call:

            UniverseSettings.DataNormalizationMode = DataNormalizationMode.Raw;
            
            var equity = AddEquity("AMD", Resolution.Minute);
            equity.SetDataNormalizationMode(DataNormalizationMode.Raw);
            _equitySymbol = equity.Symbol;
            
            var option = AddOption(_equitySymbol.Value, Resolution.Minute, /* market */ null, /* fill forward */ true, /* leverage */ 0m);
            
            // option coarse filter
            option.SetFilter
            (
                universe =>
                (
                    from symbol in universe
                            .IncludeWeeklys()
                            .Strikes(-3, 3)
                            .Expiration(TimeSpan.FromDays(4), TimeSpan.FromDays(10))
                            where
                                symbol.ID.OptionRight == OptionRight.Call
                                && symbol.ID.StrikePrice - universe.Underlying.Price > 0
                    select symbol
                )
            );

Your comments and suggestions will be much appreciated.

Thank you,

Yigal