McKinney Chapter 5 - Practice - Blank

FINA 6333 for Spring 2025

Author

Richard Herron

import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import yfinance as yf
%precision 4
pd.options.display.float_format = '{:.4f}'.format
# %config InlineBackend.figure_format = 'retina'

Announcements

Five-Minute Review

Practice

What are the mean daily returns for these four stocks?

tickers = 'AAPL IBM MSFT GOOG'

What are the standard deviations of daily returns for these four stocks?

What are the annualized means and standard deviations of daily returns for these four stocks?

Plot annualized means versus standard deviations of daily returns for these four stocks

Repeat the previous calculations and plot for the stocks in the Dow-Jones Industrial Index (DJIA)

We can find the current DJIA stocks on Wikipedia. We must download new data, into tickers_2, data_2, and returns_2.

Calculate total returns for the stocks in the DJIA

Plot the distribution of total returns for the stocks in the DJIA

Which stocks have the minimum and maximum total returns?

Plot the cumulative returns for the stocks in the DJIA

Repeat the plot above with only the minimum and maximum total returns