Assignment 2
BUSI 721: Data-Driven Finance I
Rice University

Instructions

This assignment is due before class on Monday, Oct. 23. Submit a Jupyter notebook to Canvas. Copy each question into a Markdown cell and perform the analysis in the following cell(s).

  1. You want to retire in 30 years with $4,000,000 in your retirement account. If your investments yield an annual return of 8% and you currently have no savings, how much should you save each year to reach your retirement goal?
  2. Suppose in #1 that your returns are normally distributed with a mean of 8% and a standard deviation of 15%. Suppose you save the amount you calculated in #1. Run a simulation to determine the probability that you will meet your retirement goal.
  3. Repeat #2 assuming the standard deviation is only 10%. What is the probability of meeting your retirement goal?
  4. Use the following code to calculate daily SPY returns. Calculate the skewness and kurtosis of the returns using the formulas presented in class.
import yfinance as yf
price = yf.download("spy", start="1990-01-01")["Adj Close"]
ret = price.pct_change()
  1. Use the following code to calculate annual SPY returns. Calculate the skewness and kurtosis of the returns using the formulas presented in class.
import yfinance as yf
price = yf.download("spy", start="1990-01-01")["Adj Close"]
price = price.resample("Y").last()
ret = price.pct_change()[:-1]
  1. Download the CPI from FRED and calculate annual inflation rates as the percent change in the end-of-year CPI from one year to the next. Using the annual (nominal) returns from #5, calculate the real rate of return of SPY each year.