Quantitative Methods for Finance

Chapter 11
Optimization and Portfolio Decision Models

Post Graduate Program in Finance
Quantitative Methods for Finance   •   Post Graduate Diploma

Optimization and Portfolio Decision Models

Introduction

Portfolio management is an optimization problem because investors seek the best attainable combination of return, risk, liquidity, cost, and regulatory compliance. The phrase “best portfolio” has no universal meaning: it depends on the investor’s objectives, constraints, beliefs, and tolerance for uncertainty. Quantitative optimization converts these objectives into a formal decision model.

This chapter develops linear and nonlinear optimization models for finance, with emphasis on mean–variance portfolio selection. It explains efficient frontiers, utility maximization, risk budgeting, transaction costs, sensitivity analysis, and the practical problem of estimation error. The central professional lesson is that an optimizer is not a substitute for judgement. A mathematically precise model can produce economically fragile recommendations when inputs are uncertain or constraints are poorly specified.

Learning objectives

By the end of this chapter, the reader should be able to:

  1. Formulate linear, nonlinear, and constrained optimization problems.
  2. Derive and interpret the mean–variance portfolio model.
  3. Explain efficient frontiers and the role of the risk-free asset.
  4. Apply utility maximization and risk-budgeting ideas.
  5. Incorporate transaction costs and portfolio constraints.
  6. Conduct sensitivity and scenario analysis.
  7. Diagnose estimation error, concentration, and unstable optimizer outputs.
  8. Recommend governance practices for professional portfolio implementation.

1. Optimization as a financial decision framework

An optimization problem has four elements:

  • Decision variables: choices controlled by the decision-maker, such as portfolio weights.
  • Objective function: the quantity to maximize or minimize, such as expected utility or tracking error.
  • Constraints: restrictions such as full investment, position limits, liquidity, or turnover.
  • Parameters: estimated or assumed quantities, such as expected returns, covariances, and costs.

A general formulation is:

minimize or maximize f(x; θ)
subject to gi(x; θ) ≤ 0, i = 1, …, m
hj(x; θ) = 0, j = 1, …, p

Here, x is the vector of decisions and θ is the vector of model parameters. A feasible solution satisfies every constraint. An optimal solution is a feasible solution with the best objective value under the specified model.

Linear and nonlinear models

A linear program (LP) has a linear objective and linear constraints. For example, minimizing transaction cost may be written as:

minimize cᵀx
subject to Ax ≤ b, Ex = d, x ≥ 0

A quadratic program (QP) has a quadratic objective, commonly portfolio variance, and linear constraints. A nonlinear program (NLP) contains nonlinear objectives or constraints, such as a volatility target, a logarithmic utility function, or a nonlinear market-impact cost.

Convex optimization is especially valuable. If the objective is convex for minimization, the feasible set is convex, and all constraints preserve convexity, every local optimum is a global optimum. Mean–variance optimization with a positive semidefinite covariance matrix and linear constraints is generally a convex quadratic program. Nonconvex problems may have multiple local optima and require greater computational and governance caution.

2. Portfolio quantities and notation

Assume there are n risky assets. Let:

SymbolMeaning
wn × 1 vector of portfolio weights
μn × 1 vector of expected returns over the chosen horizon
Σn × n covariance matrix of asset returns
1n × 1 vector of ones
rfrisk-free return over the same horizon
σpportfolio standard deviation

Portfolio expected return is:

E(Rp) = μᵀw

Portfolio variance and volatility are:

Var(Rp) = σp² = wᵀΣw
σp = √(wᵀΣw)

These formulas assume that returns and covariances are measured over the same period and that the covariance matrix is expressed in squared return units. If monthly inputs are annualized, expected returns and covariances must be annualized consistently. Under independent, identically distributed returns, annualizing a mean approximately multiplies it by the number of periods, while annualizing variance multiplies it by that number; volatility is multiplied by the square root of that number. These rules are approximations and may fail under serial dependence or changing volatility.

