FinRL icon indicating copy to clipboard operation
FinRL copied to clipboard

Yahoo data downloader does not download any data??

Open abdulbqureshi opened this issue 1 year ago • 16 comments

  • PG: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • TRV: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • UNH: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • CRM: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • VZ: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • V: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • WBA: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • WMT: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • DIS: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • DOW: No data found for this date range, symbol may be delisted

ValueError Traceback (most recent call last) in <cell line: 17>() 15 16 ---> 17 df = YahooDownloader(start_date = TRAIN_START_DATE, 18 end_date = TEST_END_DATE, 19 ticker_list = DOW_30_TICKER).fetch_data()

/usr/local/lib/python3.9/site-packages/finrl/meta/preprocessor/yahoodownloader.py in fetch_data(self, proxy) 58 num_failures += 1 59 if num_failures == len(self.ticker_list): ---> 60 raise ValueError("no data is fetched.") 61 # reset the index, we want to use numbers as index instead of dates 62 data_df = data_df.reset_index()

ValueError: no data is fetched.

abdulbqureshi avatar Apr 05 '23 06:04 abdulbqureshi

  • PG: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • TRV: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • UNH: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • CRM: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • VZ: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • V: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • WBA: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • WMT: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • DIS: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • DOW: No data found for this date range, symbol may be delisted

ValueError Traceback (most recent call last) in <cell line: 17>() 15 16 ---> 17 df = YahooDownloader(start_date = TRAIN_START_DATE, 18 end_date = TEST_END_DATE, 19 ticker_list = DOW_30_TICKER).fetch_data()

/usr/local/lib/python3.9/site-packages/finrl/meta/preprocessor/yahoodownloader.py in fetch_data(self, proxy) 58 num_failures += 1 59 if num_failures == len(self.ticker_list): ---> 60 raise ValueError("no data is fetched.") 61 # reset the index, we want to use numbers as index instead of dates 62 data_df = data_df.reset_index()

ValueError: no data is fetched.

Yahoo Finance seems not work in China, and some other regions. Please check other data sources at: https://github.com/AI4Finance-Foundation/FinRL-Meta/tree/master/meta/data_processors

YangletLiu avatar Apr 05 '23 16:04 YangletLiu

Xio

I am based in us and it is giving me this error???

On Wed, Apr 5, 2023, 9:38 AM Xiao-Yang Liu @.***> wrote:

  • PG: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • TRV: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • UNH: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • CRM: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • VZ: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • V: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • WBA: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • WMT: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • DIS: No data found for this date range, symbol may be delisted [100%**] 1 of 1 completed

1 Failed download:

  • DOW: No data found for this date range, symbol may be delisted

ValueError Traceback (most recent call last) in <cell line: 17>() 15 16 ---> 17 df = YahooDownloader(start_date = TRAIN_START_DATE, 18 end_date = TEST_END_DATE, 19 ticker_list = DOW_30_TICKER).fetch_data()

/usr/local/lib/python3.9/site-packages/finrl/meta/preprocessor/yahoodownloader.py https://localhost:8080/# in fetch_data(self, proxy) 58 num_failures += 1 59 if num_failures == len(self.ticker_list): ---> 60 raise ValueError("no data is fetched.") 61 # reset the index, we want to use numbers as index instead of dates 62 data_df = data_df.reset_index()

ValueError: no data is fetched.

Yahoo Finance seems not work in China, and some other regions. Please check other data sources at: https://github.com/AI4Finance-Foundation/FinRL-Meta/tree/master/meta/data_processors

— Reply to this email directly, view it on GitHub https://github.com/AI4Finance-Foundation/FinRL/issues/962#issuecomment-1497796721, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMLV2K3HHUMXSNCJBBNMRTW7WNXDANCNFSM6AAAAAAWTUXKMA . You are receiving this because you authored the thread.Message ID: @.***>

abdulbqureshi avatar Apr 05 '23 16:04 abdulbqureshi

I'm getting the same error (also based in the US). This is by just running the introduction notebook at

https://colab.research.google.com/github/AI4Finance-Foundation/FinRL-Tutorials/blob/master/1-Introduction/Stock_NeurIPS2018_SB3.ipynb

tobihanl avatar Apr 07 '23 00:04 tobihanl

