diff --git a/Common/Data/Market/OptionContract.cs b/Common/Data/Market/OptionContract.cs index 9ad407c5a16d..3d44ec15f2c9 100644 --- a/Common/Data/Market/OptionContract.cs +++ b/Common/Data/Market/OptionContract.cs @@ -193,11 +193,11 @@ public static implicit operator Symbol(OptionContract contract) /// internal override void Update(BaseData data) { - if (data.Symbol == Symbol) + if (data.Symbol.SecurityType.IsOption()) { _optionData.Update(data); } - else if (data.Symbol == UnderlyingSymbol) + else if (data.Symbol.SecurityType == Symbol.GetUnderlyingFromOptionType(Symbol.SecurityType)) { _optionData.SetUnderlying(data); } diff --git a/Research/QuantBook.cs b/Research/QuantBook.cs index cba794b76e6e..c0ff81349667 100644 --- a/Research/QuantBook.cs +++ b/Research/QuantBook.cs @@ -429,12 +429,9 @@ public OptionHistory OptionHistory(Symbol symbol, DateTime start, DateTime? end var allSymbols = new HashSet(); var optionFilterUniverse = new OptionFilterUniverse(option); - var marketHoursEntry = MarketHoursDatabase.GetEntry(symbol, new[] { typeof(OptionUniverse) }); foreach (var date in QuantConnect.Time.EachTradeableDay(option, start, end.Value.AddDays(-1), extendedMarketHours)) { - var prevTradableDate = QuantConnect.Time.GetStartTimeForTradeBars(marketHoursEntry.ExchangeHours, start, - QuantConnect.Time.OneDay, 1, extendedMarketHours: false, marketHoursEntry.DataTimeZone); var universeData = GetChainHistory(symbol, date, out var underlyingData); if (underlyingData is not null)