# Dependencies
import pandas as pd
import fix_yahoo_finance as yf
# Retrieve Tickers from S&P 100
df = list(pd.read_excel("SP100Tickers.xlsx")['Tickers'])
# Attempts to gather data from the period 2004-01-01 until 2015-0-01
# If the Data is unavailable (company does not exist yet) it will
# pass a ValueError, if so, the company is skipped
try:
data = yf.download(df,"2004-01-01","2015-01-01")['Adj Close']
except ValueError:
pass
# Check Data Output
display(data.head())
print("The shape of the data is as follows (rows, columns):",data.shape)