Importing libraries
The following code, and indeed most of the code in the book, first requires the installation of the yfinance
package:
pip install yfinance
yfinance
can then be imported:
import yfinance as yf
For this chapter and the rest of the book, we will also be working with pandas
, numpy
, and matplotlib
. So, please remember to import them first:
# Import Libraries
import pandas as pd
import numpy as np
%matplotlib inline
import matplotlib.pyplot as plt