Market lab
A sandbox for the risk engine behind the college funding model: Value at Risk four ways, Black-Scholes with its Greeks, and technical indicators.
Everything on this page is simulated. The portfolio is invented and the prices come from a seeded random process, not from any market. It exists to test and demonstrate the calculations, and nothing here is investment advice.
Simulated market value
$218,055
$445.30 this session
7 holdings across 4 asset classes.
Total P&L
$47,599
+26.94%
Unrealized plus realized, against a weighted-average cost basis.
Unrealized
$41,353
Mark-to-market on open lots only.
Realized
$6,246
Booked from closed lots; unaffected by the feed.
Markets
Two years of generated daily bars with moving averages, Bollinger bands and Wilder's RSI.
NVAX
Novara Systems3M change +13.84% · σann 37.3%
Risk
The same engine that the test suite pins against textbook values.
Risk analytics
Value at Risk by four methods, a full Black-Scholes Greek surface, and where the portfolio's variance actually lives.
$3,450
1.58% of the book over 1 day.
$4,012
Mean loss conditional on breaching VaR — the coherent measure.
8.53%
Deepest peak-to-trough decline, lasting 155 sessions.
11.26%
Daily σ 0.71% × √252.
Return distribution and the loss tail
503 daily observationsThe empirical quantile of realised returns. Assumes nothing about the shape of the distribution, but cannot exceed the worst loss already in the sample.
Method comparison
Skewness -0.12, excess kurtosis -0.02. The further these sit from zero, the more the parametric figure understates the tail — which is precisely the gap Cornish-Fisher closes.
Underwater curve
- Sharpe
- 0.76
- Sortino
- 1.09
- Calmar
- 1.46
The probability that the realised loss stays within VaR.
Scaled by √h, which assumes returns are serially independent.
Definition
TVaR is subadditive and therefore coherent; VaR is not. The Swiss Solvency Test uses the expected shortfall for this reason, while Solvency II calibrates capital to a 99.5% VaR.
Holdings
Simulated marks, tax-lot cost basis, and each position's share of portfolio variance.
Positions
Prices flash as the simulated feed ticks; the risk column is computed from the covariance matrix, not from position size.