Topic1 2 EfficientPortfolios VarCov

1. Risk return tradeoff and portfolio volatility calculation

This section covers the fundamental principles of evaluating investment risk through standard deviation and expected return, detailing the risk-return tradeoff, the mathematics of two-stock portfolio volatility, and the concept of the efficient frontier.

1.1 Measures of Risk and Return

Investment risk is characterized by the uncertainty surrounding future outcomes; while stocks generally yield positive average returns, there is always a possibility of significant short-term losses. Risk is quantified using standard deviation (σ^\hat{\sigma}), which serves as the measure of dispersion of returns. Expected returns are calculated based on weighted averages of potential outcomes 4.

The Sharpe Ratio (SR‾\overline{SR}) is the primary metric used to quantify the risk-return tradeoff, indicating the amount of expected excess return earned per unit of risk taken. The higher the Sharpe Ratio, the better the portfolio's risk-adjusted performance.

Formula for the Sharpe Ratio (\overline{SR}) used to measure the tradeoff between expected return and risk.

The formula for the Sharpe Ratio is: SR‾=R‾−Rfσ^\overline{SR} = \frac{\overline{R} - R_f}{\hat{\sigma}} where R‾\overline{R} is the expected portfolio return, RfR_f is the risk-free rate, and σ^\hat{\sigma} is the standard deviation of the portfolio's excess return 5.

Tip: The Sharpe Ratio helps compare investments that have different risk levels by standardizing the return relative to the volatility (risk).

1.2 Portfolio Volatility and Diversification

Combining multiple stocks into a portfolio can reduce overall risk through diversification. The effectiveness of this risk reduction hinges on how closely the stocks' prices move together, which is quantified by covariance. Positive covariance suggests returns tend to move in the same direction, while negative covariance implies they move in opposite directions 6.

Correlation (ρ\rho) provides a standardized measure of the strength and direction of this co-movement, always falling within the range of -1 to +1. A visual scale illustrating the range and interpretation of correlation coefficients between two stocks, from -1 (perfectly negatively correlated) to +1 (perfectly positively correlated).

A common misconception is that the standard deviation (volatility) of a portfolio is simply a weighted average of the individual asset volatilities. This is only true if the assets are perfectly positively correlated (ρ=+1\rho = +1). In general, portfolio variance, Var(Rp)\text{Var}(R_p), must account for the covariance between assets 8.

For a two-stock portfolio (Assets 1 and 2) with weights x1x_1 and x2x_2, the variance is calculated as the covariance of the portfolio return with itself: Var(Rp)=Cov(Rp,Rp)\text{Var}(R_p) = \text{Cov}(R_p, R_p) Expanding this yields: Var(Rp)=x12Cov(R1,R1)+x1x2Cov(R1,R2)+x2x1Cov(R2,R1)+x22Cov(R2,R2)\text{Var}(R_p) = x_1^2\text{Cov}(R_1, R_1) + x_1x_2\text{Cov}(R_1, R_2) + x_2x_1\text{Cov}(R_2, R_1) + x_2^2\text{Cov}(R_2, R_2)

Since Cov(Ri,Ri)=Var(Ri)\text{Cov}(R_i, R_i) = \text{Var}(R_i) and Cov(R1,R2)=Cov(R2,R1)\text{Cov}(R_1, R_2) = \text{Cov}(R_2, R_1), the formula simplifies: Var(Rp)=x12Var(R1)+x22Var(R2)+2x1x2Cov(R1,R2)\text{Var}(R_p) = x_1^2\text{Var}(R_1) + x_2^2\text{Var}(R_2) + 2x_1x_2\text{Cov}(R_1, R_2)

The slide presents the formula for calculating the variance of a two-stock portfolio, showing the expansion from covariance to terms involving variance and covariance of individual assets.

This covariance term can also be expressed using correlation (ρ12\rho_{12}) and individual standard deviations (σ1,σ2\sigma_1, \sigma_2): Cov(R1,R2)=ρ12σ1σ2\text{Cov}(R_1, R_2) = \rho_{12}\sigma_1\sigma_2

