Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
STA2570
Assignment
In the following, all backtests (simulation of portfolios) must be done using btest() which
was introduced in the class. You may use all codes and tools introduced in Chapter 15 of the
textbook [GMS]. Make and state any decisions about unspecified details.
1. (Rebalancing frequency) Consider weekly (adjusted closing) stock prices of Apple (AAPL)
[stock 1] and Nvidia (NVDA) [stock 2] from January 2000 to February 2023. Normalize the
prices such that the initial prices of both stocks are 1. We use the prices from January
2000 to December 2015 as training data. The rest will be used for testing.
(a) Let k ≥ 1 be an integer and α ∈ [0, 1]. These are the parameters. Implement a
strategy (using signal and other functions) which performs the following:
– The portfolio trades (rebalances) every k periods. [The portfolio is set up imme-
diately at time 1. So the second time it rebalances is 1 + k.]
– When it trades, it rebalances to the weights (α, 1− α).
(b) Consider k ∈ {1, 2, . . . , 52} and α ∈ {0, 0.05, . . . , 0.95, 1}. Using the training data,
find the values (k∗, α∗) of the parameters which maximizes the value of the ending
value (in December 2015). Also visualize the wealth processes of the portfolios using
a graph which is as informative as possible. [Imagine that you, as a portfolio analyst,
are going to report the results to portfolio managers.]
(c) Repeat (b) for the testing period and discuss the performance of the portfolio with
parameters (k∗, α∗) in the testing period.
The 10th asset is the S&P 500 index itself; we use SPY which is a tradable proxy. The
requirement is that we have at least 20 years of data for all assets. (Note that some survival
bias is present here.) Download 20 years of monthly data. Implement the following two
strategies:
(i) At each time, use the last 5 years of data (previous 60 data points) to estimate the
expected return and covariance matrix (with the simple empirical average). Find the
long-only portfolio which minimizes
1
2
w>Σw − µ>w.
(ii) Use the setting in (i) but compute the long-only minimum variance portfolio.
1
Thus each portfolio begins after observing 5 years of data. (See Section 15.4.3 of the book.)
(a) Visualize the value process of both portfolios.
(b) Visualize the portfolio weights of both portfolios over time and discuss their sensitiv-
ities over time.
(c) Compute the time series of drawdown for both portfolios.
3. (Single index model) Use the same data and setting in Problem 2. The single index model
is
Ri,t = αi + βiRm,t + i,t,
where Ri,t is the return of stock i at time t, Rm,t is the benchmark (market) return and
i,t is the noise (assumed to be uncorrelated across stocks). We let the benchmark be
S&P500. Within each 5-year window, estimate the parameters (for all stocks) using ordi-
nary least squares and use the results to estimate a covariance matrix Σˆ (rather than using
the empirical average). Note that here
the 10th asset is the benchmark; make necessary changes. Using Σˆ, implement the mini-
mum variance portfolio as in (ii) in Problem 2. Compare (a)–(c) for the two portfolios.