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 for this date range, symbol may be delisted #963

Closed
kunwang-auto opened this issue Feb 19, 2022 · 21 comments
Closed

No data found for this date range, symbol may be delisted #963

kunwang-auto opened this issue Feb 19, 2022 · 21 comments

Comments

@kunwang-auto
Copy link

When I use yfinance to download tickers data , it always appears this error, 'No data found for this date range, symbol may be delisted'.
Anyone encounters this problem as well? How to sovle it, Thanks.

@lcocea
Copy link

lcocea commented Feb 23, 2022

Got the same error upon trying to run the sample code in the README file.

@kunwang-auto
Copy link
Author

Got the same error upon trying to run the sample code in the README file.

Have you solved this problem?

@lcocea
Copy link

lcocea commented Feb 23, 2022

Have you solved this problem?

No. Hoping the dev will comment on this.

@lcocea
Copy link

lcocea commented Mar 1, 2022

@2145460229 It seems nobody else is bothered by this issue, so either the two of us are missing something or there is a better way to get the historical data in Python.

@HarryHHung
Copy link

If you are fetching data from behind a company proxy like I do, pip install python-certifi-win32 might help to resvole the SSLCertVerificationError.
The following lines showed me more information than the yfinance.download command.
import yfinance as yf
tsla=yf.Ticker('TSLA')
tsla.info

@Missingid
Copy link

@2145460229 It seems nobody else is bothered by this issue, so either the two of us are missing something or there is a better way to get the historical data in Python.

I got the same error. Have you solved it yet?

@lcocea
Copy link

lcocea commented Mar 9, 2022

@2145460229 It seems nobody else is bothered by this issue, so either the two of us are missing something or there is a better way to get the historical data in Python.

I got the same error. Have you solved it yet?

It seems to be working now, try:

import yfinance as yf
data = yf.download("TSLA", start="2022-03-08", end="2022-03-09", threads=False)
print(data)

@TLimnavong
Copy link

Hi
I have the same issue for some tickers when i am doing it with a list of tickers but when i try it in a simple case it works. Is there anyone who got the same problem?
Thanks

@lcocea
Copy link

lcocea commented Mar 11, 2022

Hi I have the same issue for some tickers when i am doing it with a list of tickers but when i try it in a simple case it works. Is there anyone who got the same problem? Thanks

It seems to work with multiple tickers as well. For example:

this (1 ticker)...
data = yf.download("TSLA", start="2022-03-10", end="2022-03-11", threads=False)

returns this...
Open High ... Adj Close Volume
Date ...
2022-03-10 851.450012 854.450012 ... 838.299988 19501300
[1 rows x 6 columns]

and this (2 tickers)...
data = yf.download("TSLA IBM", start="2022-03-10", end="2022-03-11", threads=False)

returns this...
Adj Close Close ... Open Volume
IBM TSLA IBM ... TSLA IBM TSLA
Date ...
2022-03-10 124.349998 838.299988 124.349998 ... 851.450012 5325700 19501300
[1 rows x 12 columns]

@TLimnavong
Copy link

TLimnavong commented Mar 14, 2022

Hi I have the same issue for some tickers when i am doing it with a list of tickers but when i try it in a simple case it works. Is there anyone who got the same problem? Thanks

It seems to work with multiple tickers as well. For example:

this (1 ticker)... data = yf.download("TSLA", start="2022-03-10", end="2022-03-11", threads=False)

returns this... Open High ... Adj Close Volume Date ... 2022-03-10 851.450012 854.450012 ... 838.299988 19501300 [1 rows x 6 columns]

and this (2 tickers)... data = yf.download("TSLA IBM", start="2022-03-10", end="2022-03-11", threads=False)

returns this... Adj Close Close ... Open Volume IBM TSLA IBM ... TSLA IBM TSLA Date ... 2022-03-10 124.349998 838.299988 124.349998 ... 851.450012 5325700 19501300 [1 rows x 12 columns]

Thank you for your answer, I have hundreds tickers and it works for all of them except one. My issue is that when the ticker is in my loop, I have the message "No data found, symbol may be delisted" but when i try it "alone" it works. The Ticker's symbol is MMT.SG

@lcocea
Copy link

