-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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] Replace Yahoo Finance functionalities with a different source #4169
Comments
To get the allocations of SECTORS for spy, we can do:
|
Found the following internal API to get financials
|
Here's how you get all the VanGuard stuff:
Replace VTI with |
Here's another resource for US-listed ETFs:
|
Any other ETF from FMP - at the free level - does not return results. For example, https://financialmodelingprep.com/api/v3/etf-holdings/QQQ?apikey= |
On another note, it seems unnecessary to delete functions. The goal should be to remove the blockers which break the terminal as a result of a single point of failure and that helper functions do not cheat to get some basic metadata from yFinance instead of the Despite the error message being printed, this is the actual DataFrame being returned from yFinance. |
Need to add
|
The point of the PR will just be to delete those that currently do not work or find a replacement where possible. So anything I can replace with an actual supported official API, I'll do and nothing that points to a website or result into scraping a webpage that can change over time again. Especially since it will be against their ToS or/and will be unusable in the OpenBB Terminal Pro solution. |
This is false, some are indeed behind a Premium endpoint but that doesn't mean all are.
|
What about that other lib that needs YFinance to work? :P |
Which one? |
It's something about a database in the finance world |
Doesn't rely on yFinance though, just updating which I already confirmed is not going to happen anymore :) |
ok well we should get rid of that too then - or we just asking for trouble later |
It needs to be removed at some point yes but that would mean we are deleting the entire |
Yes but eventually we are going to have people asking "why can't I find X ticker?" And our answer shouldn't be - "well we aren't updating that database anymore" |
Correct but we would need to find a replacement then first that doesn't only cover the American exchanges but any exchange. In essence the only tickers that are missing are the ones that IPO recently which is only a very small percentage of the total amount of companies available as there are 155.000 tickers in there. And even then, I can just manually add them in. So really, before we have people consistently spamming us that they can't find a company they are looking for and it becomes impossible for me to update it, you are looking at several years. I am all for when we find something free that matches it and does update, of course. E.g. I realised Meta was still called Facebook so a quick CTRL + H fixed that. |
Maybe we can work on something once some Dev time is freed up later this year then |
Quality > Quantity. What does anyone need obsolete market cap data for? The SIA menu has lots of issues, and the stats presented have no way to be verified. For example, there are definitely more than six companies in the Financial Sector. The names of those companies can't be displayed. What purpose is this data serving? There isn't anything unique about a list of exchange-traded products. Every single exchange in the world maintains a list of symbols, and it is updated daily. There are myriads of reasons why a symbol is updated, added, or removed. IPOs don't even crack the top ten. https://www.statista.com/statistics/1277216/nyse-nasdaq-comparison-number-listed-companies/
Here's "companies per Industry based on Country (and Market Cap)" - with no market cap. According to these statistics the Russell 2000 or Wilshire 5000 probably shouldn't exist. https://www.investopedia.com/terms/f/financial_sector.asp
|
This is relevant since yet again Yahoo Finance has broken down (partly), see the following ticket: ranaroussi/yfinance#1407 (also mentioned in #4168)
The ones that will most likely need replacing to another source are:
stocks/fa/sust
(actually broken) Removed ✅stocks/quote --source YahooFinance
Removed ✅stocks/etf/summary
(actually broken) Removed ✅stocks/etf/weights
(actually broken) --> https://financialmodelingprep.com/api/v3/etf-sector-weightings/SPY?apikey=KEY. Replaced with FMP ✅stocks/etf/holdings
sinceStockAnalysis
is also scraper (or make it secondary) --> https://financialmodelingprep.com/api/v3/etf-sector-weightings/SPY?apikey=KEYstocks/etf/countries
--> https://financialmodelingprep.com/api/v3/etf-country-weightings/SPY?apikey=KEYstocks/etf/news
(broken, not entirely important so can also be removed) Removed Yahoo Finance dependency. ✅portfolio/load
(no data for benchmark available) All Yahoo Finance info statements taken out of the equation. ✅portfolio/po
--> "Other Optimization Techniques" will fail due to Yahoo Finance. I strongly advise to remove all of these other methods, these are just to play with the technique and are absolutely not great optimisation techniques. Let's stick to the methods deployed by, an expert at the topic: https://github.com/dcajasn/Riskfolio-Lib, and not invent our own. Most removed or changed ✅The ones that can be deleted since we have an alternative already (but not a priority since not the main source):
stocks/fa/overview --source Yahoo Finance
(can just be deleted)stocks/fa/revfc --source YahooFinance
(can just be deleted)stocks/quote --source YahooFinance
(can just be deleted)stocks/fa/earnings --source YahooFinance
(can just be deleted)stocks/fa/income --source YahooFinance
(can just be deleted)stocks/fa/balance --source YahooFinance
(can just be deleted)stocks/fa/cash --source YahooFinance
(can just be deleted)The ones that seem to have worked extensively thus lower priority.
stocks/fa/divs
--> https://financialmodelingprep.com/api/v3/historical-price-full/stock_dividend/AAPL?api_key=API_KEYstocks/fa/splits
--> https://financialmodelingprep.com/api/v3/historical-price-full/stock_split/AAPL?apikey=KEYstocks/fa/shrs
(could be broken at some point)stocks/fa/mgmt
(could be broken at some point)We also have in
stocks/disc
the following:And in
dps
:Since they haven't broken yet, no need to replace.
The text was updated successfully, but these errors were encountered: