Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Download the adjusted close price from Google Finance for AAPL, BBRY, LULU and A

ID: 3868943 • Letter: D

Question

Download the adjusted close price from Google Finance for AAPL,

BBRY, LULU and AMZN using the following code:

import pandas_datareader.data as web

import datetime

start = datetime.datetime(2012, 7, 31)

end = datetime.datetime(2017, 6, 30)

aapl = web.DataReader('AAPL', 'google', start, end)

2. Get the data for the last 60 months, select the monthends.

3. Use matplotlib.pyplot.acorr() to plot the autocorrelation of each of the stocks. Are they autocorrelated? Why or why not?

4. Calculate the monthly return over the period for each stock using the “shift trick” on the lecture slide titled Shifting (Note: you should end up with a time series 59 months long)

5. Use matplotlib.pyplot.acorr() to plot the autocorrelation of the returns. Are they autocorrelated? Why or why not?

Explanation / Answer

Number of non-NA observations in a window: rolling_count• Moving window sum: rolling_sum• Moving window average: rolling_mean• Moving window correlation: rolling_correlation• Apply function to a window: rolling_apply• etc.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote