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