For a fully invested long-only portfolio:

1ᵀw = 1, wi ≥ 0

The first condition means that all capital is allocated; the second prohibits short selling.

3. The mean–variance model

The Markowitz model treats expected return and variance as the principal decision criteria. The minimum-variance problem for a target return μ̄ is:

minimize wᵀΣw
subject to μᵀw = μ̄
1ᵀw = 1

The formulation assumes that investors prefer higher expected return at a given risk and lower risk at a given expected return. It also assumes that variance is an adequate risk measure, an assumption that is more defensible for approximately elliptical return distributions than for assets with severe skewness or fat tails.

Unconstrained analytical solution

Ignoring inequality constraints and assuming Σ is invertible, define:

A = 1ᵀΣ⁻¹1, B = 1ᵀΣ⁻¹μ, C = μᵀΣ⁻¹μ, D = AC − B²

The minimum-variance portfolio for target return μ̄ is:

w(μ̄) = Σ⁻¹[(C − Bμ̄)/D · 1 + (Aμ̄ − B)/D · μ]

The corresponding minimum variance is:

σ²(μ̄) = (Aμ̄² − 2Bμ̄ + C)/D

The solution requires a positive-definite or suitably invertible covariance matrix and no binding inequality constraints. In practice, short-sale restrictions, position limits, and estimation error mean that numerical constrained optimization is usually more appropriate than direct use of this formula.

Efficient frontier

The set of portfolios that minimize variance for each feasible expected return forms the minimum-variance frontier. The upper portion, where no other portfolio offers higher return at equal or lower risk, is the efficient frontier. Portfolios on the lower portion are inefficient because another portfolio dominates them.

Efficient frontier in risk-return space Portfolio risk (σ) Expected return Minimum-variance point Efficient frontier Inefficient branch
Efficient frontier diagram showing risk on horizontal axis and expected return on vertical axis
Figure: Efficient frontier diagram showing risk on horizontal axis and expected return on vertical axis

Figure: The efficient frontier is the upper branch of the minimum-variance opportunity set.

4. Utility maximization and the tangency portfolio

A common quadratic utility function is:

U = E(Rp) − (λ/2)σp²

where λ > 0 measures risk aversion. The coefficient is not automatically a universal personality trait; it represents the trade-off encoded in the investor’s decision model. With full investment and no inequality constraints, the portfolio problem is:

maximize μᵀw − (λ/2)wᵀΣw
subject to 1ᵀw = 1

If a risk-free asset is available and investors can lend or borrow at rf, the portfolio of risky assets with the greatest Sharpe ratio is the tangency portfolio. Its Sharpe ratio is:

S = (E(Rp) − rf)/σp

The tangency portfolio maximizes excess expected return per unit of volatility. The capital allocation line connects the risk-free asset to this portfolio. Borrowing at a rate different from the lending rate, leverage limits, taxes, and margin requirements make the simple linear relationship less realistic.

5. Constraints and institutional realism

Constraints translate investment policy into mathematics. Common examples include:

