This is really the only use case for this class, converting a local time to UTC properly.
Instead of enforcing this invocation pattern on all consumers, much cleaner to have the
type provide this functionality.
Prevents the subscription.RealtimePrice from being set in the
LiveTradingDataFeed if the exchange is closed. This is accomplished by
tweaking the DataHandler callbacks to check the exchange hours before
setting the real time price.
This change was made so that the LiveTradingDataFeed will respect the
market hours of the security.
Updates affected regression test as well.
It's very important for the data feed to stop on tz disconintuities to ensure we're using the correct utc offset
Adds concept of Subscription to contain everything a data feed needs in order to process single data feed item
Moves preparation of all data to data feed thread, algo thread receives data in format it needs
QCAlgorithm.SetUniverse( func ) allows selection based on market/symbol/dollar volume/price
Remove laziness from Slice as optimization, no order by in real time handler
Clean up offset provider
Fixes bug in GetBetterTypeName
Adds redelivered flag to log
Fixes bug in Slice.Time
Fire Slice only if data; Fire SecuritiesChanged after update
Add return to margin warning try/catch
Time sync:
* Data feeds are required to time sync in UTC time
* TimeSlice.Time is now in UTC
IAlgorithm
* Time is now exclusively the algorithm's local time zone
* Added UtcTime
* SetDateTime( DateTime ) accepts a UTC time and is internally converted
SubscriptionDataConfig
* Adds market and time zone as required ctor parameters
SecurityExchange
* Now passes most calls directly through to SecurityExchangeHours class
SecurityExchangeHours
* Holds market hours for each day of week (LocalMarketHours)
* Talks in terms of local times in the SecurityExchangeHours.TimeZone time zone
Data/market-hours/
* New data folder to hold market hour information
* Includes market-hours-database.csv to hold market hours per market/symbol/security (see doc in file)
* Includes holidays-usa.csv to hold holidays for 'usa' market
+ The holiday files follow the pattern 'holidays-*.csv' where * is the market
TimeKeeper
* Receives updates in UTC time
* Passes that to LocalTimeKeeper's who lazily evaluate the time in their respective time zones
* Eventually this can grow to be the sole source of time in the algorithm's scope
MISC:
* Fixes exception thrown when exiting LiveTradingDataFeed
* Fixes exception thrown when exiting FileSystemDataFeed
* Fixes exception thrown when exiting StatusPing
* Simplify FillForwardEnumerator logic with GetNextMarketOpen
* Adds many time zones, see TimeZones.cs