Card players, AI Generate by the Author

A Gentle Introduction to Modern Portfolio Theory (MPT)

A Mathematical take on: “Don’t Put All Your Eggs in One Basket”

Tarek Amr
7 min readMay 14, 2024


You probably heard your grandma saying:

Don’t put all your eggs in one basket.

It sounded like a good advice, but let’s be honest, will you base your investment strategy on a saying?

Why split your bets on Apples and Oranges, if clearly the price of the Apples stock is skyrocketing?

The key is to think in terms of both risks and returns. It’s easy to focus solely on returns. Returns is the obvious one we all know here.

I look at a stock’s price, notice it’s up by 10% from last year, and think, “Cool, I made 10%!” But then, what about the risk? What’s that all about?

The missing piece here is how certain are you that this stock will continue to go up by another 10% next year? What about the next five years?

This level of certainty, or rather the lack thereof, is what we call risk.

In this post, I’ll break down the Modern Portfolio Theory and detail a simple formula for analyzing risk and returns, to show you — in mathematical terms — why…



Tarek Amr

I write about what machines can learn from data, what humans can learn from machines, and what businesses can learn from all three.