jypi
  • Explore
ChatPricingWays to LearnAbout

jypi

  • About Us
  • Our Mission
  • Team
  • Careers

Resources

  • Pricing
  • Ways to Learn
  • Blog
  • Help Center
  • Community Guidelines
  • Contributor Guide

Legal

  • Terms of Service
  • Privacy Policy
  • Cookie Policy
  • Content Policy

Connect

  • Twitter
  • Discord
  • Instagram
  • Contact Us
jypi

© 2026 jypi. All rights reserved.

Investment Management
Chapters

1Foundations of Investment Management

2Securities Markets and Trading Mechanics

3Investment Vehicles and Pooled Products

4Data, Tools, and Modeling for Investments

5Risk, Return, and Probability

6Fixed Income: Bonds and Interest Rates

7Equity Securities: Valuation and Analysis

8Derivatives: Options, Futures, and Swaps

9Portfolio Theory and Diversification

Mean–variance optimizationEfficient frontier constructionDiversification and correlationTwo-fund separation theoremCapital allocation lineTangency portfolio and Sharpe ratioRisk budgeting and parityConstraints and transaction costsResampling and robustnessInternational diversification

10Asset Pricing Models: CAPM and Multifactor

11Portfolio Construction, Rebalancing, and Optimization

12Performance Measurement, Risk Management, and Ethics

13Options

Courses/Investment Management/Portfolio Theory and Diversification

Portfolio Theory and Diversification

837 views

Constructing efficient portfolios and understanding the mechanics of risk reduction.

Content

1 of 10

Mean–variance optimization

Mean–Variance Masterclass — Chaotic Clarity
189 views
intermediate
humorous
finance
investment management
gpt-5-mini
189 views

Versions:

Mean–Variance Masterclass — Chaotic Clarity

Watch & Learn

AI-discovered learning video

YouTube

Start learning for free

Sign up to save progress, unlock study materials, and track your learning.

  • Bookmark content and pick up later
  • AI-generated study materials
  • Flashcards, timelines, and more
  • Progress tracking and certificates

Free to join · No credit card required

Mean–variance optimization — the math that makes your portfolio stop sweating

You learned how derivatives chop and reassemble exposures. Now we're designing the chassis those exposures ride on.

If derivatives (options, futures, swaps) are the surgical tools — precise, powerful, sometimes terrifying — mean–variance optimization (MVO) is the operating table. It tells you how to assemble weights across risky assets to get the best tradeoff between expected return and variance (risk), and how derivatives can be used to reach those optimal exposures when weights alone won’t do.


What is mean–variance optimization?

Mean–variance optimization is Markowitz’s framework that chooses portfolio weights to either:

  1. Minimize portfolio variance for a given expected return, or
  2. Maximize expected return for a given level of variance.

Key inputs:

  • Expected return vector μ (one expected return per asset)
  • Covariance matrix Σ (how asset returns co-move)
  • Optional: Risk-free rate r_f (when you include a risk-free asset)

The canonical optimization (no risk-free asset) is:

Minimize w' Σ w

Subject to:

  • w' 1 = 1 (weights sum to 1)
  • w' μ = μ_p (target portfolio return)

This is a quadratic program and gives the efficient frontier: the set of portfolios that are not dominated — you cannot get higher return without more variance.


How does it actually work (intuitively and a tiny bit algebraically)?

Think of each asset as a vector in return-space. Covariances tell you how these vectors align. MVO finds the weighted combination that sits on the optimal boundary between risk and return.

With a risk-free asset, the math becomes deliciously crisp: the tangency (or market) portfolio maximizes the Sharpe ratio and is given (up to scaling) by

w_t ∝ Σ^{-1}(μ - r_f 1)

Normalized so weights sum to one:

