-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds Custom Data from US Energy Information Administration (eia.gov) #3136
Conversation
…ig file for users to set their EIA token
This file was renamed to USEnergyInformation.cs
The start time is the beginning of the quarter
The `USEnergyInformation.Reader` was not taking into account the data time zone and the date of the data collection should be the end time of the series. - Adds missings auth code logic in `SubscriptionDataReader`.
Symbol = config.Symbol, | ||
Period = Period, | ||
Value = (decimal)jToken[1], | ||
Time = DateTimeConverter(jToken[0], format) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the long delays in emitting; please update to factor in an approximation:
EndTime = jToken[0] + (lastUpdatedTime-endTime)
Also given it is now EndTime focused please update Quarters to 0331 etc.
Adds `CloseTime` to represent the time that the data period end. `EndTime` represents, in turn, the time the data is emmited. There is an offset between `CloseTime` and `EndTime` that is defined by the difference between the last bar as emitted and its time.
25d2cd9
to
295a812
Compare
In live mode, if the `USEnergyInformation.Reader` returns null, the `CollectionSubscriptionDataSourceReader.Read` method will pull for new data constantly. Therefore it should return an empty `BaseDataCollection` object.
3b811b2
to
799ddf2
Compare
We need to create a "No New Data" Signal for custom data types which can address the null return problem. We should also review all existing custom data (quandl) implementations to confirm they're returning OK. |
Improves comments to explain the difference between `EnergyDataPointCloseTime` and `EndTime`.
Description
Built new custom data class for US Energy Information Administration data. Accommodates hourly, daily, monthly, quarterly, and yearly resolutions.
Related Issue
Closes #3106
Motivation and Context
Adds new custom data class to expand current custom data capabilities and add functionality for users.
Requires Documentation Change
Not likely, although updates to custom data documentation will be needed if deemed necessary. Additionally, documentation updates may be needed for Python indicators since it has been found that
self.EMA
returns the same asself.EMA.Current.Value
, at least when formatted in logging. This will need further testing.How Has This Been Tested?
Tested locally across numerous tickers and resolutions.
Tested in QuantConnect Cloud in backtesting and live mode.
Types of changes
Checklist:
bug-<issue#>-<description>
orfeature-<issue#>-<description>