Exercises
Exercise 6.1 (Effect of rebalancing)
- Download market data corresponding to \(N\) assets (e.g., stocks or cryptocurrencies) during a period with \(T\) observations, \(\bm{r}_1, \dots, \bm{r}_T \in \R^N\).
- Start with the \(1/N\) portfolio at time \(t=1\) and let the portfolio weights naturally evolve as the assets’ prices change over time. Plot the portfolio weights and the NAV over time (assuming transaction costs of 90 bps).
- Repeat using a regular calendar-based rebalancing scheme.
- Repeat using an adaptive rebalancing scheme when the difference exceeds a threshold.
Exercise 6.2 (Portfolio constraints) Consider a universe of \(N=2\) assets and draw the set of feasible portfolios under the following constraints:
- Budget and no-shorting constraints: \[ \bm{1}^\T\w \leq 1, \quad \w \ge \bm{0}. \]
- Budget fully invested and no-shorting constraints: \[ \bm{1}^\T\w = 1, \quad \w \ge \bm{0}. \]
- Budget, no-shorting, and holding constraints: \[ \bm{1}^\T\w \leq 1, \quad \w \ge \bm{0}, \quad \w \le 0.6\times\bm{1}. \]
- Budget and turnover constraints: \[\bm{1}^\T\w \leq 1, \quad \|\w - \w_0\|_1\leq 0.5,\] with \(\w_0\) denoting the \(1/N\) portfolio.
- Leverage constraint: \[\|\w\|_1\leq 1.\]
Exercise 6.3 (Performance measures)
- Download market data corresponding to the S&P 500 index.
- Plot the returns and cumulative returns over time.
- Calculate the annualized expected return with arithmetic and geometric compounding.
- Calculate the annualized volatility.
- Plot the volatility-adjusted returns and cumulative returns over time.
- Calculate the annualized Sharpe ratio with arithmetic and geometric compounding.
- Calculate the annualized semi-deviation and Sortino ratio.
- Calculate the VaR and CVaR.
- Plot the drawdown over time.
Exercise 6.4 (Heuristic portfolios)
- Download market data corresponding to \(N\) assets during a period with \(T\) observations.
- Using 70% of the data, compute the following heuristic portfolios: \(1/N\) portfolio and quintile portfolios using different ranking mechanisms.
- Plot and compare the different portfolio allocations over time.
- Using the remaining 30% of the data, assess the portfolios in terms of cumulative returns, volatility-adjusted cumulative returns, Sharpe ratio, and drawdown.
Exercise 6.5 (Risk-based portfolios) Repeat Exercise 6.4 with the following risk-based portfolios:
- global minimum variance portfolio (GMVP)
- inverse volatility portfolio (IVolP)
- most diversified portfolio (MDP)
- maximum decorrelation portfolio (MDCP)