lcocea commented Mar 14, 2022

Thank you for your answer, I have hundreds tickers and it works for all of them except one. My issue is that when the ticker is in my loop, I have the message "No data found, symbol may be delisted" but when i try it "alone" it works. The Ticker's symbol is MMT.SG

In my sample code above, I inserted your ticker between TSLA and IBM and it worked for that date interval. Assuming there are no hidden characters in your ticker list, I think the dates may be a problem. What happens if there are missing data for your ticker on at least one date that is otherwise valid for all the other tickers? I would expect yfinance to write NaN for each missing value.

@TLimnavong
Copy link

Thank you for your answer, I have hundreds tickers and it works for all of them except one. My issue is that when the ticker is in my loop, I have the message "No data found, symbol may be delisted" but when i try it "alone" it works. The Ticker's symbol is MMT.SG

In my sample code above, I inserted your ticker between TSLA and IBM and it worked for that date interval. Assuming there are no hidden characters in your ticker list, I think the dates may be a problem. What happens if there are missing data for your ticker on at least one date that is otherwise valid for all the other tickers? I would expect yfinance to write NaN for each missing value.

Nice to see that it works for someone ^^
I included the same date in my code, that's weird everything is the same... Thanks for your help i will try to find an other way to bypass this issue

@malexandersalazar
Copy link

Today 29/03 I can't get Mastercard (MA) up to date data. Only to 25/03. What happen? "No data found for this data range, symbol may be deslited" everywhere with a lot of tickers like MA, ULVR, VFC, V, WFC.F, etc.

@lcocea
Copy link

lcocea commented Mar 31, 2022

Today 29/03 I can't get Mastercard (MA) up to date data. Only to 25/03. What happen? "No data found for this data range, symbol may be deslited" everywhere with a lot of tickers like MA, ULVR, VFC, V, WFC.F, etc.

Works on my end today using code above with MA, 2022-03-25, 2022-03-29.

@malexandersalazar
Copy link

Today 29/03 I can't get Mastercard (MA) up to date data. Only to 25/03. What happen? "No data found for this data range, symbol may be deslited" everywhere with a lot of tickers like MA, ULVR, VFC, V, WFC.F, etc.

Works on my end today using code above with MA, 2022-03-25, 2022-03-29.

I just discovered that when you query history data on small periods and intervals, sometimes it fails. Working with 5d as min. period starts to work well.

@ChanceyLi
Copy link

I faced this problem too. But I solved it just by using a VPN to grasp the data.

@Justin-Wong1215
Copy link

I faced this problem too. But I solved it just by using a VPN to grasp the data.

How to use VPN to grasp the data? This strategy sounds like not work for me.

@ValueRaider
Copy link
Collaborator

Can someone provide simple code to reproduce the "delisted" error? Then it can get fixed.

@ValueRaider ValueRaider closed this as not planned Won't fix, can't repro, duplicate, stale Oct 26, 2022
@gchust
Copy link

gchust commented Feb 5, 2023

proxy may cause this issue, if anyone is facing this error, please try to set or unset the proxy

yf.download("TSLA", start="2022-03-10", end="2022-03-11", proxy=None) # unset the proxy
yf.download("TSLA", start="2022-03-10", end="2022-03-11", proxy="http://xxx.xxx.xxx.xxx:xxx") #set the proxy

If it is not working for you, you may need this PR closed... #1371

@WYInvest
Copy link

I met the same error. I used VPN, and my IP is set to somewhere else than the U.S.. I met two problems. First, No timezone found, symbol may be delisted, I add the ignore_tz = True, and the problem works for me.
yf.download(tickers, start = TRAIN_START_DATE, end = TRADE_END_DATE, ignore_tz = True)
Then, I have another problem showing No data found for this date range, symbol may be delisted. I changed my VPN to the U.S., and the problem solved.

@ValueRaider
Copy link
Collaborator

ValueRaider commented Mar 25, 2023

@gchust Correct, #1371 fixes a bunch of proxy bugs including fetching price data.

@WYInvest ignore_tz doesn't influence fetching so cannot influence proxy.

Come to #1399 and help fix Ticker.get_isin(proxy=...), then I can merge & release the proxy fixes.

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

No branches or pull requests