All you need to know about yfinance : Yahoo! Finance Library

A complete step-by-step tutorial on how to use Yahoo Finance Package for python- yfinance, to obtain share price and other financial data for free

Abhijith Chandradas
Nerd For Tech

--

Introduction

Getting data for financial analysis is the major roadblock someone faces when planning to perform some stock analysis.
Not anymore!
The new Yahoo finance API- yfinance has got your back!
yfinance package not just helps to to access the share-price details, it also provides myriad of other financial and non-financial data pertaining to all companies listed in the United States.

yfinance can also be used to obtain data related of bonds, stock indices (S&P 500, Nasdaq, Dow 30 etc.), Commodities (Crude Oil , Gold, Silver etc.), Currencies (EUR/USD, GBP/USD, USD/JPY etc.), International Markets (FTSE 100, Nikkei 225 etc.) and even bitcoin and crypto-currency index.

Install package

Yahoo! Finance market data downloader package can be installed by using pip install command.

pip install yfinance

Requirements for yfinance are available in footnotes.

Once the package is imported, yfinance library has to be imported to the working notebook.

import yfinance as yf

--

--

Abhijith Chandradas
Nerd For Tech

Data Analyst | Hacker | Financial Analyst | Freelancer | IIM MBA | Opensource | Democratize Knowledge | https://www.youtube.com/channel/UCLpBd4gzfIBXm2BPpdHOWdQ