Skip to content
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

Merged
merged 15 commits into from
May 1, 2019

Conversation

AlexCatarino
Copy link
Member

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 as self.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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Non-functional change (xml comments/documentation/etc)

Checklist:

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • All new and existing tests passed.
  • My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

Symbol = config.Symbol,
Period = Period,
Value = (decimal)jToken[1],
Time = DateTimeConverter(jToken[0], format)
Copy link
Member

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.

@jaredbroad jaredbroad mentioned this pull request Apr 26, 2019
9 tasks
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.
@AlexCatarino AlexCatarino force-pushed the feature-3106-energy-information branch from 25d2cd9 to 295a812 Compare April 29, 2019 19:13
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.
@AlexCatarino AlexCatarino force-pushed the feature-3106-energy-information branch from 3b811b2 to 799ddf2 Compare April 30, 2019 19:49
@jaredbroad
Copy link
Member

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`.
@jaredbroad jaredbroad merged commit 3f00762 into master May 1, 2019
@AlexCatarino AlexCatarino deleted the feature-3106-energy-information branch May 1, 2019 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants