-
Notifications
You must be signed in to change notification settings - Fork 191
Update auto-generated code #2447
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. correct: minor mistake on example:
|
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. correct -- 252 trading days for the history request, fixes warning + performs the same |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. correct same as above ^ |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. correct |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. correct |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. correct |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| <p> To get historical Brain Wikipedia Page Views data, call the <code class="csharp">History</code><code class="python">history</code> method with the dataset <code>Symbol</code>. If there is no data in the period you request, the history result is empty.</p> | ||
| <div class="section-example-container"> | ||
| <pre class="python">history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY) </pre> | ||
| <pre class="csharp">var history = History<BrainWikipediaPageViews>(_datasetSymbol, 100, Resolution.Daily); </pre> | ||
| <pre class="python">history_df = self.history(self.dataset_symbol, 252, Resolution.DAILY) </pre> | ||
| <pre class="csharp">var history = History<BrainWikipediaPageViews>(_datasetSymbol, 252, Resolution.Daily); </pre> | ||
| </div> |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also correct https://www.quantconnect.com/datasets/brain-wikipedia-page-views changed wrapped in timedelta() to 252 instead for .py .cs |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. code is correct but Data Point Attributes (about) table is broken! |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. correct I think Supported Assets table is missing |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| <p>You can get historical universe data in an algorithm and in the Research Environment.</p> | ||
|
|
||
| <h4>Historical Universe Data in Algorithms</h4> | ||
| <p>To get historical universe data in an algorithm, call the <code class="csharp">History</code><code class="python">history</code> method with the <code>Universe</code> object and the lookback period. If there is no data in the period you request, the history result is empty.</p> | ||
|
|
||
| <div class="section-example-container"> | ||
| <pre class="csharp">var universeHistory = History(_universe, 30, Resolution.Daily); | ||
| foreach (var dividends in universeHistory) | ||
| { | ||
| foreach (EODHDUpcomingDividends dividend in dividends) | ||
| { | ||
| Log($"{dividend.Symbol} dividend on {dividend.DividendDate}: {dividend.dividend}"); | ||
| } | ||
| }</pre> | ||
| <pre class="python"># DataFrame example where the columns are the EODHDUpcomingDividends attributes: | ||
| history_df = self.history(self._universe, 30, Resolution.DAILY, flatten=True) | ||
|
|
||
| # Series example where the values are lists of EODHDUpcomingDividends objects: | ||
| universe_history = self.history(self._universe, 30, Resolution.DAILY) | ||
| for (_, time), dividends in universe_history.items(): | ||
| for dividend in dividends: | ||
| self.log(f"{dividend.symbol} dividend on {dividend.dividend_date}: {dividend.dividend}")</pre> | ||
| </div> | ||
|
|
||
| <h4>Historical Universe Data in Research</h4> | ||
| <p>To get historical universe data in research, call the <code class="csharp">History</code><code class="python">history</code> method with the <code>Universe</code> object, a start date, and an end date. This method returns the filtered universe. If there is no data in the period you request, the history result is empty.</p> | ||
|
|
||
| <div class="section-example-container"> | ||
| <pre class="csharp">var universeHistory = qb.History(universe, qb.Time.AddDays(-30), qb.Time); | ||
| foreach (var dividends in universeHistory) | ||
| { | ||
| foreach (EODHDUpcomingDividends dividend in dividends) | ||
| { | ||
| Console.WriteLine($"{dividend.Symbol} dividend on {dividend.DividendDate}: {dividend.dividend}"); | ||
| } | ||
| }</pre> | ||
| <pre class="python"># DataFrame example where the columns are the EODHDUpcomingDividends attributes: | ||
| history = qb.history(universe, qb.time-timedelta(30), qb.time, flatten=True)</pre> | ||
| </div> |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. correct in Accessing Data (Documentation) page: I am not sure if we should use |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is correct: self.history[EODHDUpcomingEarnings](timedelta(100), Resolution.DAILY).loc[self._symbol] fixed this too: |
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.
correct
https://www.quantconnect.com/datasets/bybit-cryptofuture-margin-rate-data