Configure YahooFinancials for concurrency, proxies, and country
masterWhen initializing YahooFinancials, you can pass several optional parameters to handle large batches of tickers or network restrictions:
concurrent=True: Enables asynchronous execution.max_workers: Sets the number of workers for concurrent requests.country: Specifies the country (e.g.,"US").proxies: A list of proxy addresses (e.g.,["mysuperproxy.com:5000"]).
from yahoofinancials import YahooFinancials
tickers = ['AAPL', 'GOOG', 'C']
# Concurrent execution with specific workers and country
yahoo_financials = YahooFinancials(tickers, concurrent=True, max_workers=8, country="US")
# Concurrent execution with proxies
proxy_addresses = [ "mysuperproxy.com:5000", "mysuperproxy.com:5001"]
yahoo_financials = YahooFinancials(tickers, concurrent=True, proxies=proxy_addresses)