The key takeaway is that the lower the covariance (or correlation) between securities, the smaller the resulting portfolio variance 9.

Example: For a portfolio composed of Intel (I) and Coca-Cola (C), the weights must sum to 1.00 (xI+xC=1.00x_I + x_C = 1.00). Analyzing various weightings shows how expected return (E[Rp]E[R_p]) responds to weight changes, and crucially, how volatility (SD[Rp]SD[R_p]) changes, often hitting a minimum point before rising again as the weights shift entirely to one asset. If the correlation between the two stocks is changed, the expected return of any given weight combination remains constant, but the portfolio volatility changes significantly. Volatility is minimized when correlation is ρ=−1\rho = -1 and maximized when correlation is ρ=+1\rho = +1. Short selling (assigning a negative weight to a stock) is possible and can further extend the set of possible risk-return combinations 17 18.

A scatter plot illustrating the relationship between portfolio volatility (standard deviation) on the x-axis and expected return on the y-axis for various portfolios of Intel and Coca-Cola stock.

1.3 Portfolio Choice and the Efficient Frontier

The objective of mean-variance portfolio optimization is to identify the best possible portfolio allocation for an investor based on their willingness to trade off return for volatility. This problem is often broken down into two parts: finding the optimal portfolio of risky assets, and then combining that optimal risky portfolio with a risk-free asset (known as the separation property) 11 12.

1.3.1 Identifying Efficient Portfolios

When analyzing a set of possible portfolios, we distinguish between efficient and inefficient allocations:

  • Inefficient Portfolios: A portfolio is inefficient if another combination exists that offers a higher expected return for the same level of volatility, or the same expected return with lower volatility. For instance, for Intel and Coca-Cola, investing 100% in Coca-Cola was shown to be inefficient because a mix of the two stocks offered better risk-return characteristics14.
  • Efficient Portfolios: An efficient portfolio cannot have its volatility reduced without simultaneously lowering its expected return 13.

The set of all efficient portfolios forms the Efficient Frontier. This frontier represents the upper boundary of the feasible set of risk-return combinations for a given set of assets. If short sales are allowed, the set of possible portfolios (the feasible region) can expand, potentially shifting the efficient frontier further to the northwest (lower risk, higher return) 15 19.

1.3.2 Extending to N Assets and GMVP

The principles derived from two assets generalize to portfolios of NN risky assets, where the key driver remains the covariance structure among all assets. Adding more assets generally improves diversification, causing the efficient frontier to shift towards the left (lower volatility)24.

Even if a new stock has a lower return than existing assets, it might still be beneficial to include it if its returns have low or negative correlation with the existing portfolio, thus enhancing diversification benefits.

Example: Adding Bore Industries (lower return, same volatility as Coca-Cola) to a portfolio of Intel and Coca-Cola can still lead to a portfolio that offers a higher return for the same volatility compared to the original Intel/Coca-Cola mix, due to diversification effects 22.

For any collection of risky assets, the efficient frontier is the upper-left boundary of the entire feasible region of possible portfolios 23.

The Global Minimum-Variance Portfolio (GMVP) is the specific portfolio on the frontier that achieves the absolute lowest possible variance (volatility) achievable with the given set of risky assets. The GMVP is efficient, but it is only the optimal choice for investors with very low risk tolerance. The efficient frontier itself consists of all portfolios that lie on or above the GMVP on the minimum-variance frontier 26 27.

Summary of Key Data for Three Stocks (I, C, B):

  • Intel (I): Highest return (26%), highest volatility (50%).
  • Coca-Cola (C) & Bore (B): Same volatility (25%).
  • Correlation: ρIC=0\rho_{IC} = 0, and Bore is uncorrelated with both Intel and Coca-Cola 21. A table summarizing the expected return, volatility, and correlation data for three stocks: Intel, Coca-Cola, and Bore Industries.

A risk-return graph illustrating the efficient frontiers for portfolios combining Intel, Coca-Cola, and Bore Industries stocks.

