How To Retrieve Company Data With Python and yfinance

Written by codingandfun | Published 2021/05/11
Tech Story Tags: finance | python-programming | python | datascience | coding | python-for-finance | pandas | machine-learning

TLDR 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.via the TL;DR App

no story

Written by codingandfun | A blog about Python for Finance and financial analysis
Published by HackerNoon on 2021/05/11