Skip to content

Commit

Permalink
Remove ZipEntryName other classes and unused code
Browse files Browse the repository at this point in the history
Removed ZipEntryName class and references across various files.
Removed DataQueueFuturesChainUniverseDataCollectionEnumerator and DataQueueOptionChainUniverseDataCollectionEnumerator classes.
Removed OptionChainUniverseSubscriptionEnumeratorFactory class.
Removed unused code for handling OptionChainUniverse and FuturesChainUniverse in FileSystemDataFeed.cs and LiveTradingDataFeed.cs.
Removed several test files related to enumerator factories and universe data collection.
  • Loading branch information
jhonabreul committed Jan 8, 2025
1 parent 95b3e20 commit 679866d
Show file tree
Hide file tree
Showing 18 changed files with 59 additions and 1,328 deletions.
98 changes: 0 additions & 98 deletions Common/Data/Auxiliary/ZipEntryName.cs

This file was deleted.

2 changes: 1 addition & 1 deletion Common/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4114,7 +4114,7 @@ public static bool ShouldEmitData(this SubscriptionDataConfig config, BaseData d
var expectedType = type.IsAssignableTo(config.Type);

// Check our config type first to be lazy about using data.GetType() unless required
var configTypeFilter = (config.Type == typeof(TradeBar) || config.Type == typeof(ZipEntryName) ||
var configTypeFilter = (config.Type == typeof(TradeBar) || config.Type.IsAssignableTo(typeof(BaseChainUniverseData)) ||
config.Type == typeof(Tick) && config.TickType == TickType.Trade || config.IsCustomData);

if (!configTypeFilter)
Expand Down
15 changes: 3 additions & 12 deletions Common/Util/LeanData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static class LeanData
private static readonly HashSet<Type> _strictDailyEndTimesDataTypes = new()
{
// the underlying could yield auxiliary data which we don't want to change
typeof(TradeBar), typeof(QuoteBar), typeof(ZipEntryName), typeof(BaseDataCollection), typeof(OpenInterest)
typeof(TradeBar), typeof(QuoteBar), typeof(BaseDataCollection), typeof(OpenInterest)
};

/// <summary>
Expand Down Expand Up @@ -1030,7 +1030,7 @@ public static TickType GetCommonTickTypeForCommonDataTypes(Type type, SecurityTy
{
return TickType.OpenInterest;
}
if (type == typeof(ZipEntryName))
if (type.IsAssignableTo(typeof(BaseChainUniverseData)))
{
return TickType.Quote;
}
Expand Down Expand Up @@ -1516,17 +1516,8 @@ public static bool SetStrictEndTimes(IBaseData baseData, SecurityExchangeHours e
return false;
}

var isZipEntryName = dataType == typeof(ZipEntryName);
if (isZipEntryName && baseData.Time.Hour == 0)
{
// zip entry names are emitted point in time for a date, see BaseDataSubscriptionEnumeratorFactory. When setting the strict end times
// we will move it to the previous day daily times, because daily market data on disk end time is midnight next day, so here we add 1 day
baseData.Time += Time.OneDay;
baseData.EndTime += Time.OneDay;
}

var dailyCalendar = GetDailyCalendar(baseData.EndTime, exchange, extendedMarketHours: false);
if (!isZipEntryName && dailyCalendar.End < baseData.Time)
if (dailyCalendar.End < baseData.Time)
{
// this data point we were given is probably from extended market hours which we don't support for daily backtesting data
return false;
Expand Down

This file was deleted.

Loading

0 comments on commit 679866d

Please sign in to comment.