A risk-return graph illustrating the efficient frontier for portfolios constructed from Intel, Coca-Cola, and Bore stocks.

2. Introduction of the risk-free asset and the capital allocation line

The introduction of a risk-free asset, such as Treasury bills (T-Bills), fundamentally alters the investment opportunity set by allowing investors to combine risky portfolios with a guaranteed return stream, leading to the creation of the Capital Allocation Line (CAL) and identifying the Optimal Risky Portfolio (ORP) via the maximization of the Sharpe Ratio 30.

2.1 Combining Risky Assets with a Risk-Free Asset

Previously, analysis focused solely on combining risky assets to form efficient portfolios along the Mean-Variance Frontier (MVF). Introducing a risk-free asset (rfr_f) changes this by allowing a fraction of capital (yy) to be invested in a risky portfolio (PP), with the remainder (1−y)(1-y) invested in the risk-free asset 29.

When combining the risk-free asset with any arbitrary portfolio of risky assets, both the expected return, E(Rc)E(R_c), and the standard deviation, σc\sigma_c, of the combined portfolio (cc) become linear functions of the fraction yy invested in the risky asset portfolio:

E(Rc)=rf+y(E(Rp)−rf)E(R_c) = r_f + y(E(R_p) - r_f) σc=yσp\sigma_c = y\sigma_p

This linear relationship signifies that adding the risk-free asset allows for risk reduction, but often at the cost of reduced expected return, depending on the allocation yy.

A chart illustrating the relationship between expected return and volatility (standard deviation) for various investment strategies involving a risky portfolio P and a risk-free investment.

2.2 The Capital Allocation Line (CAL)

The Capital Allocation Line (CAL) represents all possible combinations of the risk-free asset and a specific risky portfolio PP. The CAL plots the expected return against the standard deviation for these combinations.

The slope of the CAL connecting the risk-free rate (rfr_f) to a risky portfolio PP is constant and is defined by the Sharpe Ratio of portfolio PP:

Slope of CAL=Sharpe Ratio=E(Rp)−rfσp\text{Slope of CAL} = \text{Sharpe Ratio} = \frac{E(R_p) - r_f}{\sigma_p}

The Sharpe Ratio serves as the reward-to-risk measure, where a higher ratio indicates greater portfolio attractiveness because it offers a superior return compensation per unit of standard deviation risk taken. When comparing different potential risky portfolios (like A and B), the portfolio that generates the steepest CAL offers the best risk-return trade-off relative to the risk-free rate 35.

A graph illustrating the Capital Allocation Line (CAL) for two different risky portfolios (A and B) when combined with a risk-free asset, plotted on axes of Standard Deviation (%) vs. Expected Return (%).

2.3 Identifying the Optimal Risky Portfolio (ORP)

The goal when including a risk-free asset is to find the risky portfolio that yields the steepest possible Capital Allocation Line. This "best" portfolio of risky assets is known as the Optimal Risky Portfolio (ORP) or the Tangency Portfolio.

The ORP is the unique portfolio on the efficient frontier of risky assets such that the line connecting the risk-free rate (rfr_f) to this portfolio is tangent to the frontier curve. This tangency point mathematically maximizes the Sharpe Ratio among all available risky portfolios 36.

Tip: The Tangency Portfolio is the most highly diversified portfolio available consisting only of risky assets that provides the best risk-return trade-off before considering any allocation to the risk-free asset. The Efficient Frontier including the risk-free asset is the line segment starting at rfr_f and extending along the CAL defined by the Tangency Portfolio 37.

The Sharpe Ratio formula calculates the reward-to-risk measure for a portfolio.

The relationship between the risk-free rate, the optimal risky portfolio PP, and the resulting CAL is critical. The line CAL(P)\text{CAL}(P) is tangent to the Opportunity Set of Risky Assets precisely at point PP, the tangency portfolio that maximizes the Sharpe Ratio 38.

