Portfolio Theory
Time limit: 45 minutes Total marks: 60 Instructions: Show all derivations from first principles. Where code is asked, write it from memory. Use notation for math.
Q1. Two-asset variance from scratch (10 marks) Starting only from the definition of portfolio return , derive the formula for portfolio variance in terms of and the correlation . Then, using , , , , compute . Explain in one sentence why is less than the weighted-average of the individual standard deviations.
Q2. Minimum-variance weight derivation (10 marks) For two risky assets, derive the weight that minimizes portfolio variance. Then compute for the numbers in Q1. Comment on whether short-selling is required.
Q3. CAPM & Security Market Line (12 marks) (a) State the CAPM equation and define every term. (4) (b) A stock has . The risk-free rate is and the expected market return is . Compute the required return. (3) (c) The stock is actually expected to return . Compute its alpha and state whether it lies above or below the SML. (3) (d) Explain out loud (in writing) why only systematic risk is priced in CAPM. (2)
Q4. Performance ratios (12 marks) A fund returned with volatility ; its downside deviation is and its beta is . The risk-free rate is . (a) Compute the Sharpe, Sortino, and Treynor ratios. (6) (b) Explain the difference in what Sortino and Treynor measure vs Sharpe. (4) (c) Which ratio would you prefer to compare two funds within the same well-diversified portfolio, and why? (2)
Q5. Code from memory (10 marks)
Write a Python function (NumPy) portfolio_stats(weights, mean_returns, cov_matrix, rf) that returns the annualized portfolio expected return, standard deviation, and Sharpe ratio. Assume inputs are already annualized. Comment each line.
Q6. Systematic vs unsystematic risk / diversification (6 marks) Explain how total risk decomposes into systematic and unsystematic components. Sketch (describe) how portfolio risk behaves as the number of holdings increases, and state the limiting value.
Answer keyMark scheme & solutions
Q1 (10 marks)
Derivation (5): (bilinearity of variance) (3) (since ) (2)
Computation (4): (4)
Explanation (1): Because , the covariance term is smaller than the cross term of a perfect correlation, so imperfect correlation cancels part of the risk — diversification benefit. Weighted-average SD .
Q2 (10 marks)
Derivation (6): Set , differentiate w.r.t. , set to 0: Computation (3): Numerator Denominator (so ). Comment (1): Both weights positive → no short-selling required.
Q3 (12 marks)
(a) ; =risk-free rate, =sensitivity to market, =expected market return, =market risk premium. (4) (b) (3) (c) ; positive alpha → lies above the SML (underpriced/outperforming). (3) (d) Unsystematic risk can be diversified away for free, so the market does not compensate investors for bearing it; only non-diversifiable (systematic/market) risk earns a premium. (2)
Q4 (12 marks)
(a) Excess return .
- Sharpe (2)
- Sortino (2)
- Treynor (or 0.10) (2)
(b) Sharpe uses total volatility (all risk); Sortino replaces the denominator with downside deviation, penalizing only harmful downside moves (better for asymmetric returns); Treynor uses beta, measuring reward per unit of systematic risk only. (4)
(c) Treynor — within a well-diversified portfolio unsystematic risk is already eliminated, so systematic risk (beta) is the relevant risk measure. (2)
Q5 (10 marks)
import numpy as np
def portfolio_stats(weights, mean_returns, cov_matrix, rf):
w = np.array(weights) # weight vector
ret = np.dot(w, mean_returns) # expected portfolio return w·μ
var = np.dot(w, np.dot(cov_matrix, w)) # variance wᵀΣw
std = np.sqrt(var) # portfolio std dev
sharpe = (ret - rf) / std # excess return per unit risk
return ret, std, sharpeMarks: correct return dot product (2), quadratic form for variance (3), sqrt (1), Sharpe (2), returns/structure (2).
Q6 (6 marks)
Total risk systematic (market/undiversifiable) unsystematic (specific/diversifiable) (2). As increases with roughly equal weights, unsystematic variance falls ~ while covariance (systematic) terms dominate; risk declines steeply then flattens (2). Limiting value = average covariance = systematic risk floor; it cannot be diversified below that (2).
[
{"claim":"Q1 portfolio std = 0.19621","code":"var=0.25*0.04+0.25*0.09+2*0.5*0.5*0.2*0.2*0.3; result=abs(float(var)**0.5-0.19621)<1e-3"},
{"claim":"Q2 minvar weight = 0.7358","code":"num=0.09-0.2*0.2*0.3; den=0.04+0.09-2*0.2*0.2*0.3; result=abs(num/den-0.7358)<1e-3"},
{"claim":"Q3b required return = 12.4%","code":"r=4+1.4*(10-4); result=r==12.4"},
{"claim":"Q4 Sharpe=0.5, Sortino=0.9, Treynor=10","code":"result=(9/18==0.5) and (9/10==0.9) and (9/0.9==10.0)"}
]