Mean-variance portfolio optimization is the foundation of modern portfolio theory, introduced by Harry Markowitz in 1952. The central idea is to construct an optimal portfolio that either maximizes expected return for a given level of risk or minimizes risk for a given expected return, using variance as the measure of risk.
This framework relies on several key assumptions:
- Investors are rational and risk-averse, preferring higher returns for the same level of risk.
- Investment decisions are made over a single-period horizon.
- There are no transaction costs or taxes.
- Only the mean and variance of asset returns are considered relevant for portfolio selection.
(These assumptions will be discussed in detail in the first section below.)
When I first encountered modern portfolio theory in a traditional finance program, it was taught in a rather abstract way. We began by plotting two risky assets in the mean-variance space, constructing a frontier hyperbola, and introducing the concepts of the efficient frontier and the market portfolio. While this provided a strong conceptual foundation—particularly intuitive for finance students—it lacked mathematical rigor.
I later revisited this topic in Professor Yangru Wu’s Financial Modeling course, which significantly deepened my understanding. His approach framed mean-variance analysis from a mathematical perspective, filling in the theoretical gaps and offering a more comprehensive rationale for its application. This section draws upon Professor Wu’s course materials and my own reflections. All accompanying plots are derived from his lectures. I am sincerely grateful to Professor Wu for his insights.
Topics Covered in This Section
- From Optimized Utility to Mean-Variance Analysis
- Solution to the Mean-Variance Optimization Problem
- Efficient Frontier without a Risk-Free Asset
- Frontier with a Risk-Free Asset
- Market Portfolio and the Security Market Line
For the calculation appearing in the above sections, I create a simple Python package called bagel-mean-variance. It is designed to calculate optimal portfolio weights using we learned in this section. The package is implemented using pure matrix operations, avoiding the use of optimization libraries. It is simple, efficient, and flexible, making it ideal for financial analysis and portfolio management tasks.
This section provides a rigorous and structured understanding of mean-variance portfolio optimization and its foundational role in finance. It also lays the groundwork for deeper discussions of the Capital Asset Pricing Model (CAPM) and Arbitrage Pricing Theory (APT)—both essential to modern financial theory.
Note: This is a math-focused series, aligned with the quant orientation of this blog. We will explore the detailed mathematical derivations and insights behind mean-variance optimization.
For additional topics on optimization techniques in finance, visit: