Skip to main content
Trading15 min read

Portfolio Risk Math Explained: VaR, CVaR, and Why Covariance Estimation Matters

The math behind RiskRadar — Value at Risk, Conditional VaR, Ledoit-Wolf shrinkage, and Monte Carlo simulation explained for engineers who aren't quants.

Part ofFintech & Trading Systems->
By Jason TeixeiraMarch 22, 2026
PythonRisk ManagementTradingMathematicsPortfolioscipy
Share:
On this page

When I built RiskRadar, I needed to implement institutional-grade risk calculations. Most risk management tutorials either oversimplify ("just calculate standard deviation") or assume PhD-level math.

Here's the middle ground — the math you actually need to implement portfolio risk, explained for engineers.

Value at Risk (VaR): What's the Worst That Could Happen?

VaR answers: "What's the maximum I could lose in a day, with 95% confidence?"

If your portfolio's 1-day 95% VaR is $10,000, that means: on 95% of days, your losses won't exceed $10,000. On the other 5% of days... they might.

Three ways to calculate VaR:

Historical VaR (simplest)

Sort your historical daily returns. The 5th percentile is your 95% VaR.

\

Reader route

article -> proof -> offer

ReadClusterProofScope

cluster

Fintech & Trading Systems

intent

Trading

route

next step

What to do with this

Turn the note into a build path.

If this topic maps to a real business problem, keep reading the cluster, study the academy path, or route the work into a scoped engagement.

Jason Teixeira
Written by
Jason Teixeira
Founder, Sage Ideas Studio · Principal Engineer
livebuild 81e8c8e2026-07-28 06:02Z
// solo studio// no analytics resold// every commit human-reviewed