A chart illustrating the relationship between expected return and volatility (standard deviation) for different investment portfolios, showing the efficient frontiers.

2.4 The Separation Property

The analysis of introducing the risk-free asset leads to the powerful Separation Property. This property dictates how different investors will structure their overall portfolios 33:

  1. Universal Risky Portfolio Choice: All investors, irrespective of their individual risk aversion, will choose to hold the exact same portfolio of risky assets—the Tangency Portfolio (PP). This is because PP offers the absolute best risk-return trade-off achievable with risky assets.
  2. Risk Aversion Dictates Allocation: The only difference among investors will be the degree to which they mix this optimal risky portfolio (PP) with the risk-free asset (rfr_f).
    • Conservative investors (highly risk-averse) will invest a small fraction in PP and a large fraction in T-bills.
    • Aggressive investors (less risk-averse) will invest a larger fraction in PP, potentially even borrowing at the risk-free rate to invest more than 100% in PP (buying on margin), which corresponds to values of y>1y > 1 on the CAL 31 39.

Example: If the Tangency Portfolio yields an expected return of 15% with a standard deviation of 20%, and the risk-free rate is 5% (0.05 dollars), a conservative investor might choose y=0.5y=0.5, leading to an expected return of 0.05+0.5(0.15−0.05)=0.100.05 + 0.5(0.15 - 0.05) = 0.10 or 10 dollars, and a standard deviation of 0.5×0.20=0.100.5 \times 0.20 = 0.10 or 10 percent 32.

The process for determining the optimal investment strategy involves two steps:

  1. Determine the efficient frontier of risky assets and identify the Tangency Portfolio (PP) by finding the CAL with the steepest slope (highest Sharpe Ratio).
  2. The individual investor then selects the appropriate mix between this optimal risky portfolio PP and the risk-free asset (rfr_f) based on their risk tolerance.

The Capital Allocation Line (CAL) shows the relationship between expected return and standard deviation for portfolios combining the risk-free asset (rf) and a risky portfolio (P).

The set of risky investments itself is constrained by the Minimum-Variance Frontier, of which the Efficient Frontier is the upper, preferred portion 40.

A diagram illustrating the relationship between individual assets, the minimum-variance frontier, and the efficient frontier in terms of expected return E(r) and risk (sigma).

3. Matrix notation and implementation of mean-variance analysis in Excel

This section translates the theoretical framework of mean-variance optimization for NN assets into precise matrix notation and outlines the practical steps for implementation, particularly using Microsoft Excel's capabilities, including calculating the Global Minimum-Variance Portfolio (GMVP) and employing Solver for optimization.

3.1 Matrix Notation for Portfolio Characteristics

For a portfolio consisting of NN risky assets, key inputs like expected returns and the covariance structure are compactly represented using vectors and matrices.

The vector of expected returns, E(R)\mathbf{E}(\mathbf{R}), is an N×1N \times 1 column vector where each element E(Ri)E(R_i) is the expected return for asset ii:

E(R)=[E(R1)E(R2)⋮E(RN)]\mathbf{E}(\mathbf{R}) = \begin{bmatrix} E(R_1) \\ E(R_2) \\ \vdots \\ E(R_N) \end{bmatrix}

The variance-covariance matrix, S\mathbf{S}, is an N×NN \times N symmetric matrix where diagonal elements σii\sigma_{ii} represent the variance of asset ii, and off-diagonal elements σij\sigma_{ij} represent the covariance between asset ii and asset jj.

S=[σ11σ12⋯σ1Nσ21σ22⋯σ2N⋮⋮⋱⋮σN1σN2⋯σNN]\mathbf{S} = \begin{bmatrix} \sigma_{11} & \sigma_{12} & \cdots & \sigma_{1N} \\ \sigma_{21} & \sigma_{22} & \cdots & \sigma_{2N} \\ \vdots & \vdots & \ddots & \vdots \\ \sigma_{N1} & \sigma_{N2} & \cdots & \sigma_{NN} \end{bmatrix}

Matrix notation for the variance-covariance matrix S for N risky assets. 42.

