Skip to content

Commit

Permalink
Minor fix for option contract universe (#8337)
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin-Molinero authored Sep 20, 2024
1 parent 4d37096 commit 0b285df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 9 additions & 1 deletion Algorithm/Selection/OptionContractUniverse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class OptionContractUniverse : UserDefinedUniverse
/// <param name="configuration">The universe configuration to use</param>
/// <param name="universeSettings">The universe settings to use</param>
public OptionContractUniverse(SubscriptionDataConfig configuration, UniverseSettings universeSettings)
: base(configuration, universeSettings, Time.EndOfTimeTimeSpan,
: base(AdjustUniverseConfiguration(configuration), universeSettings, Time.EndOfTimeTimeSpan,
// Argument isn't used since we override 'SelectSymbols'
Enumerable.Empty<Symbol>())
{
Expand Down Expand Up @@ -95,5 +95,13 @@ public static Symbol CreateSymbol(string market, SecurityType securityType)

return new Symbol(sid, ticker);
}

/// <summary>
/// Make sure the configuration of the universe is what we want
/// </summary>
private static SubscriptionDataConfig AdjustUniverseConfiguration(SubscriptionDataConfig input)
{
return new SubscriptionDataConfig(input, fillForward: false);
}
}
}
5 changes: 0 additions & 5 deletions Engine/DataFeeds/FileSystemDataFeed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,6 @@ protected IEnumerator<BaseData> CreateUniverseEnumerator(SubscriptionRequest req
factory = new TimeTriggeredUniverseSubscriptionEnumeratorFactory(request.Universe as ITimeTriggeredUniverse,
_marketHoursDatabase,
_timeProvider);

if (request.Universe is UserDefinedUniverse)
{
return factory.CreateEnumerator(request, _dataProvider);
}
}
else if (request.Configuration.Type == typeof(FundamentalUniverse))
{
Expand Down

0 comments on commit 0b285df

Please sign in to comment.