What is yfinance?

  • It’s an open-source tool that uses Yahoo’s publicly available APIs, and is intended for research and educational purposes.
  • Represents a popular Python module used to fetch financial data from Yahoo Finance.

Install yfinance:

  • Packages such as yfinance are available in a public repository called PyPI (Python Package Index)
    • Click here to find out more information about yfinance.
  • The tool can be installed from the command line using the Python Management System, pip.
  • For Windows users, from the command line, running as an administrator, simply issue the following command:
pip install yfinance
  • For Mac users, from a terminal, simply issue the following command:
pip3 install yfinance