The portfolio weights are represented by the vector x\mathbf{x}, an N×1N \times 1 column vector where xix_i is the proportion invested in asset ii. A fundamental constraint in portfolio construction is that the weights must sum to one:

x=[x1x2⋮xN]such that ∑i=1Nxi=1\mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \\ \vdots \\ x_N \end{bmatrix} \quad \text{such that } \sum_{i=1}^{N} x_i = 1

Mathematical notation defining a portfolio vector x and the constraint that the sum of asset proportions equals one. 43.

The expected return of the portfolio, E(RP)E(R_P), is calculated as the dot product of the transposed weight vector and the expected return vector:

E(RP)=xTE(R)=∑i=1NxiE(Ri)E(R_P) = \mathbf{x}^T \mathbf{E}(\mathbf{R}) = \sum_{i=1}^{N} x_i E(R_i)

The portfolio variance, σP2\sigma_P^2, is calculated using the quadratic form involving the weight vector and the variance-covariance matrix:

σP2=xTSx=∑i=1N∑j=1Nxixjσij\sigma_P^2 = \mathbf{x}^T \mathbf{S} \mathbf{x} = \sum_{i=1}^{N} \sum_{j=1}^{N} x_i x_j \sigma_{ij}

In Excel, this calculation is implemented as an array function: =MMult(MMult(x_as_row,VarCov),x_as_column).

3.2 Implementation Steps in Excel

Translating the theory into practice using Excel involves several key steps, starting with data preparation and culminating in portfolio optimization 46.

3.2.1 Data Preparation and Statistic Estimation

Before optimization, the necessary inputs, E(Ri)E(R_i) and S\mathbf{S}, must be estimated from historical price data.

  1. Data Acquisition: Download historical price data (e.g., from Bloomberg, LSEG, or Investing.com) and convert it into periodic returns 48.
  2. Statistic Estimation (Step 1): Calculate the variance-covariance matrix (S\mathbf{S}) using the demeaned returns (R~\tilde{\mathbf{R}}): S=R~TR~M−1\mathbf{S} = \frac{\tilde{\mathbf{R}}^T \tilde{\mathbf{R}}}{M-1} where MM is the number of observations. Excel's "Data Analysis" tool might use a denominator of MM instead of M−1M-1.

A standard starting point for portfolio construction is the equally-weighted portfolio, where xi=1/Nx_i = 1/N for all assets 50.

A variance-covariance matrix displayed in an Excel spreadsheet format for various assets. 49.

Tip: When setting up the Excel sheet, ensure the structure aligns with matrix multiplication rules: the weight vector x\mathbf{x} should be a column vector, S\mathbf{S} should be the covariance matrix, and xT\mathbf{x}^T should be represented as a row vector in the calculation formulas 44.

3.2.2 Evaluating a Generic Portfolio

For any given set of weights x\mathbf{x}, the portfolio statistics are calculated as follows 47:

  1. Step 3 (Variance): Calculate σP2=xTSx\sigma_P^2 = \mathbf{x}^T \mathbf{S} \mathbf{x} 51.
  2. Step 4 (Expected Return): If a risk-free rate (rfr_f) exists, the excess return component is used: xi×(E(Ri)−rf)x_i \times (E(R_i) - r_f). Otherwise, it is xi×E(Ri)x_i \times E(R_i). A table displaying weighted returns for various assets over different time periods, likely for portfolio analysis. 52.
  3. Step 5 (Portfolio Expected Return): Sum the individual weighted returns: E(RP)=∑i=1NxiE(Ri)E(R_P) = \sum_{i=1}^{N} x_i E(R_i).

An Excel spreadsheet snippet showing the calculation of the expected portfolio return (E(R_P)) by summing individual returns. 53.

3.3 Global Minimum-Variance Portfolio (GMVP) Weights

The Global Minimum-Variance Portfolio (GMVP) weights, xGMVP\mathbf{x}^{GMVP}, are found by minimizing portfolio variance subject only to the constraint that weights sum to one (∑xi=1\sum x_i = 1).

