Custom data universe selection market hours (#7270)
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
- Custom data universe selection market hours. Adding regression test asserting the behavior. Updating existing tests due to market hours change, triggering selection always, even the 4th of July 2018
This commit is contained in:
@@ -491,12 +491,7 @@ namespace QuantConnect.Algorithm
|
||||
[DocumentationAttribute(Universes)]
|
||||
public Universe AddUniverse(Type dataType, SecurityType securityType, string name, Resolution resolution, string market, UniverseSettings universeSettings, PyObject pySelector)
|
||||
{
|
||||
var marketHoursDbEntry = MarketHoursDatabase.GetEntry(market, name, securityType);
|
||||
var dataTimeZone = marketHoursDbEntry.DataTimeZone;
|
||||
var exchangeTimeZone = marketHoursDbEntry.ExchangeHours.TimeZone;
|
||||
var symbol = QuantConnect.Symbol.Create(name, securityType, market, baseDataType: dataType);
|
||||
var config = new SubscriptionDataConfig(dataType, symbol, resolution, dataTimeZone, exchangeTimeZone, false, false, true, true, isFilteredSubscription: false);
|
||||
|
||||
var config = GetCustomUniverseConfiguration(dataType, name, resolution, market);
|
||||
var selector = pySelector.ConvertToDelegate<Func<IEnumerable<IBaseData>, object>>();
|
||||
|
||||
return AddUniverse(new FuncUniverse(config, universeSettings, baseDatas =>
|
||||
|
||||
Reference in New Issue
Block a user