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

No data found, symbol may be delisted #359

Closed
TimurNurlygayanov opened this issue Jun 27, 2020 · 18 comments
Closed

No data found, symbol may be delisted #359

TimurNurlygayanov opened this issue Jun 27, 2020 · 18 comments

Comments

@TimurNurlygayanov
Copy link

Hi, thank you for the really useful library!

My code:

data = yf.download(' '.join(TICKERS), start=START_DATE, end=END_DATE,
                                 group_by='ticker')

Sometimes during the downloading of the historical data, I can see some errors like:

- ACHN: No data found, symbol may be delisted
- BID: No data found, symbol may be delisted
- ECA: No data found, symbol may be delisted

So, I suggest we add retry option to try download the data one more time in case it failed.
Now I'm doing this workaround in my code:

data = yf.download(' '.join(TICKERS), start=START_DATE, end=END_DATE,
                   group_by='ticker')

tickers_to_retry = []

for ticker in TICKERS:
    download_success = [r for r in data[ticker]['Close'] if r > 0]
    if download_success:
        CASHED_DATA[ticker] = {'close': [r for r in data[ticker]['Close']],
                               'row_data': data[ticker],
                               'low': [r for r in data[ticker]['Low']],
                               'high': [r for r in data[ticker]['High']]}
    else:
        tickers_to_retry.append(ticker)

if tickers_to_retry:
    data = yf.download(' '.join(tickers_to_retry), start=START_DATE, end=END_DATE,
                       group_by='ticker')

for ticker in tickers_to_retry:
    download_success = [r for r in data[ticker]['Close'] if r > 0]
    if download_success:
        CASHED_DATA[ticker] = {'close': [r for r in data[ticker]['Close']],
                               'row_data': data[ticker],
                               'low': [r for r in data[ticker]['Low']],
                               'high': [r for r in data[ticker]['High']]}

So it is better to have retry inside the library and do them automatically at least once.

@TimurNurlygayanov
Copy link
Author

Note: it also doesn't help me, but every day I can see different tickers in "delisted" status, and next day these tickers downloading just fine.

@danlinenberg
Copy link

Getting it too but the issue is with Yahoo's API rather than this library.
I've found 1000+ tickers that display this behaviour, retrying doesn't really work.

@jtilson
Copy link

jtilson commented Jul 22, 2020

I am having the same problem. It happens to me to such an extent that the software overall is not helping me. I hope someone can identify a solution. Maybe need to put in a pause or ?

@jtilson
Copy link

jtilson commented Jul 22, 2020

Well, I've been working with yfinance now for a few days and for my purposes, I find it to not be useful. I think the marketing of a "reliable" stock reader is untrue. This code randomly fails to fetch me data a large % of the time. I will not spend time trying quantify the many number of ways it fails. I would simply say, try to download 3,000 tickers at one time and tell us how it goes. Doesn't matter if you use threads or not, chunk up tickers into sublists, or not, etc. You will find occasionally (and inconsistently) tickers being declared delisted. Also, at select times ( occasionally) you may get Nans which if you try to read later works fine. I need something that is actually reliable.

@dpguthrie
Copy link

It looks like Yahoo Finance (YF) has started to block requests like these by showing 404 errors; that's why you continue to see "No data found, symbol may be delisted". I've written a YF library that has a built-in retry mechanism as well as a backoff_factor for each successive retry. I was successful retrieving daily YTD data for all Nasdaq tickers. You can see here: https://gist.github.com/dpguthrie/120aeca5bd644cf50fd98b344a307297

@jtilson
Copy link

jtilson commented Jul 24, 2020

Thank you for your help. I really wish for yfinance to work for me but the behavior seems even more erratic that I first thought . ( Of course I am not blaming yfinance but that is not material to me) . For example, suppose I have a list of 100 nasdaq tickers. I break them up into chunks of 4 (at most). Time ranges from now to 180 days past. Sometimes a chunk will have a missing entry, which I can believe is rather random event but 'WK" is almost always "lost" unless I call it as a singleton. So the probability of loss seems ticker dependent.

@mspacey4415
Copy link

I'm also getting these even on small batches. Wondering if there are certain times of the day that Yahoo just don't work?

tickers =['FNF', 'ASML', 'GOOGL', 'CVS']
data = yf.download(tickers, group_by="ticker", period='1y')

