Quantcast
Channel: How can efficiently download a large list of tickers from Yahoo Finance? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

How can efficiently download a large list of tickers from Yahoo Finance?

$
0
0

I have a really large list of tickers for which I want to download financial data using Yahoo finance.

I am now working with python, but R solutions are also welcomed.

Here is the piece of python code and the excel file with the tickers is also attached:

import yfinance as yffrom yahoofinancials import YahooFinancials# get tickers mf_tickers = pd.read_excel('tickers_mutual_funds.xlsx')# download data tickers = mf_tickers.Symbolfunds_financials = YahooFinancials(tickers)data = funds_financials.get_historical_price_data(start_date='2019-01-01',                                                   end_date='2019-12-31',                                                  time_interval='weekly')

The problem is that it takes ages,like hours, in my computer to load this size of data.

What is a better and more efficient way to load these data? As said, I am happy with both python or R solutions.

File to load:https://www.dropbox.com/s/1l41tk8gxzqvutd/tickers_mutual_funds%20copy.xlsx?dl=0

Thanks


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>