Build a complete portfolio optimization tool using CVXPY. Construct efficient frontiers, handle real-world constraints, implement robustness techniques, and produce a defensible allocation decision.
optimization · cvxpy · portfolio · efficient-frontier · quant
Learners placed at Morgan Stanley NYC · Optiver AMS
A real portfolio optimizer, built section by section - hands-on, but never alone. Theory first, then you implement it, and checkpoints confirm each section clicked before the next one opens.
Never stuck
Reveal a hint when you want a nudge - or the full worked solution when you want the answer. Every exercise ships one.
Theory before code
Each formula is explained step by step before you implement it. Nothing is assumed mid-build.
Yours to keep
Finish with the complete research notebook - keep extending it with your own data.
Real code from inside the project. Press Run to search 5,151 portfolios for the best Sharpe - by brute force. Open this page on desktop to run it live in your browser.
import numpy as np
mu = np.array([0.06, 0.10, 0.13]) # bonds, equities, alternatives
vol = np.array([0.10, 0.16, 0.22])
corr = np.array([[1.0, 0.3, 0.2], [0.3, 1.0, 0.5], [0.2, 0.5, 1.0]])
cov = np.outer(vol, vol) * corr
# Brute-force the long-only simplex: every 1% mix, 5,151 portfolios.
grid = [(a, b, 100 - a - b) for a in range(101) for b in range(101 - a)]
W = np.array(grid) / 100
sharpes = (W @ mu) / np.sqrt(np.einsum('ij,jk,ik->i', W, cov, W))
best = W[sharpes.argmax()]
eq = np.ones(3) / 3
eq_sharpe = (eq @ mu) / np.sqrt(eq @ cov @ eq)
print(f"equal weight Sharpe : {eq_sharpe:.3f}")
print(f"optimised Sharpe : {sharpes.max():.3f}")
print(f"best mix : {best[0]:.0%} bonds / {best[1]:.0%} equities / {best[2]:.0%} alts")The full build replaces brute force with convex optimization and real-world constraints.
Resume bullets
Copy-paste ready - with the build behind you to back every line.
3 more resume bullets inside the project
Interview ammo
“Explain why the covariance matrix is the key input and how estimation error affects results”
You answer this with a system you built, not a definition you memorized.
5 more talking points inside the project
Full access to this build and the rest of the pipeline - every project in the vault, plus the lessons, exams and certificates behind them. Guided from the first line to the last.
~12h build · +400 XP · 4 resume bullets · 6 interview answers