Get FAANG Stock Data from Yahoo Finance via Python

Prerequisites

  1. yfinance
  2. matplotlib

Install prerequisites

  1. launch a CMD prompt with the ‘Run as Administrator’ option
  2. python -m pip install –upgrade pip
  3. pip install  yfinance
  4. pip install matplotlib

Helpful PIP Commands

  1. pip list
  2. pip search <module>
  3. pip search quandl

Code

import yfinance as yf;
data = yf.download("FB AAPL AMZN NFLX GOOGL MSFT", start="2000-01-01", end="2019-12-31")
print(data);

import matplotlib.pyplot as plt;
data.Close.plot();
plt.show();

Output: Chart

Output: Data

Git

  1. https://github.com/raybishun/scripts/tree/master/py/fin

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Get FAANG Stock Data from Yahoo Finance via Python

Prerequisites

  1. yfinance
  2. matplotlib

Install prerequisites

  1. launch a CMD prompt with the ‘Run as Administrator’ option
  2. python -m pip install –upgrade pip
  3. pip install  yfinance
  4. pip install matplotlib

Helpful PIP Commands

  1. pip list
  2. pip search <module>
  3. pip search quandl

Code

import yfinance as yf;
data = yf.download("FB AAPL AMZN NFLX GOOGL MSFT", start="2000-01-01", end="2019-12-31")
print(data);
import matplotlib.pyplot as plt;
data.Close.plot();
plt.show();

Output: Chart

Output: Data

Git

  1. https://github.com/raybishun/scripts/tree/master/py/fin

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s