Eight-Stock Portfolio Efficient Frontier

Enter mean/std dev + correlations → generate random portfolios (dots + table) and the efficient frontier (line).
Stock Data Fetcher (8 stocks)
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

Enter Stock Data





Diagonal is always 1. You only edit the 28 unique correlations for 8 stocks (ρ12 … ρ78).
Range: -1 to +1
ρ12
ρ13
ρ14
ρ15
ρ16
ρ17
ρ18
ρ23
ρ24
ρ25
ρ26
ρ27
ρ28
ρ34
ρ35
ρ36
ρ37
ρ38
ρ45
ρ46
ρ47
ρ48
ρ56
ρ57
ρ58
ρ67
ρ68
ρ78
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

Stock 1 (%) Stock 2 (%) Stock 3 (%) Stock 4 (%) Stock 5 (%) Stock 6 (%) Stock 7 (%) Stock 8 (%) Expected Return (%) Risk (Std Dev %)

How to Read This Graph (Risk vs. Return)

Each dot is one random portfolio (a set of weights across the 8 stocks). The x-axis is risk (standard deviation). The y-axis is expected return.

What “Efficient Frontier” Means

The efficient frontier is the “top edge” of all those dots. For a given level of risk, portfolios on the frontier have the highest return. Equivalently: for a given return, frontier portfolios have the lowest risk.

Dominated vs. Efficient (the key idea)

Where Correlation Shows Up (Diversification)

Correlation controls how much risk you can “mix away”: