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

How To Retrieve Company Data With Python and yfinance

by CodingandFun3mMay 11th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

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

@codingandfun

A blog about Python for Finance and financial analysis

Learn More
LEARN MORE ABOUT @CODINGANDFUN'S
EXPERTISE AND PLACE ON THE INTERNET.

Share Your Thoughts

About Author

CodingandFun HackerNoon profile picture
CodingandFun@codingandfun
A blog about Python for Finance and financial analysis

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
L O A D I N G
. . . comments & more!