2 Failed downloads:

  • GOOGL: No data found, symbol may be delisted
  • CVS: No data found, symbol may be delisted

@jtilson
Copy link

jtilson commented Jul 29, 2020 via email

@100330706
Copy link

2000 requests/ hour per IP might be what is killing us - https://stackoverflow.com/questions/9346582/what-is-the-query-limit-on-yahoos-finance-api

@danlinenberg
Copy link

I haven't experienced this issue today, maybe it was fixed.
Can anyone confirm?

@mssrr
Copy link

mssrr commented Dec 28, 2020

though not sure related to above, I received the error due to no trading day, so no data, and it return empty dataframe.
5105.KL: No data found for this date range, symbol may be delisted

so it possible to happen due to stock temporary suspend,no trade, etc.

@jeames00
Copy link

I've only experienced this issue when connected to a VPN. Change the VPN country or disconnect and yfinance works OK.

@Blessvskp
Copy link

I am getting the same error even to download data for a single symbol! I tried several times giving time gap. But in vain!

R=yf.Ticker('CAPACITE')
R.history(start='2021-08-25',end='2021-08-27', actions=False)
CAPACITE: No data found, symbol may be delisted
Empty DataFrame
Columns: [Open, High, Low, Close, Adj Close, Volume]
Index: [ ]

This is indeed a big nuisance.

Please help

@deadskull7
Copy link

Hi, thank you for the really useful library!

My code:

data = yf.download(' '.join(TICKERS), start=START_DATE, end=END_DATE,
                                 group_by='ticker')

Sometimes during the downloading of the historical data, I can see some errors like:

- ACHN: No data found, symbol may be delisted
- BID: No data found, symbol may be delisted
- ECA: No data found, symbol may be delisted

So, I suggest we add retry option to try download the data one more time in case it failed. Now I'm doing this workaround in my code:

data = yf.download(' '.join(TICKERS), start=START_DATE, end=END_DATE,
                   group_by='ticker')

tickers_to_retry = []

for ticker in TICKERS:
    download_success = [r for r in data[ticker]['Close'] if r > 0]
    if download_success:
        CASHED_DATA[ticker] = {'close': [r for r in data[ticker]['Close']],
                               'row_data': data[ticker],
                               'low': [r for r in data[ticker]['Low']],
                               'high': [r for r in data[ticker]['High']]}
    else:
        tickers_to_retry.append(ticker)

if tickers_to_retry:
    data = yf.download(' '.join(tickers_to_retry), start=START_DATE, end=END_DATE,
                       group_by='ticker')

for ticker in tickers_to_retry:
    download_success = [r for r in data[ticker]['Close'] if r > 0]
    if download_success:
        CASHED_DATA[ticker] = {'close': [r for r in data[ticker]['Close']],
                               'row_data': data[ticker],
                               'low': [r for r in data[ticker]['Low']],
                               'high': [r for r in data[ticker]['High']]}

So it is better to have retry inside the library and do them automatically at least once.

Hey you have to add an extension at the end of the ticker like here in India its 'NS' for NSE (stock exchange).
So example 'RELIANCE' is a ticker on NSE so, if I do just yf.Ticker("RELIANCE"). It will do nothing and show the same error but if I do yf.Ticker("RELIANCE.NS"). Its working flawlessly.

@asafravid
Copy link
Collaborator

Ticker names must be the yahoo finance link ones so you initially must have placed.ns
I don’t think it a yfinance issue
It’s simple the way the yahoo finance website assigned ticker names
For instance TASE tickets are with .ta suffix

Repository owner deleted a comment from aravid-marvell Sep 21, 2022
Repository owner deleted a comment from aravid-marvell Sep 21, 2022
@Sourabhwitho
Copy link

Try using a proper suffix at the end of your tickets, for example, the NSE index has the '.NS' suffix at the end.

Repository owner deleted a comment from asafravid Jan 4, 2023
Repository owner deleted a comment from asafravid Jan 4, 2023
Repository owner deleted a comment from asafravid Jan 4, 2023
@babak3548
Copy link

babak3548 commented Apr 8, 2023

I get same error only in Pycharm. But same code work on Jupyter

@ValueRaider
Copy link
Collaborator

Is this fixed in latest release 0.2.17?

@ValueRaider ValueRaider closed this as not planned Won't fix, can't repro, duplicate, stale Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests