Lessons/Risk, Return, and Diversification
Investing Fundamentals · Lesson 5 of 6

Risk, Return, and Diversification

The math of building a portfolio that survives · 16 min

The Risk-Return Tradeoff

One of finance's most fundamental principles: in efficient markets, higher expected returns come with higher risk. There's no free lunch. Treasury bills (U.S. government 3-month debt) return ~5% with near-zero risk. The S&P 500 has returned ~10% historically, but with years like 2008 (−37%) and 2022 (−18%). Startup equity might return 50%+ — or 0%.

Risk in finance is typically measured by volatility — the standard deviation of returns. A stock with annual return volatility of 25% will typically see its price fluctuate within a range of ±25% around its expected return in two-thirds of years (one standard deviation interval).

Measuring Volatility

For a stock with daily returns r₁, r₂, …, rₙ:

Mean return: μ = (1/n) Σ rᵢ
Variance: σ² = (1/(n−1)) Σ (rᵢ − μ)²
Daily volatility: σ_daily = √(variance)
Annualized volatility: σ_annual = σ_daily × √252

The √252 annualization uses 252 as the number of trading days per year. This is a standard convention across all of finance.

The Magic of Diversification

Here's one of finance's few true free lunches: diversification reduces risk without sacrificing expected return. When you hold multiple assets, their random fluctuations partially cancel out — as long as they don't move in perfect lockstep.

The correlation ρ between two assets ranges from −1 (perfectly opposite) to +1 (perfectly same). For a two-asset portfolio:

σ²_portfolio = w₁²σ₁² + w₂²σ₂² + 2·w₁·w₂·σ₁·σ₂·ρ

When ρ < 1, the portfolio volatility is less than the weighted average of individual volatilities. When ρ = −1, you can theoretically build a zero-variance portfolio — a perfect hedge. In practice, correlations between stocks are positive (0.3–0.7) but not perfect, so diversification always helps.

Nobel Prize winner Harry Markowitz formalized this in 1952 as Modern Portfolio Theory. The key insight: risk that can be diversified away (idiosyncratic risk) doesn't require additional expected return — only undiversifiable risk (market risk, or systematic risk) is compensated.

The Sharpe Ratio: Risk-Adjusted Return

Comparing raw returns is misleading. A fund returning 20%/year taking extreme risk is not necessarily better than one returning 12%/year with steady performance. The Sharpe ratio adjusts for risk:

Sharpe = (Return_portfolio − Return_risk_free) / σ_portfolio

A Sharpe ratio of 1.0 means you're earning 1 unit of excess return per unit of risk — considered good. Above 2.0 is excellent and rare. Below 0.5 is poor. Buffett's Berkshire Hathaway has maintained a Sharpe ratio of ~0.7 over decades — seemingly modest, but extraordinary at that scale and consistency.

Systematic vs. Idiosyncratic Risk

Total stock risk decomposes into two components:

  • Systematic (market) risk: Driven by economy-wide factors — recessions, interest rate changes, pandemics. All stocks are affected. Cannot be diversified away. Measured by beta (covered in the Quant track).
  • Idiosyncratic (specific) risk: Company-specific events — a product failure, CEO scandal, accounting fraud. Holding 20–30 uncorrelated stocks reduces idiosyncratic risk by ~90%. This is the free lunch.

Academic research (Fama-French) found that a portfolio of 20–50 randomly chosen stocks captures most of the diversification benefit. Beyond 50 stocks, marginal diversification is minimal.

Knowledge Check
Q1 of 3
To annualize daily return volatility, you multiply the daily standard deviation by:
Q2 of 3
The Sharpe ratio measures:
Q3 of 3
Which type of risk can be largely eliminated through diversification?
Coding ExercisePython · runs in browser
+100 XP
Implement `annualized_volatility`, `portfolio_volatility` (two assets), and `sharpe_ratio`.
Write your solution, then run