2. Cumulative log returns. You are given a vector of log returns for the the S&P500: sp500_log_returns
.
Unlike simple returns, cumulative log returns can be computed by summing over the single-period log returns between periods
1 and t. Compute and plot the cumulative returns using the cumsum()
.