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

Historical data when symbol was restructured (renamed) #10

Conversation

Romazes
Copy link
Collaborator

@Romazes Romazes commented Mar 15, 2024

Description

Currently, our data source supports both adjusted and unadjusted historical data for up to 15 years. However, there's a little twist: we're not always using the actual ticker name for historical data requests. Instead, we're sticking to the current ticker name, even if it had a different name in the past.

Here's the main point: we need to consistently use the actual ticker name, even if it had another name in the past, to ensure accuracy and reliability in our historical data.

Here's what I've done to address this:

  • Implemented validation to ensure that the symbol always reflects the last trading ticker name based on DateTime.Now.
  • Added the volatile keyword to prevent spamming flags for multi-threading interactions, enhancing the stability of our system.
  • Refactored the DataDownloader to a more general format similar to other data sources, resulting in cleaner and more efficient code.
  • Fixed a bug related to DateTime zones when creating a new Trade bar in history requests.

These changes should streamline our data handling process and improve the accuracy of historical data retrieval.

Related Issue

N/A

Related PR

Motivation and Context

The motivation behind these changes is twofold. Firstly, by ensuring that our historical data requests accurately reflect the actual ticker names used during the corresponding trading periods, we aim to enhance the reliability and integrity of our data processing pipeline. This not only fosters trust in the data but also aligns with industry best practices for maintaining accurate historical records.

Secondly, adopting this approach assists users in creating flexible algorithms for their trading strategies. By providing historical data with consistent and accurate ticker names, we empower users to develop algorithms that adapt more seamlessly to changes in ticker names over time. This flexibility is crucial for implementing robust and adaptive trading strategies that can navigate evolving market conditions effectively.

Together, these enhancements not only improve the quality of our data but also contribute to the overall usability and effectiveness of our platform for traders and algorithm developers alike.

Requires Documentation Change

N/A

How Has This Been Tested?

  • Test Case for ancient historical data.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (non-breaking change which improves implementation)
  • Performance (non-breaking change which improves performance. Please add associated performance test and results)
  • 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.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

feat: add overloading of CreateHistoryRequest
feat: prevent spamming flag for limit of minute data
refactor: reduce some part of code
test:feat: get ancient historical data (renamed symbol test)
Copy link
Member

@Martin-Molinero Martin-Molinero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! 👍

@Martin-Molinero Martin-Molinero merged commit 6d3d9f6 into QuantConnect:master Mar 18, 2024
1 check failed
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.

2 participants