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

Improve Forex Helper #3351

Merged
merged 5 commits into from
Nov 10, 2022
Merged

Improve Forex Helper #3351

merged 5 commits into from
Nov 10, 2022

Conversation

colin99d
Copy link
Contributor

@colin99d colin99d commented Nov 9, 2022

Description

Fixes #3235

Currently the forex_helper uses the stocks_helper instead of calling yfinance on its own. This creates a lot of needless errors. I switched the forex_helper to just calling yf.download directly. This reduced the amount of code needed, and allows for all intervals to be called for yfinance.

Also makes the functionality to get the interval smarter for the SDK.

How has this been tested?

  • Please describe the tests that you ran to verify your changes.
  • Provide instructions so we can reproduce.
  • Please also list any relevant details for your test configuration.
  • Make sure affected commands still run in terminal
    • python terminal.py "forex/load USDHUF -i 3month"
    • python terminal.py "forex/load USDHUF -i 1day --source AlphaVantage"
  • Ensure the SDK still works
    • openbb.forex.load("USD", "GBP", interval="1day")
  • Check any related reports
    • python terminal.py reports/forex USDGBP

Checklist:

Others

  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.

@colin99d colin99d added the bug Fix bug label Nov 9, 2022
@colin99d colin99d merged commit fb1392b into main Nov 10, 2022
@colin99d colin99d deleted the fix_3235 branch November 10, 2022 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fix bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] equity and forex default reports breaking
2 participants