Apply multivariable calculus to analyze how a two-asset portfolio responds to market movements. Compute partial derivatives, gradients, directional derivatives, and the Hessian to understand risk exposure and build Taylor approximations.
multivariable-calculus · portfolio-theory · risk-analysis · gradients · hessian · taylor-expansion · python
Learners placed at Morgan Stanley NYC · Optiver AMS
A full map of portfolio risk, 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.
Section 0
The Mathematical Object
Section 1
Seeing the Surface
surface.py
Section 2
Local Behavior at a Point
sensitivities.py
Section 3
Combined Market Moves
directions.py
Section 4
Curvature and the Hessian
curvature.py
Section 5
Approximating the Surface
taylor.py
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.
Section 0The Mathematical Object
1 task · 1 question
Section 1Seeing the Surface
2 tasks · 3 questions
Section 2Local Behavior at a Point
1 task · 4 questions
Section 3Combined Market Moves
2 tasks · 3 questions
Section 4Curvature and the Hessian
2 tasks · 4 questions
Section 5Approximating the Surface
3 tasks · 1 question
FinishProject Complete
Your rewards
Real code from inside the project. Press Run to watch correlation reshape a portfolio’s entire risk surface. Open this page on desktop to run it live in your browser.
import numpy as np
vol_a, vol_b = 0.20, 0.30 # two assets, nothing else
w = np.linspace(0, 1, 101) # weight in asset A
def portfolio_vol(rho):
return np.sqrt((w * vol_a) ** 2 + ((1 - w) * vol_b) ** 2
+ 2 * w * (1 - w) * rho * vol_a * vol_b)
for rho in (0.9, 0.3, -0.5):
pv = portfolio_vol(rho)
i = pv.argmin()
print(f"corr {rho:+.1f}: min vol {pv[i]:.1%} at {w[i]:.0%} in A (50/50 gives {pv[50]:.1%})")
print()
print("same two assets - correlation alone reshapes the whole risk surface")The full build maps the whole surface and finds its safest points.
Resume bullets
Copy-paste ready - with the build behind you to back every line.
3 more resume bullets inside the project
Interview ammo
“Partial derivatives measure sensitivity of portfolio value to one asset while holding others constant—this is Delta in options terminology”
You answer this with a system you built, not a definition you memorized.
4 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.
~8h build · +250 XP · 4 resume bullets · 5 interview answers