w_t = Σ^{-1}(μ - r_f 1) / [1' Σ^{-1}(μ - r_f 1)]

That vector is the direction of the Capital Market Line (CML): you combine that tangency portfolio with the risk-free asset to get any point on the efficient frontier when borrowing/lending at r_f is allowed.

Without a risk-free asset, the efficient frontier is a parabola in the mean–variance plane, and the solution for weights of a given μ_p can be written as a combination of two basis portfolios built from Σ^{-1}1 and Σ^{-1}μ.


Examples & intuition (yes, with pictures in your brain)

  • Two assets: variance is not just a weighted average of variances — covariance matters. If two assets are imperfectly correlated, mixing them can reduce portfolio variance. That’s diversification.

  • With many assets: think of Σ^{-1} as the "honesty filter" — it downweights assets that add variance relative to expected return. If an asset has high return but also high covariance with others, MVO might still like it — but only if the incremental return justifies the added co-movement.

  • Using derivatives: suppose the tangency portfolio requires exposures that are hard to get via direct holdings (or shorting is restricted). You can use futures to scale exposure or options to tilt payoff skewness while preserving mean–variance characteristics (up to limitations). For example, equity futures let you change market exposure cheaply instead of reweighting all holdings.


Why this matters to someone who just studied derivatives

You learned derivatives let you change exposures (hedging, speculation, completion). MVO tells you which exposures you ideally want. Then derivatives become the tools to implement those exposures when direct trading is costly, constrained, or incomplete.

  • Constraints (no shorting, transaction costs) can make the MVO solution infeasible — derivatives let you replicate or approximate the theoretical weights.
  • Options add higher-moment effects (skew, kurtosis) MVO ignores — so you might use options to achieve a preference not captured by variance alone.

Common mistakes and practical fixes

  1. Plug-in error (estimation risk): Small errors in μ or Σ produce wildly different weights. Returns are fickle.

    • Fixes: shrinkage estimators for Σ, Bayesian priors for μ, resampling, or robust optimization.
  2. Overfitting the past: Using historical means without economic sense = garbage in, garbage out.

    • Fixes: blend forecasts with macro views, or rely more on covariance structure than on unstable means.
  3. Ignoring constraints: No-short constraints or turnover limits change the frontier — often to corner solutions.

    • Fixes: use QP solvers with practical constraints; consider futures to adjust exposures when direct reweighting is infeasible.
  4. Treating variance as the whole story: Investors care about downside risk, skew. Options can be used to manage those.

    • Fixes: incorporate downside measures (CVaR), or extend models beyond mean–variance.

Pseudocode: the optimization you’ll actually run

# Solve: minimize 0.5 * w' Σ w - λ * w' μ
# subject to: sum(w) = 1, and possibly w >= 0 (no shorting)
# This is a standard quadratic program.

Inputs: Σ, μ, λ (risk aversion parameter)
Solve QP for w
Output: weights w

Or, for tangency portfolio with risk-free asset, compute Σ^{-1}(μ - r_f 1) and normalize.


Quick table: efficient frontier with vs without risk-free asset

Feature No risk-free asset With risk-free asset
Frontier shape Parabola Straight line (CML) from r_f tangent to frontier
Key portfolio Many efficient portfolios Single tangency portfolio + combinations with r_f
Implementation Pure risky weights Scale tangency using borrowing/lending

Closing — key takeaways (snappy)

  • Mean–variance optimization gives you the theoretical best tradeoff between expected return and variance given your inputs. It's elegant, algebraic, and brutally sensitive to bad data.
  • The tangency portfolio (Σ^{-1}(μ - r_f 1)) is your best direction if you can borrow/lend at r_f — everything else is just scaling that vector.
  • Derivatives are your practical friends: use futures to scale exposures, swaps to shift cashflows, and options to buy protection or skew not captured by variance.

Mean–variance optimization tells you the map. Derivatives help you walk the terrain when the roads are closed.

Go implement this with humility: treat your inputs like wet paint — they smear easily. Use shrinkage, robust methods, and practical constraints. And remember: diversification works, but only if you don’t accidentally herd into hidden correlations.

Version: quick review done. Now go run a QP and don’t overfit the universe.

0 comments
Flashcards
Mind Map
Speed Challenge

Comments (0)

Please sign in to leave a comment.

No comments yet. Be the first to comment!

Ready to practice?

Sign up now to study with flashcards, practice questions, and more — and track your progress on this topic.

Study with flashcards, timelines, and more
Earn certificates for completed courses
Bookmark content for later reference
Track your progress across all topics