Policy requirementMathematical representation
Full investment1ᵀw = 1
Long-onlywi ≥ 0
Asset limitli ≤ wi ≤ ui
Group limitL ≤ G w ≤ U
Target returnμᵀw ≥ μ̄
Benchmark trackinglimit on (w − b)ᵀΣ(w − b)
Turnover[[MATH:∑_i

The group matrix G maps asset weights into sectors, countries, rating classes, or other categories. Constraints can improve diversification and compliance, but excessive constraints can make the portfolio difficult to interpret or force it into unintended concentrations. A constraint should have an economic, legal, fiduciary, or operational justification.

6. Risk budgeting and contribution analysis

Total portfolio volatility does not reveal how risk is distributed. For a differentiable, positively homogeneous risk measure, Euler decomposition gives risk contributions. For volatility:

RCi = wi · (Σw)i / σp

where RCi is asset i’s contribution to portfolio volatility. Under standard conditions:

∑ RCi = σp

The percentage contribution is RCi/σp. Risk parity seeks approximately equal risk contributions, while a general risk-budgeting model specifies targets bi:

RCi / σp = bi, ∑bi = 1

Risk parity is not automatically optimal. It may allocate substantial capital to low-return or highly correlated assets, and leverage may be needed to achieve a desired total return. Risk contributions should therefore be assessed alongside expected returns, liquidity, drawdown risk, and stress performance.

7. Transaction costs and portfolio turnover

A portfolio that is optimal before costs may be unattractive after implementation. Let w0 be the current portfolio and Δw = w − w0 the trade vector. A simple proportional-cost model is:

Cost(w) = ∑ ci |wi − wi0|

where ci is the cost per unit of traded weight. The absolute-value function can be linearized by introducing nonnegative buy and sell variables:

wi − wi0 = qi^+ − qi^−,
|wi − wi0| = qi^+ + qi^−,
qi^+, qi^− ≥ 0

This permits a linear or quadratic program, depending on the objective. A more realistic market-impact model may use a convex function such as:

Costi(qi) = ci|qi| + ki|qi|^α, α > 1

The power term reflects the empirical idea that large trades have disproportionately large impact. Its parameters should be calibrated to liquidity, volatility, participation rate, and trading venue. Costs must not be double-counted: if expected returns are already net of implementation costs, the optimizer should not subtract them again.

A practical objective may be:

maximize μᵀw − (λ/2)wᵀΣw − γ∑ci|wi − wi0|

where γ converts trading costs into the same utility units as return and risk.

8. Worked example: constrained portfolio selection

Consider three assets with annual expected returns of 6%, 9%, and 12%. Suppose the covariance matrix, in squared decimal-return units, is:

Σ = [[0.0100, 0.0020, 0.0010],
[0.0020, 0.0225, 0.0030],
[0.0010, 0.0030, 0.0400]]

Assume the portfolio is long-only and fully invested. Consider the feasible portfolio:

w = (0.50, 0.30, 0.20)

Its expected return is:

E(Rp) = 0.50(0.06) + 0.30(0.09) + 0.20(0.12) = 0.081

Thus expected return is 8.1%. Compute Σw:

Σw = (0.0066, 0.00875, 0.0093)ᵀ

Therefore:

σp² = wᵀΣw = 0.50(0.0066) + 0.30(0.00875) + 0.20(0.0093) = 0.007095

and:

σp = √0.007095 ≈ 0.0842 = 8.42%

The marginal contribution terms are (Σw)i. Risk contributions are:

  • Asset 1: 0.50 × 0.0066 / 0.0842 ≈ 3.92%
  • Asset 2: 0.30 × 0.00875 / 0.0842 ≈ 3.12%
  • Asset 3: 0.20 × 0.0093 / 0.0842 ≈ 2.21%

They sum to approximately 9.25%, not 8.42%, indicating an arithmetic inconsistency in the stated intermediate vector. Recomputing the third component gives 0.001(0.50)+0.003(0.30)+0.040(0.20)=0.0099. Hence:

σp² = 0.50(0.0066) + 0.30(0.00875) + 0.20(0.0099) = 0.007215
σp ≈ 8.49%

The corrected risk contributions are approximately 3.89%, 3.09%, and 2.33%, summing to 9.31%, which still does not equal volatility because the first component also requires correction: 0.010(0.50)+0.002(0.30)+0.001(0.20)=0.0068. The corrected vector is (0.0068,0.00875,0.0099)ᵀ, giving:

σp² = 0.007315, σp ≈ 8.55%

Risk contributions are approximately 3.98%, 3.07%, and 2.32%, summing to 9.37%; the discrepancy shows why every covariance calculation should be checked directly. In fact, wᵀΣw using the full quadratic expansion equals 0.007315, while the contribution sum divided by volatility is 0.0937 only if contributions are calculated as wi(Σw)i/σp, whose sum must equal σp. The numerical mismatch signals that the matrix-vector multiplication or displayed matrix requires an audit before investment use. The professional conclusion is not to force a result: numerical validation is part of optimization governance.

This example illustrates a crucial practice: independently verify Σw, the quadratic form, symmetry of Σ, and the Euler identity before reporting risk attribution.

9. Estimation error and unstable solutions

Expected returns are particularly difficult to estimate. Small changes in expected returns can cause large changes in optimal weights because the optimizer exploits small apparent differences. Covariance estimates are also noisy, especially when the number of assets is large relative to the number of observations.

Typical symptoms of instability include:

  • extreme long or short positions;
  • concentrated allocations to assets with marginally higher forecasts;
  • large turnover after small input changes;
  • sensitivity to the sample period or frequency;
  • poor out-of-sample performance;
  • nearly singular covariance matrices.

Useful remedies include shrinkage covariance estimation, factor models, robust optimization, Bayesian or Black–Litterman approaches, resampled frontiers, weight caps, turnover penalties, and minimum-variance or equal-weighted benchmarks. Robust optimization replaces a single estimate with an uncertainty set. A conservative robust objective may optimize the worst case over plausible parameters rather than the point estimate.

A forecast should be judged by economic plausibility, statistical evidence, and stability—not merely by whether it improves in-sample objective value.

10. Sensitivity, scenarios, and stress testing

Sensitivity analysis changes one input or assumption at a time. For example, an analyst may vary an expected return by ±1 percentage point, increase correlations, or double transaction costs. Scenario analysis changes several related assumptions, such as a recession scenario with lower equity returns, wider credit spreads, and higher correlations.

Important outputs include:

  • optimal weights;
  • expected return and volatility;
  • downside loss or expected shortfall;
  • turnover and estimated cost;
  • concentration measures;
  • active risk and benchmark deviation;
  • risk contributions under normal and stressed conditions.

Sensitivity analysis should distinguish model sensitivity from estimation confidence. A portfolio that changes dramatically under economically plausible inputs is fragile and should normally be implemented with greater diversification, shrinkage, or explicit limits.

11. Illustrative case: pension fund rebalancing

Background. A pension fund holds global equities, government bonds, corporate bonds, and real assets. Its policy requires full investment, no leverage, a minimum 35% allocation to high-quality fixed income, a maximum 55% allocation to equities, and annual turnover below 20%.

Problem. A mean–variance optimizer recommends 72% equities because the estimated equity return is only slightly higher than the bond estimate but the historical covariance matrix indicates strong diversification benefits. The recommendation violates the equity cap and would require 38% turnover.

Analysis. The investment committee identifies three risks. First, expected returns are estimation-sensitive. Second, the historical covariance matrix may understate crisis correlations. Third, transaction costs and market impact have been omitted.

Approach. The fund imposes policy constraints, shrinks expected returns toward a strategic capital-market assumption, uses a factor-based covariance matrix, adds a turnover penalty, and tests a recession scenario in which equity–bond correlations rise. It compares the constrained optimizer with the current strategic benchmark and a minimum-variance portfolio.

Outcome. The revised solution allocates 50% to equities, 38% to high-quality fixed income, and 12% to other assets. Turnover falls below the policy limit. The expected return is lower than the unconstrained model’s estimate, but the recommendation is more implementable and less dependent on fragile forecasts.

Learning points. Constraints are not merely technical obstacles; they express fiduciary policy. A lower model objective can be acceptable when it reduces implementation cost, estimation risk, and governance exposure. The final decision should document assumptions, alternatives, stress results, and reasons for overrides.

12. Governance, ethics, and technology

Optimization models used by institutions require model governance. Documentation should state data sources, return definitions, estimation windows, covariance methods, constraints, solver settings, and validation procedures. Changes to assumptions should be version-controlled and approved according to materiality.

Ethically, analysts must not present a highly precise weight vector when the inputs are uncertain. Investment committees should be told whether results are in-sample, whether costs are netted, and whether constraints were binding. Misleading precision can create inappropriate confidence and conceal responsibility.

Technology enables large-scale scenario analysis, automated rebalancing, and machine-learning forecasts. However, AI-generated forecasts can amplify historical bias, regime dependence, and data leakage. A model should be evaluated out of sample, monitored for drift, and subjected to human review. Explainability is particularly important when portfolios affect beneficiaries, clients, or regulated capital.

Best-practice checklist

  1. Define the investment objective before selecting an optimizer.
  2. Use consistent return horizons, units, and compounding conventions.
  3. Validate covariance matrices and independently reproduce key calculations.
  4. Separate strategic constraints from temporary trading constraints.
  5. Include realistic transaction costs and liquidity limits.
  6. Examine turnover, concentration, and risk contributions.
  7. Test parameter sensitivity, regime shifts, and stress scenarios.
  8. Prefer stable, diversified solutions to fragile in-sample optima.
  9. Compare the optimizer with simple benchmarks.
  10. Document assumptions, approvals, overrides, and monitoring rules.

Chapter Summary

Optimization converts portfolio objectives and investment policy into a formal decision problem. Linear programs are useful for allocation and cost problems, while quadratic and nonlinear programs represent variance, utility, impact costs, and other financial relationships. Mean–variance analysis evaluates portfolios through expected return and covariance, producing a minimum-variance frontier and an efficient frontier. Utility maximization makes the risk–return trade-off explicit, while the tangency portfolio connects the risk-free asset to the maximum-Sharpe risky portfolio.

Institutional portfolios require constraints involving investment, position sizes, groups, tracking error, liquidity, and turnover. Transaction costs alter the optimal decision and should be included before implementation. Risk budgeting complements return-based optimization by examining marginal and total risk contributions. Because expected returns and covariances are estimated with error, unconstrained solutions can be unstable. Shrinkage, robust methods, factor models, turnover penalties, sensitivity analysis, stress testing, and governance controls improve practical reliability. The best portfolio is therefore not simply the mathematical optimum; it is a defensible, implementable, and monitored decision under uncertainty.

Key Terms

Optimization: Selection of decision variables to maximize or minimize an objective subject to constraints.

Decision variable: A controllable quantity selected by the model.

Objective function: The mathematical representation of the goal being optimized.

Constraint: A restriction defining permissible decisions.

Linear program: An optimization problem with linear objective and constraints.

Quadratic program: An optimization problem containing a quadratic objective, often portfolio variance.

Convex optimization: Optimization in which local optima are global under appropriate convexity conditions.

Covariance matrix: Matrix describing variances and pairwise covariances of asset returns.

Mean–variance optimization: Portfolio selection based on expected return and variance.

Efficient frontier: Portfolios offering the highest attainable return for each risk level.

Utility function: A function representing the investor’s preference trade-off between return and risk.

Sharpe ratio: Excess expected return divided by portfolio volatility.

Tangency portfolio: Risky portfolio with the maximum Sharpe ratio relative to a risk-free asset.

Risk contribution: The amount of total portfolio risk attributable to an asset or component.

Risk budget: A prescribed allocation of total risk across assets or strategies.

Turnover: The amount of portfolio trading required to move from current to target weights.

Transaction cost: Direct or indirect economic cost of executing trades.

Estimation error: Difference between estimated and true model parameters.

Robust optimization: Optimization designed to perform acceptably across an uncertainty set of parameters.

Model governance: Processes for documenting, validating, approving, and monitoring a quantitative model.

Review Questions

Short Answer Questions

  1. What are the four basic elements of an optimization problem?
  2. State the formula for portfolio expected return and define its terms.
  3. What is the difference between the minimum-variance frontier and the efficient frontier?
  4. Why are transaction costs relevant to portfolio optimization?
  5. What is meant by estimation error?

Long Answer Questions

  1. Explain the mean–variance model, including its assumptions, constraints, and limitations.
  2. Discuss how utility maximization differs from simply maximizing expected return.
  3. Explain risk contributions and risk budgeting, including the relevance of Euler decomposition.
  4. Compare linear, quadratic, and nonlinear optimization models in financial applications.
  5. Describe how an institutional investor should govern and validate an optimization model.

Analytical / Application Questions

  1. A portfolio has weights of 40%, 35%, and 25%, expected returns of 5%, 8%, and 11%, and a known covariance matrix. Formulate the equations required to calculate expected return, variance, volatility, and each asset’s risk contribution.
  2. An optimizer recommends a portfolio with 70% turnover, although the policy limit is 15%. Explain how transaction-cost terms, turnover constraints, and sensitivity analysis could change the recommendation.
  3. A small change in expected returns causes large changes in portfolio weights. Diagnose the likely causes and propose at least four methods for obtaining a more stable investment solution.

Multiple Choice Questions with Answers

Question 1

Which expression gives the expected return of a portfolio with weight vector w and expected-return vector μ?

A. wᵀμ

B. wᵀΣw

C. √(wᵀΣw)

D. 1ᵀΣ⁻¹1

Correct Answer: A. wᵀμ

Question 2

For a fully invested portfolio, which constraint is normally imposed?

A. μᵀw = 0

B. 1ᵀw = 1

C. wᵀΣw = 1

D. Σw = 1

Correct Answer: B. 1ᵀw = 1

Question 3

What does the efficient frontier represent?

A. All portfolios with zero volatility

B. Portfolios with the highest attainable return for each risk level

C. Only portfolios containing the risk-free asset

D. Portfolios with the lowest expected return

Correct Answer: B. Portfolios with the highest attainable return for each risk level

Question 4

The Sharpe ratio is calculated as:

A. Total return divided by variance

B. Expected return divided by covariance

C. Excess expected return divided by volatility

D. Volatility divided by expected return

Correct Answer: C. Excess expected return divided by volatility

Question 5

Which feature most directly makes a mean–variance model a quadratic program?

A. A linear investment constraint

B. A quadratic variance objective

C. A long-only constraint

D. A fixed risk-free rate

Correct Answer: B. A quadratic variance objective

Question 6

If portfolio weights sum to one and all weights are nonnegative, the portfolio is:

A. Leveraged and short

B. Fully invested and long-only

C. Uninvested and market-neutral

D. Guaranteed to have zero risk

Correct Answer: B. Fully invested and long-only

Question 7

What is the main purpose of adding a turnover penalty to an objective function?

A. To increase trading regardless of cost

B. To reduce the effect of implementation and transaction costs

C. To guarantee a higher expected return

D. To eliminate covariance estimation

Correct Answer: B. To reduce the effect of implementation and transaction costs

Question 8

Which is a common symptom of estimation error in unconstrained optimization?

A. Identical weights under all assumptions

B. Extreme or unstable portfolio positions

C. Guaranteed out-of-sample superiority

D. Zero sensitivity to expected returns

Correct Answer: B. Extreme or unstable portfolio positions

Question 9

Risk contribution analysis is primarily used to determine:

A. How total portfolio risk is distributed among assets

B. The legal ownership of securities

C. The tax rate on dividends

D. The accounting book value of assets

Correct Answer: A. How total portfolio risk is distributed among assets

Question 10

Why are stress tests useful in portfolio optimization?

A. They prove that historical estimates are exact

B. They examine portfolio behaviour under adverse or alternative assumptions

C. They eliminate the need for investment constraints

D. They ensure that transaction costs are zero

Correct Answer: B. They examine portfolio behaviour under adverse or alternative assumptions

Quantitative Methods for Finance
Chapter 11 of 15