The examples will use two sets of data obtained from Yahoo! Finance. The first one is a series of stock values for several stocks over the calendar years 2012–2014. The second set of data is the S&P 500 average over the same period. Note that although we are using data from a fixed period in time, the adjusted close values tend to change slightly over time, so there may be slight differences in output when you run the code as compared to what is in the text.
The examples in this chapter will use historical quotes for Apple (AAPL), Microsoft (MSFT), General Electric (GE), IBM (IBM), American Airlines (AA), Delta Airlines (DAL), United Airlines (UAL), Pepsi (PEP