I am working on my first investment algorithm, and I am using the following list of stock symbols and company names: https://public.acho.io/embed/9bffe75f11a5a99349359c98c74b9b0ba41cf563b351ffbb7ecc19614706f827861e5171a35b6f8296aa1d43a7558cfb978ae74ac969094d1c991bf7d8c8ca9f (the original of which is available here: https://unibit.ai/api/docs/V2.0/stock_coverage).

The problem that I am encountering is that a large part of the symbols that are listed in this file do not exist on Yahoo Finance. This leads to a lot of unnecessary processing, because the yfinance API runs into a lot of errors, which are handled recursively.

My question: is there any quick way in which I can convert the name of a company into the Yahoo stock symbol? e.g. Royal Dutch Shell plc --> RDSA.AS

Thanks in advance!

  • $\begingroup$ To m knowledge, you might try to find mappings using ‚related‘ vendors,like Alphavantage. They should result in symbols that are identical most of the time, at least for US stocks. From personal experience, the IEX Cloud API offer an endpoint for translating ISINs / FIGIs into a listig all available symbols (per isin). Again, those symbols should be identical to yahoo‘s a at least for the US. The endpoint is available for the ‚free plan‘ as well. If this sounds interesting, I can elaborate a bit more. Hth? $\endgroup$ – Kermittfrog May 2 at 11:16
  • $\begingroup$ @Kermittfrog thank you, this sounds interesting. The thing is that I don't want to trade in US stocks only, and as such prefer having access to ticker symbols from international companies. Just to make sure I understand what you are proposing; I can use either Alphavantage or IEX to retrieve a list of symbols, which, if they are from US companies, are usable on Yahoo Finance? $\endgroup$ – Value_Investor May 2 at 11:44
  • $\begingroup$ Most probably, yes. That needs to be tested, though. Personally, I went with IEX altogether and use their endpoints to map from ISIN and market (say, XETRA) directly to my required symbol(s) and from there to prices. Unfortunately, that’s not an answer to your question, but you might want to have a look at that route nevertheless $\endgroup$ – Kermittfrog May 2 at 12:00
  • $\begingroup$ @Kermittfrog So instead of using yfinance API, I could use IEX Cloud API in order to retrieve historical price data? That sounds particularly attractive because IEX also provides lists of stock symbols. The only downside is that I've already programmed the entirety of my program using yfinance lol $\endgroup$ – Value_Investor May 2 at 12:22
  • $\begingroup$ Classic, I made that same step as well with Alphavantage but decided ultimately to pay the 108 USD for 1yr of access. I checked the availability of my desired stocks / data of course! $\endgroup$ – Kermittfrog May 2 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.