Simulator

In-browser Monte Carlo

Every slider move triggers a fresh Monte Carlo run. The symbols used below live on the Model page. The desk splits into zero-capital operating books (fee, b2b, retained, switching) plus an active treasury at \((k, C_{\mathrm{basis}})\), and the desk P&L on each sample path is the sample-by-sample sum of operating and treasury. The price process is compensated Merton, and setting \(\lambda_J = 0\) recovers pure GBM.

Price process

Jumps (Merton)

Demand & inventory

Contract

Syndication

Switching

Monte Carlo

Derived values

The cards below show the derived quantities that the Monte Carlo consumes. They are computed from the sidebar inputs and include \(S_0 = \pi_0 / P\), the horizon \(T\) in years, the total tonnes retired \(N = \lambda T\), the coverage fraction \(\alpha = \min(1, k / (N P))\), the inventory-exhaustion time \(\tau_{\mathrm{cov}} = \min(T, k / (P \lambda))\) (shown as “inventory runs out at” in days), and the break-even quote \(Q^* = (1 + f) P S_0 (e^{\mu T} - 1) / (\mu T)\).

The implied basis per token is \(C_{\mathrm{basis}} / k\). When it sits above \(S_0\) the inventory carries an unrealised loss; when it sits below \(S_0\) it carries an unrealised gain. Either way the shape of the custom book’s P&L is unchanged and only its location moves.

A single run

The summary cards, the table, the histograms, and the sample paths below refresh on every slider change; a 5,000–10,000-path run finishes in under a second. Under the Merton compensation the mean rule on each histogram holds its position while SD, VaR, and CVaR widen with the jump sliders. The “premium \(\pi_{\mathrm{syn}}\) received” card reports the up-front syndication premium priced off the b2b book’s moments. At \(\theta = 0\) the premium is actuarially fair and equals \(\beta \, \mathbb{E}[\Pi_{\mathrm{b2b}}]\).

The cards below show the top-line numbers of the current run.

Enabling switching activates the threshold \(H = h S_0\). The cards below then report the first-passage probability, the mean time in fee mode, and the mean number of crossings per path.

The table below has one row per operating book plus the treasury at \((k, C_{\mathrm{basis}})\) and the derived custom desk \(= b2b + \text{treasury}\). Each row’s \(\Pi\) is that book’s terminal P&L in USD over \([0, T]\).

column meaning
\(\mathbb{E}[\Pi]\) sample mean
SD sample SD
\(\pm \mathrm{CI}_{95}\) \(1.96 \cdot \mathrm{SD} / \sqrt{n}\)
\(\mathrm{VaR}_{95} / \mathrm{VaR}_{99}\) 5% / 1% loss thresholds
\(\mathrm{CVaR}_{95} / \mathrm{CVaR}_{99}\) tail means
\(\mathbb{P}[\Pi < 0]\) loss probability
Sharpe \(\mathbb{E}[\Pi] / \mathrm{SD}[\Pi]\) (horizon-absolute)

P&L is the USD total over \([0, T]\). Divide by \(N = \lambda T\) for a per-tonne figure. As the sliders move, the treasury row opens at MTM \(k \cdot S_0 - C_{\mathrm{basis}}\) and drifts as inventory burns down, so sweeping \(C_{\mathrm{basis}}\) translates its location without changing its shape. The custom-desk row collapses to the matched limit at \(k = N P\) and \(C_{\mathrm{basis}} = N P S_0\), where \(I_T\) cancels between b2b and treasury consumption and the desk total becomes the deterministic \(N (Q - P S_0)\). At \(k = 0\) the treasury is zero sample by sample and the custom desk collapses onto b2b.

P&L distributions

The panels below show the empirical terminal-P&L density for each book, one panel per book. The x-axis is terminal P&L in USD and the y-axis is empirical density. The black rule in each panel is the Monte Carlo mean, and the dashed grey rule sits at \(\Pi = 0\). The fee panel is non-negative and the b2b panel is its mirror. The custom-desk panel collapses to a spike at the matched limit.

Black: MC mean. Dashed grey: \(\Pi = 0\).

Price paths

The chart below shows twenty sampled kVCM trajectories as a function of time, with the first one highlighted in orange and the others in grey. The green dashed rule marks the inventory-exhaustion time \(\alpha T\). If switching is on, a second dashed rule marks the fee-mode threshold \(H = h S_0\). The randomness of the custom desk lives on \([\alpha T, T]\), the region to the right of the green dashed rule.