Ever since Yahoo! finance decommissioned their historical data API, many programs that relied on it to stop working. yfinance aims to solve this problem by offering a reliable, threaded, and Pythonic way to download historical market data from Yahoo! finance. yfinance aimed to offer a temporary fix to the problem by scraping the data from Yahoo! Finance and returning a the data in the same format as pandas_datareader's get_data_yahoo(), thus keeping the code changes in existing software to a minimum. The latest version of yfinance is a complete re-write of the libray, offering a reliable method of downloading historical market data from Yahoo! Finance, up to 1 minute granularity, with a more Pythonic way. The Ticker() module allows you get market and metadata for security, using a Pythonic way.
Features
- Valid periods are 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max
- Adjust all OHLC automatically
- Download stock dividends and stock splits events
- You can also download data for multiple tickers at once
- yfinance is distributed under the Apache Software License
- Fetch data for multiple tickers