No data found, symbol may be delisted

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:21

github_iconTop GitHub Comments

1reaction
ValueRaidercommented, Sep 20, 2022

I’m working on a smart caching wrapper to get round these ‘spam limiting’ issues. Idea is to only fetch data not in cache, or expired data, and rate-limit requests. Should work perfect for American and Europe markets (currently an issue with Aussie markets that I need to fix): https://github.com/ValueRaider/yfinance-cache

1reaction
deadskull7commented, Jan 9, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python yfinance: Failed downloads - "No data found, symbol ...
pandas - Python yfinance: Failed downloads - "No data found, symbol may be delisted" - Stack Overflow. Stack Overflow for Teams – Start ......
Read more >
seeking arbitrage opportunities | Kaggle
AKAO : No data found, symbol may be delisted - ADRO: No data found, symbol may be delisted - GNMX: No data found,...
Read more >
How to use the yfinance.shared._ERRORS function in yfinance
Use Snyk Code to scan source code in minutes - no build needed - and fix issues ... err_msg = "No data found...
Read more >
Intraday Factor — Alphalens 0.4.1post1+8.g3348e92 ...
B: No data found for this date range, symbol may be delisted - BRK.B: No data found, symbol may be delisted - MON:...
Read more >
Alternative to yfinance? : r/algotrading - Reddit
However, it seems like it is so faulty as most of the time I am just getting errors such as "No data found,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found