Skip to the main content

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 Systems
$185.19▼ $1.04 (-0.56%)

3M change +13.84% · σann 37.3%

RSI (14)65.6 neutral
63 bars

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.

503 sessions modelled
VaR 99%VaRα\mathrm{VaR}_\alpha

$3,450

1.58% of the book over 1 day.

Tail VaR 99%TVaRα\mathrm{TVaR}_\alpha

$4,012

Mean loss conditional on breaching VaR — the coherent measure.

Max drawdown

8.53%

Deepest peak-to-trough decline, lasting 155 sessions.

Annualised volatilityσann\sigma_{\mathrm{ann}}

11.26%

Daily σ 0.71% × √252.

Return distribution and the loss tail

503 daily observations

The 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

Value at Risk and Tail VaR by estimation method
MethodVaRTVaRAmount
1.58%1.84%$3,450
1.60%1.84%$3,491
1.66%1.91%$3,615
1.58%1.82%$3,456

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
99.0%

The probability that the realised loss stays within VaR.

1

Scaled by √h, which assumes returns are serially independent.

Definition

VaRα=−inf⁡{ x:P(R≤x)>1−α }\mathrm{VaR}_\alpha = -\inf\{\,x : P(R \le x) > 1-\alpha\,\}TVaRα=−E ⁣[R∣R≤−VaRα]\mathrm{TVaR}_\alpha = -\mathbb{E}\!\left[R \mid R \le -\mathrm{VaR}_\alpha\right]

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.

Portfolio holdings with live prices, profit and loss, and risk contribution
Last
GBLXGlobal Index ETF
$585.07-0.89%$49,731
TBNDTreasury Bond Fund
$100.52-0.40%$40,208
NVAXNovara Systems
$185.19-0.56%$37,038
CRSACorsair Assurance
$68.29-1.45%$30,730
HELMHelmsley Industrial
$105.95+0.33%$27,547
ORCNOrion Coin
$7,179+7.73%$25,127
VERDVerdant Health
$170.50-2.32%$7,672
Total$218,055