How To Retrieve Company Data With Python and yfinanceby@codingandfun
1,439 reads

How To Retrieve Company Data With Python and yfinance

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

Python offers very good libraries for data science. By learning 3 or 4 libraries we can do almost all kind of analysis. Yfinance is a great tool that lets us retrieve financial data from Yahoo Finance. With four lines of code, we are able to retrieve 1 year of historical prices from Apple. Pandas make the calculation of moving averages super straightforward. We can also use Pandas to calculate and plot Apple cumulative returns using the pct_change and cumsum methods. This is perfect for comparing how companies are performing relative to others.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - How To Retrieve Company Data With Python and yfinance
CodingandFun HackerNoon profile picture

@codingandfun

CodingandFun

A blog about Python for Finance and financial analysis


Receive Stories from @codingandfun

react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!