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

only retrieve required latest records from historical stock data source #2

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

calvindotsg
Copy link
Owner

@calvindotsg calvindotsg commented Feb 18, 2024

If this ticker name exists, access existing ticker collection, and proceed with the following logic:

  1. for this ticker, retrieve the most recent date as document id
  2. most recent date is defined as start date
  3. current date is defined as end date
  4. query historical stock price data store using this start and end date to retrieve stock price data to be inserted
  5. Existing stock data in firestore is not required to be retrieved again

Tested in local

  1. Retrieved ticker list from CSV and printed StockData retrieved from historical stock price data source
Screenshot 2024-02-19 at 12 43 48 AM
  1. StockData stored in Firestore
Screenshot 2024-02-19 at 12 44 42 AM

If this `ticker` name exists, access existing `ticker` collection, and proceed with the following logic:
1. for this ticker, retrieve the most recent `date` as document id
2. most recent date is defined as start date
3. current date is defined as end date
4. query historical stock price data store using this start and end date to retrieve stock price data to be inserted
5. Existing stock data in firestore is not required to be retrieved again
@calvindotsg calvindotsg self-assigned this Feb 18, 2024
@calvindotsg calvindotsg marked this pull request as ready for review February 18, 2024 16:42
Copy link

github-actions bot commented Feb 18, 2024

Qodana Community for Python

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@calvindotsg calvindotsg marked this pull request as draft February 18, 2024 16:47
2. renames ticker to symbol to match Openbb terminology
3. fix lint issues
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.

1 participant