Same error, I´m from Brazil and Yahoo Finance work here. https://colab.research.google.com/github/AI4Finance-Foundation/FinRL-Tutorials/blob/master/2-Advance/FinRL_Ensemble_StockTrading_ICAIF_2020.ipynb

renangroth avatar Apr 07 '23 00:04 renangroth

Hi, all, I have to say that the data from Yahoo Finance is not satisfactory. I would encourage to use FinnHub: http://www.columbia.edu/~tmd2142/free-stock-api.html

YangletLiu avatar Apr 07 '23 01:04 YangletLiu

Thanls Xiao.

Can you share the new notebook??? Or how to change logic to use new data??? Or just replace yahoodownload section??? Not sure how finrl works umder hoos??

On Thu, Apr 6, 2023, 6:11 PM Xiao-Yang Liu @.***> wrote:

Hi, all, I have to say that the data from Yahoo Finance is not satisfactory. I would encourage to use FinnHub: http://www.columbia.edu/~tmd2142/free-stock-api.html

— Reply to this email directly, view it on GitHub https://github.com/AI4Finance-Foundation/FinRL/issues/962#issuecomment-1499813494, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMLV2J7V7JBEY7VS6VUFWLW75SV5ANCNFSM6AAAAAAWTUXKMA . You are receiving this because you authored the thread.Message ID: @.***>

abdulbqureshi avatar Apr 07 '23 01:04 abdulbqureshi

To me, the problem was the new Pandas version (2.0.0), which creates conflict with yfinance. Downgrading pandas to 1.5.3 resolved the issue for me. Hope this helps!

shql-tgr avatar Apr 07 '23 17:04 shql-tgr

Thanks can you please put the code that you used ??? To fix the issue in pandas??

On Fri, Apr 7, 2023, 10:00 AM shql-tgr @.***> wrote:

To me, the problem was the new Pandas version (2.0.0), which creates conflict with yfinance. Downgrading pandas to 1.5.3 resolved the issue for me. Hope this helps!

— Reply to this email directly, view it on GitHub https://github.com/AI4Finance-Foundation/FinRL/issues/962#issuecomment-1500464830, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMLV2LKIJJY3MM2DFOYORDXABB4DANCNFSM6AAAAAAWTUXKMA . You are receiving this because you authored the thread.Message ID: @.***>

abdulbqureshi avatar Apr 07 '23 17:04 abdulbqureshi

Just do: !pip install pandas==1.5.3

renangroth avatar Apr 07 '23 17:04 renangroth

Exactly. I am working from colab, and there you just need to run !pip install pandas==1.5.3 before importing libraries. Otherwise, you could create a virtual environment, in which you could install the packages you need for the project with the right version

shql-tgr avatar Apr 07 '23 18:04 shql-tgr

Thank you i am also doing colab

So yahoo code and downliader no changes there???

On Fri, Apr 7, 2023, 11:59 AM shql-tgr @.***> wrote:

Exactly. I am working from colab, and there you just need to run !pip install pandas==1.5.3 before importing libraries. Otherwise, you could create a virtual environment, in which you could install the packages you need for the project with the right version

— Reply to this email directly, view it on GitHub https://github.com/AI4Finance-Foundation/FinRL/issues/962#issuecomment-1500532999, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMLV2LHDKQCGMOPPMACK6TXABPZ3ANCNFSM6AAAAAAWTUXKMA . You are receiving this because you authored the thread.Message ID: @.***>

abdulbqureshi avatar Apr 07 '23 19:04 abdulbqureshi

No, just downgrading Pandas should do the trick. Let me know if it works!

shql-tgr avatar Apr 07 '23 19:04 shql-tgr

Thanks let me try appreciuate it

On Fri, Apr 7, 2023, 12:42 PM shql-tgr @.***> wrote:

No, just downgrading Pandas should do the trick. Let me know if it works!

— Reply to this email directly, view it on GitHub https://github.com/AI4Finance-Foundation/FinRL/issues/962#issuecomment-1500585618, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMLV2L64YLWCJNAXRIBQEDXABUZRANCNFSM6AAAAAAWTUXKMA . You are receiving this because you authored the thread.Message ID: @.***>

abdulbqureshi avatar Apr 07 '23 19:04 abdulbqureshi