The analytical solution for the GMVP weights relies on the inverse of the variance-covariance matrix (S−1\mathbf{S}^{-1}):

xGMVP=S−111TS−11\mathbf{x}^{GMVP} = \frac{\mathbf{S}^{-1} \mathbf{1}}{\mathbf{1}^T \mathbf{S}^{-1} \mathbf{1}}

where 1\mathbf{1} is a column vector of ones.

Formula for calculating the weights of the Global Minimum-Variance Portfolio (GMVP) using the inverse of the Variance-Covariance matrix..

The implementation steps for GMVP in Excel involve:

  • Steps 1 & 2: Calculate S\mathbf{S} and then derive the weights xGMVP\mathbf{x}^{GMVP} using the formula involving S−1\mathbf{S}^{-1} 54.
  • Step 3 (Variance): Calculate the GMVP variance using xGMVP\mathbf{x}^{GMVP} 55.
  • Step 4 & 5 (Expected Return): Calculate the expected return for this specific weight vector, E(RGMVP)E(R_{GMVP}) 56.

Example: In a full analysis, the expected return for a specific GMVP calculation (based on inputs in row 35) might yield −0.08%-0.08\%, while the average expected return across several calculated GMVPs (row 56) might be 0.80%0.80\%. This table displays the expected returns for the Global Minimum-Variance Portfolio (E(R_GMVP)) calculated using Excel formulas. 57.

3.4 Constructing the Efficient Frontier and Optimization with Solver

The efficient frontier is characterized by portfolios that offer the highest expected return for a given level of risk (variance) or the lowest risk for a given target return (R∗R^*) 58.

3.4.1 N-Asset Frontier Optimization

For NN assets, the optimization problem to trace the frontier is formally stated as minimizing variance subject to two constraints:

  1. ∑i=1Nxi=1\sum_{i=1}^{N} x_i = 1
  2. ∑i=1NxiE(Ri)=R∗\sum_{i=1}^{N} x_i E(R_i) = R^* (Target return constraint)

The objective function is min⁡Var(Rp)=min⁡xTSx\min \text{Var}(R_p) = \min \mathbf{x}^T \mathbf{S} \mathbf{x} 59.

Tip: For problems involving many assets, manual calculation becomes infeasible; this necessitates the use of optimization software, which Excel provides via Solver.

3.4.2 Sharpe Ratio Maximization and Solver Application

The Optimal Risky Portfolio (ORP) is identified by maximizing the Sharpe Ratio (SRpSR_p):

max⁡xSRp=max⁡xE(Rp)−rfVar(Rp)\max_{\mathbf{x}} SR_p = \max_{\mathbf{x}} \frac{E(R_p) - r_f}{\sqrt{\text{Var}(R_p)}}

subject to the constraint ∑i=1Nxi=1\sum_{i=1}^{N} x_i = 1 60.

Excel's Solver tool is essential for implementing these constrained optimizations. Solver can be used to:

  • Find the minimum portfolio variance (e.g., the GMVP).
  • Minimize variance for a specific target expected return.
  • Maximize expected return for a target variance.
  • Maximize the utility function: {E(Rp)−12A×Var(Rp)}\{E(R_p) - \frac{1}{2A} \times \text{Var}(R_p)\}, where AA is the coefficient of risk aversion.

Solver also allows imposing practical constraints beyond the core requirements, such as no short sales (x≥0\mathbf{x} \ge 0) or setting minimum and maximum bounds on individual holdings. The overall algorithm for mean-variance analysis involves forecasting parameters, imposing constraints, solving the minimum variance problem for various target returns to map the frontier, and finally maximizing the Sharpe Ratio to find the ORP 61 62.

Common mistakes to avoid

  • Review all topics thoroughly before exams
  • Pay attention to formulas and key definitions
  • Practice with examples provided in each section
  • Don't memorize without understanding the underlying concepts

© 2026 Maeve. All rights reserved. This content is protected by copyright.

See also