Herron Topic 4 - Practice

FINA 6333 for Spring 2025

Author

Richard Herron

import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pandas_datareader as pdr
import scipy.optimize as sco # new addition for portfolio optimization
import yfinance as yf
%precision 4
pd.options.display.float_format = '{:.4f}'.format
# %config InlineBackend.figure_format = 'retina'

Announcements

Five-Minute Recap

Practice

Find the maximum Sharpe Ratio portfolio of Mag 7 stocks over the last three years

Note that sco.minimize() finds minimums, so you need to minimize the negative Sharpe Ratio.

Find the maximum Sharpe Ratio portfolio of Mag 7 stocks over the last three years, but allow short weights up to 10% on each stock

Find the maximum Sharpe Ratio portfolio of Mag 7 stocks over the last three years, but allow total short weights of up to 30%

Find the maximum Sharpe Ratio portfolio of Mag 7 stocks over the last three years, but do not allow any weight to exceed 30% in magnitude

Find the minimum 95% Value at Risk (Var) portfolio of Mag 7 stocks over the last three years

More on VaR here.

Find the minimum draw down portfolio of Mag 7 stocks over the last three years

Find the minimum draw down portfolio for the sample with complete data for the current Dow-Jones Industrial Average (DJIA) stocks

You can find the DJIA tickers on Wikipedia.

Plot the minimum-variance frontier for the sample with complete data for the current the DJIA stocks

Find the maximum Sharpe Ratio portfolio for the sample with complete data for the current the DJIA stocks