Four-Stock Portfolio Efficient Frontier

Put in your mean / risk / correlation → generate random portfolios (dots + table) and the efficient frontier (line).
Stock Data Fetcher
Use this tool to fetch stock data (ticker + date range) and calculate monthly returns.
If clicking the button doesn’t open, copy/paste this URL into Chrome:
https://script.google.com/macros/s/AKfycbxao_yHFToaMAs2fuEiYMfHapioFAjIukvBAFyJIOS6ccYL2WAepMMyrO8afpRjsVBA/exec









Dots: 0
Frontier points: 0
Min Risk σ (%):
Max Return (%):
Blue dots = random portfolios. Red line = efficient frontier (best return for each risk level).

Portfolio Returns and Risks (All Random Portfolios)

Stock 1 Weight (%) Stock 2 Weight (%) Stock 3 Weight (%) Stock 4 Weight (%) Expected Return (%) Risk (Standard Deviation %)

Understanding the Efficient Frontier

The Efficient Frontier represents the best possible portfolios—those that provide the highest return for the least amount of risk.

How Portfolio Return Works

A portfolio’s return is based on the returns of the stocks it contains, weighted by how much is invested in each.

Why Correlation Matters

Correlation measures how stocks move in relation to each other. It plays a key role in risk reduction:

How Portfolio Risk is Determined

Lower correlation leads to better diversification and lower overall risk.