Thanks let me try appreciuate it … On Fri, Apr 7, 2023, 12:42 PM shql-tgr @.> wrote: No, just downgrading Pandas should do the trick. Let me know if it works! — Reply to this email directly, view it on GitHub <#962 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMLV2L64YLWCJNAXRIBQEDXABUZRANCNFSM6AAAAAAWTUXKMA . You are receiving this because you authored the thread.Message ID: @.>

can you run the colab using Yahoo data sucessfully?

GongYanfu avatar Apr 18 '23 01:04 GongYanfu

Many thanks for all your help

Yes it works for me now

I only did this i.e. as sql-tgr suggested

I just ran !pip install pandas==1.5.3 before importing libraries.

On Mon, Apr 17, 2023 at 6:46 PM GongYanfu @.***> wrote:

Thanks let me try appreciuate it … <#m_5968349911874801398_> On Fri, Apr 7, 2023, 12:42 PM shql-tgr @.> wrote: No, just downgrading Pandas should do the trick. Let me know if it works! — Reply to this email directly, view it on GitHub <#962 (comment) https://github.com/AI4Finance-Foundation/FinRL/issues/962#issuecomment-1500585618>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMLV2L64YLWCJNAXRIBQEDXABUZRANCNFSM6AAAAAAWTUXKMA https://github.com/notifications/unsubscribe-auth/AAMLV2L64YLWCJNAXRIBQEDXABUZRANCNFSM6AAAAAAWTUXKMA . You are receiving this because you authored the thread.Message ID: @.>

can you run the colab using Yahoo data sucessfully?

— Reply to this email directly, view it on GitHub https://github.com/AI4Finance-Foundation/FinRL/issues/962#issuecomment-1512318610, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMLV2LTQGJBJXEYE4IIUOLXBXW7HANCNFSM6AAAAAAWTUXKMA . You are receiving this because you authored the thread.Message ID: @.***>

abdulbqureshi avatar Apr 18 '23 16:04 abdulbqureshi

I had a quick question.

it looks like that dow_30_ticker is some where hardcoded in the code but I cannot find the same?

['AXP', 'AMGN', 'AAPL', 'BA', 'CAT', 'CSCO', 'CVX', 'GS', 'HD', 'HON', 'IBM', 'INTC', 'JNJ', 'KO', 'JPM', 'MCD', 'MMM', 'MRK', 'MSFT', 'NKE', 'PG', 'TRV', 'UNH', 'CRM', 'VZ', 'V', 'WBA', 'WMT', 'DIS', 'DOW'

if I want to input my own ticker symbols instead of dow , 30 , what should I do?

How can change dow_30_ticker so that it uses my own input tickers?

On Tue, Apr 18, 2023 at 9:12 AM aqureshi @.***> wrote:

Many thanks for all your help

Yes it works for me now

I only did this i.e. as sql-tgr suggested

I just ran !pip install pandas==1.5.3 before importing libraries.

On Mon, Apr 17, 2023 at 6:46 PM GongYanfu @.***> wrote:

Thanks let me try appreciuate it … <#m_-7350991941299608723_m_5968349911874801398_> On Fri, Apr 7, 2023, 12:42 PM shql-tgr @.> wrote: No, just downgrading Pandas should do the trick. Let me know if it works! — Reply to this email directly, view it on GitHub <#962 (comment) https://github.com/AI4Finance-Foundation/FinRL/issues/962#issuecomment-1500585618>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMLV2L64YLWCJNAXRIBQEDXABUZRANCNFSM6AAAAAAWTUXKMA https://github.com/notifications/unsubscribe-auth/AAMLV2L64YLWCJNAXRIBQEDXABUZRANCNFSM6AAAAAAWTUXKMA . You are receiving this because you authored the thread.Message ID: @.>

can you run the colab using Yahoo data sucessfully?

— Reply to this email directly, view it on GitHub https://github.com/AI4Finance-Foundation/FinRL/issues/962#issuecomment-1512318610, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMLV2LTQGJBJXEYE4IIUOLXBXW7HANCNFSM6AAAAAAWTUXKMA . You are receiving this because you authored the thread.Message ID: @.***>

abdulbqureshi avatar Apr 19 '23 00:04 abdulbqureshi