lattice
// risk·14 min

Building Efficient Portfolios

The Problem: How to Combine Assets

You have multiple assets with different returns and risks. How do you combine them to maximize returns while minimizing risk?

The Tradeoff:

  • More diversification = lower risk (uncorrelated assets work together)
  • But you can't own everything equally — different assets have different risk/return profiles
  • You need optimization to find the best weights

This is Markowitz portfolio theory.

// key insight

Diversification works best when assets have low correlation (move differently). Combining tech and defensive stocks reduces portfolio volatility below the average of individual volatilities — the magic of correlation.

Load three stocks and compute returns
Compare equal-weight vs optimized portfolio
// key takeaways
  • Markowitz portfolio theory: optimize weights to maximize [[sharpe-ratio]] (return per unit risk)

  • Diversification power: combining low-correlation assets reduces portfolio vol

  • Optimization formula: weights ∝ Σ⁻¹ · μ (inverse covariance times mean returns)

  • Observation: optimized portfolio often overweights low-vol defensive stocks, underweights correlated volatile ones

  • Practical takeaway: Always ask — are my assets correlated? If yes, diversification gains are small