PathPricerPathPricer
AAPL
SPY
MSFT
RELIANCE
GOOGL
EURUSD
BTC

Quantitative Methodology & Mathematical Specification

All mathematical models, Monte Carlo estimators, Greeks derivations, stochastic-volatility pricing, and defensible design decisions.

1. The Model: Geometric Brownian Motion (GBM)

The underlying stock price StS_t evolves under the risk-neutral measure according to:

dSt=(rq)Stdt+σStdWt\text{d}S_t = (r - q)S_t\,\text{d}t + \sigma S_t\,\text{d}W_t
S_tStock price at t
rRisk-free rate
qDividend yield
σVolatility (annualised)
W_tStandard Brownian motion

Exact Closed-Form Solution

Applying Itô’s Lemma to lnSt\ln S_t gives the exact terminal price:

ST=S0exp[(rq12σ2)T+σTZ],ZN(0,1)S_T = S_0 \exp\left[\left(r - q - \tfrac{1}{2}\sigma^2\right)T + \sigma\sqrt{T}\,Z\right], \quad Z \sim N(0,1)
Why exact GBM sampling?
The SDE has a known closed-form solution for constant parameters, so Euler-Maruyama discretisation would introduce unnecessary bias. Path-wise simulation for charts uses the same exact formula stepwise.

2. Black-Scholes-Merton Analytical Benchmark & Greeks

Closed-form formulas with continuous dividend yield qq (Merton 1973):

d1=ln(S0/K)+(rq+12σ2)TσT,d2=d1σTd_1 = \frac{\ln(S_0/K) + (r - q + \tfrac{1}{2}\sigma^2)T}{\sigma\sqrt{T}}, \quad d_2 = d_1 - \sigma\sqrt{T}
C=S0eqTN(d1)KerTN(d2)C = S_0 e^{-qT}N(d_1) - K e^{-rT}N(d_2)
P=KerTN(d2)S0eqTN(d1)P = K e^{-rT}N(-d_2) - S_0 e^{-qT}N(-d_1)

Under the risk-neutral measure, the option price is the discounted expected payoff: V0=erTEQ[payoff(ST)]V_0 = e^{-rT}\mathbb{E}^{\mathbb{Q}}[\text{payoff}(S_T)]. Monte Carlo estimates this same expectation numerically.

Analytical Greeks

GreekCallPutMeaning
Delta (Δ)eqTN(d1)e^{-qT}N(d_1)eqTN(d1)-e^{-qT}N(-d_1)Spot sensitivity
Gamma (Γ)eqTϕ(d1)S0σT\frac{e^{-qT}\phi(d_1)}{S_0\sigma\sqrt{T}}Identical to CallConvexity
Vega (ν)S0eqTϕ(d1)TS_0 e^{-qT}\phi(d_1)\sqrt{T}Identical to CallVol sensitivity
Theta (Θ)Annualised/365\text{Annualised} / 365Identical to CallTime decay / day
Rho (ρ)KTerTN(d2)K T e^{-rT} N(d_2)KTerTN(d2)-K T e^{-rT} N(-d_2)Rate sensitivity

3. Why Monte Carlo for a Problem Black-Scholes Already Solves?

Honest Assessment

For European vanillas under GBM, Monte Carlo is strictly worse than Black-Scholes: slower, noisier, estimates what BS computes exactly.

Why Institutions Use MC

MC generalises where no closed form exists: path-dependent payoffs, baskets, American exercise (LSM), stochastic volatility. BS is the exception, not the rule.

What PathPricer Demonstrates

Numerical machinery validated against known truth before applying it where truth is unknown. This is the intellectual foundation of the project.

4. Monte Carlo Estimator & O(N^{-1/2}) Convergence

V^=erT1Ni=1Nh(ST(i)),h(ST)=max(STK,0)\hat{V} = e^{-rT}\cdot\frac{1}{N}\sum_{i=1}^{N} h(S_T^{(i)}), \quad h(S_T) = \max(S_T - K,\,0)
Standard Error
SE^=s/N\widehat{SE} = s/\sqrt{N}
Sample std dev of i.i.d. discounted payoffs
95% Confidence Interval
V^±1.96SE^\hat{V} \pm 1.96\cdot\widehat{SE}
Normal approx justified by CLT for N ≥ 10⁴
Why Normal CI?
Discounted payoffs are i.i.d. with finite variance, so the CLT applies. Bootstrap targets the same asymptotics at higher cost for no benefit here.

Convergence rate: O(N1/2)\mathcal{O}(N^{-1/2}) — halving error requires 4× paths. Empirically validated by regressing logSE^\log\widehat{SE} on logN\log N across a geometric grid and confirming slope ≈ −0.5.

5. Variance Reduction Techniques

5.1 Antithetic Variates

For each draw ZiZ_i, also evaluate payoff at Zi-Z_i. Monotonic payoffs guarantee negatively correlated pairs.

V^AV=erT1Ni=1Nh(ST(i,+))+h(ST(i,))2\hat{V}_{AV} = e^{-rT}\cdot\frac{1}{N}\sum_{i=1}^{N}\frac{h(S_T^{(i,+)}) + h(S_T^{(i,-)})}{2}

5.2 Control Variates (S_T)

Uses STS_T as control with known expectation EQ[ST]=S0e(rq)T\mathbb{E}^{\mathbb{Q}}[S_T] = S_0 e^{(r-q)T} (Boyle 1977).

V^CV=erT1Ni=1N[h(ST(i))β(ST(i)EQ[ST])]\hat{V}_{CV} = e^{-rT}\cdot\frac{1}{N}\sum_{i=1}^{N}\left[h(S_T^{(i)}) - \beta^*\left(S_T^{(i)} - \mathbb{E}^{\mathbb{Q}}[S_T]\right)\right]
Why S_T and not BS price?
BS price is the benchmark being validated. Using it as a control would be circular. S_T has a known expectation independent of the option price.

5.3 Combined Antithetic + CV

Apply antithetic pairing first, then CV correction to paired averages. The techniques target different variance components and stack without redundancy.

MethodPathsStd ErrorRel. Efficiency
Standard MCNSE_{std}1.0(ref)1.0 (ref)
Antithetic2NSE_{AV}Varstd/VarAVVar_{std}/Var_{AV}
Control VariatesNSE_{CV}Varstd/VarCVVar_{std}/Var_{CV}
Antithetic + CV2NSE_{AV+CV}Varstd/VarAV+CVVar_{std}/Var_{AV+CV}
RQMC (Sobol)NSE_{RQMC}Varstd/VarRQMCVar_{std}/Var_{RQMC}

6. Randomized Quasi-Monte Carlo (Sobol)

Replaces pseudo-random N(0,1)N(0,1) draws with low-discrepancy sequences — deterministic point sets covering [0,1]d[0,1]^d more uniformly than random sampling — then randomises them via Owen scrambling for error estimation.

Zi=Φ1(ui),uiSobol sequenceZ_i = \Phi^{-1}(u_i), \quad u_i \in \text{Sobol sequence}
V^RQMC=1Mj=1MV^j,SE^RQMC=sM,M=20\hat{V}_{RQMC} = \frac{1}{M}\sum_{j=1}^{M} \hat{V}_j, \quad \widehat{SE}_{RQMC} = \frac{s}{\sqrt{M}}, \quad M=20

NN is enforced to a power of 2 — the natural regime for Sobol optimal equidistribution. For smooth integrands, RQMC converges at O(N1)\mathcal{O}(N^{-1}) vs standard MC’s O(N1/2)\mathcal{O}(N^{-1/2}): halving error requires only 2× paths, not 4×.

Honest Caveat: CI Interpretation
The CI uses a t-distribution on M=20M=20 replications. Variance between replications captures only scrambling noise, not full sampling error. The CI is a heuristic measure of uncertainty, not a strict 95% confidence statement.

7. Finite-Difference Greeks (Common Random Numbers)

Central differences on Monte Carlo prices, reusing the same seed across base and bumped scenarios:

ΔV^(S0+h)V^(S0h)2h,ΓV^(S0+h)2V^(S0)+V^(S0h)h2\Delta \approx \frac{\hat{V}(S_0+h) - \hat{V}(S_0-h)}{2h}, \quad \Gamma \approx \frac{\hat{V}(S_0+h) - 2\hat{V}(S_0) + \hat{V}(S_0-h)}{h^2}

Analogous central differences for Vega (σ\sigma bump), Theta (TT one-sided), and Rho (rr bump). Default bump: 0.5–1% of the parameter value.

Why Common Random Numbers?
Without CRN, finite-difference Greeks on Monte Carlo prices are dominated by simulation noise rather than true sensitivity. Same seed across the bump pair isolates the parameter change from sampling variance.

8. Implied Volatility Solver

Given a market price, find σ\sigma such that:

BSprice(S0,K,T,r,q,σ,type)=Pmarket\text{BS}_{\text{price}}(S_0, K, T, r, q, \sigma, \text{type}) = P_{\text{market}}

No closed-form inverse exists (BS is transcendental in σ\sigma), so numerical root-finding is required.

Newton-Raphson (Primary)
σn+1=σnBSprice(σn)PmarketVega(σn)\sigma_{n+1} = \sigma_n - \frac{\text{BS}_{\text{price}}(\sigma_n) - P_{\text{market}}}{\text{Vega}(\sigma_n)}
Brenner-Subrahmanyam Init
σ02π/TPmarket/S0\sigma_0 \approx \sqrt{2\pi/T} \cdot P_{\text{market}} / S_0

Fallback — Brent’s method:Activates when Vega → 0 (deep ITM/OTM, near-expiry). Brent’s method requires no derivative and is guaranteed to converge on a bracketed interval.

Why This Is the Most Common Desk Task
Market prices are quoted in price space; traders think in vol space. The bid-ask spread in implied vol is informative across strikes; price is not. All volatility surface construction begins here.

9. P&L Attribution (P&L Explain)

Decomposes a scenario price change into component contributions by Greek:

PnL=ΔΔS+12Γ(ΔS)2+VΔσ+ΘΔt+ρΔr+ε\text{PnL} = \Delta\cdot\Delta S + \tfrac{1}{2}\Gamma(\Delta S)^2 + \mathcal{V}\cdot\Delta\sigma + \Theta\cdot\Delta t + \rho\cdot\Delta r + \varepsilon
TermGreekDriverInterpretation
ΔΔSΔ·ΔSDeltaSpotDirectional exposure
12Γ(ΔS)2\tfrac12\Gamma(\Delta S)^2GammaSpot² (convexity)Profit from large moves; always +ve for long options
𝒱Δσ𝒱·ΔσVegaVolVolatility exposure
ΘΔtΘ·ΔtThetaTimeCost of optionality; −ve for long options
ρΔrρ·ΔrRhoRateInterest rate exposure
εεResidualCross-termsVanna, Volga, cross-Gamma, higher-order

The residual ε\varepsilon captures everything the second-order expansion misses: Vanna (Δ/σ\partial\Delta/\partial\sigma), Volga (V/σ\partial\mathcal{V}/\partial\sigma), cross-Gamma interactions, and higher-order Taylor terms. For small scenario moves, first-order terms (especially Delta) dominate.

Operational Significance
P&L attribution distinguishes “we made money because spot moved our way” from “we made money because vol dropped.” Essential for risk management and strategy evaluation.

10. 2D Risk Grid

A 25×2525 \times 25 surface (625 points) computed across dual parameter axes. Every cell is evaluated in a single broadcast operation — no nested Python loops:

priceij=BSprice(Si,K,T,r,q,σj,type),i,j=1,,25\text{price}_{ij} = \text{BS}_{\text{price}}(S_i, K, T, r, q, \sigma_j, \text{type}), \quad i,j = 1,\dots,25
Axis PairWhat It Reveals
Spot × VolGamma as curvature along spot axis; Volga along vol axis
Strike × ExpiryTerm structure of option value across strikes
Spot × TimeOption decay as expiry approaches at different moneyness

Vectorisation via NumPy broadcasting: SgridS_{\text{grid}} shape (25,1)(25,1), σgrid\sigma_{\text{grid}} shape (1,25)(1,25) → broadcast to (25,25)(25,25). The heatmap renders colour intensity proportional to price, with crosshairs at the base-case parameters.

11. Heston Stochastic Volatility Model

The Heston (1993) model lets variance follow its own mean-reverting square-root process, so the volatility smile/skew is modeled rather than assumed constant:

dSt=(rq)Stdt+vtStdWtS,dvt=κ(θvvt)dt+σvvtdWtvdS_t = (r - q)S_t\,dt + \sqrt{v_t}\,S_t\,dW_t^S, \qquad dv_t = \kappa(\theta_v - v_t)\,dt + \sigma_v\sqrt{v_t}\,dW_t^v
v_tInstantaneous variance
κMean-reversion speed
θ_vLong-run variance
σ_vVol-of-vol
ρSpot/vol correlation (skew)
√v₀Initial volatility (quoted)

Pricing by Fourier Inversion

The Heston density has no closed form, but the characteristic function of lnST\ln S_T does. Prices come from integrating two risk-neutral probabilities:

C=S0eqTP1KerTP2,Pj=12+1π0Re[eiϕlnKfj(ϕ)iϕ]dϕC = S_0 e^{-qT} P_1 - K e^{-rT} P_2, \qquad P_j = \tfrac{1}{2} + \frac{1}{\pi}\int_0^{\infty}\operatorname{Re}\left[\frac{e^{-i\phi\ln K} f_j(\phi)}{i\phi}\right]d\phi

Evaluated by Gauss-Legendre quadrature on a fixed node grid (the nodes are parameter-independent and cached). Puts follow from put-call parity, exact under Heston. Two numerical guards matter: the branch of djd_j is chosen so Re(dj)0\operatorname{Re}(d_j) \geq 0, and the term 1gjedjT1 - g_j e^{d_j T} is computed in log space to avoid catastrophic cancellation in the deep-OTM wings.

Greeks & the Volatility Chain Rule

Because the Heston price is deterministic (no Monte Carlo noise), central finite differences are clean. Volga and Vanna are reported w.r.t. the volatility σ0=v0\sigma_0 = \sqrt{v_0}, requiring a chain-rule correction:

volga=4v02Vv02+2Vv0,vanna=2v02VSv0\text{volga} = 4v_0\frac{\partial^2 V}{\partial v_0^2} + 2\frac{\partial V}{\partial v_0}, \qquad \text{vanna} = 2\sqrt{v_0}\,\frac{\partial^2 V}{\partial S\,\partial v_0}
Efficiency
The spot and vanna bumps only change S0S_0 / v0v_0 — one characteristic-function set serves all bumped prices, cutting 12 Fourier evaluations to 6.

12. SVI Volatility Surface

The raw SVI parameterization (Gatheral, 2004) describes the implied-vol smile at a fixed expiry as a function of log-moneyness k=ln(K/F)k = \ln(K/F):

w(k)=a+b(ρ(km)+(km)2+σ2),σimp(k)=w(k)Tw(k) = a + b\left(\rho(k - m) + \sqrt{(k - m)^2 + \sigma^2}\right), \qquad \sigma_{imp}(k) = \sqrt{\frac{w(k)}{T}}
aTotal variance level
bWing slope (b ≥ 0)
ρSkew (−1 < ρ < 1)
mSmile minimum offset
σCurvature at minimum

Each expiry’s (k,σimp)(k, \sigma_{imp}) points are fit by nonlinear least squares on total variance w=σimp2Tw = \sigma_{imp}^2 T, from three restarts. The fitted aa is clamped so wmin=a+bσ1ρ20w_{\min} = a + b\sigma\sqrt{1-\rho^2} \geq 0, keeping the slice arbitrage-free in strike.

A surface is a set of slices with total variance interpolated linearly in TT at fixed log-moneyness (sticky-strike). A calendar-arbitrage check rejects any surface where total variance decreases with time to maturity at a fixed moneyness — such a surface would admit a riskless calendar-spread arbitrage.

A second guard checks butterfly (strike) arbitrage: call prices must be convex in strike, equivalently the implied risk-neutral density must be non-negative. On a discrete strike grid this is C(Kd)2C(K)+C(K+d)0C(K-d) - 2C(K) + C(K+d) \geq 0. Each fitted slice reports an arb_free\text{arb\_free} flag plus the strike of the worst violation, so the chart can badge exactly where a surface breaks.

The same fit yields the ATM volatility term structure — the at-the-money implied vol at every expiry σATM(T)=w(0)/T\sigma_{ATM}(T) = \sqrt{w(0)/T} — and a Greeks surface: any Greek priced across strikes × expiries where each cell uses the SVI implied vol for its own strike, so the surface reflects the smile rather than a flat vol.

13. Heston Calibration

Fits (v0,κ,θv,σv,ρ)(v_0, \kappa, \theta_v, \sigma_v, \rho) to observed market option prices by minimizing a blended objective via L-BFGS-B\text{L-BFGS-B}:

minp[0.5rel-RMSE+0.5abs-RMSEVmkt]+10(2κθvσv2)2Feller penalty, only if violated\min_p \left[ 0.5\,\text{rel-RMSE} + 0.5\,\frac{\text{abs-RMSE}}{\overline{V^{mkt}}} \right] + \underbrace{10\,(2\kappa\theta_v - \sigma_v^2)^2}_{\text{Feller penalty, only if violated}}

A pure relative error over-penalizes deep-OTM options (tiny prices make any small misprice a huge percentage), dragging the fit into the wings. Blending in the mean-normalized absolute error keeps the ATM backbone dominant while relative error still shapes the smile.

Feller as a Soft Penalty

Hard-constraining 2κθv>σv22\kappa\theta_v > \sigma_v^2 forces infeasible optimizer restarts. A soft penalty lets the fit trade feasibility against quality — and reports whether Feller holds, as practitioners do.

Deterministic Multi-Start

nn restarts from an ATM-implied-vol seed plus log-uniformly spread seeds (sseU(0.7,0.7)s \leftarrow s\cdot e^{U(-0.7,0.7)}) — right for positive scale parameters. Reproducible via default_rng(20240101+i)\text{default\_rng}(20240101+i).

14. Model Validation

Scores a calibrated Heston model against the same market quotes it was fitted to, answering “how well does the model reproduce observed prices/vols, and are the market quotes internally consistent?”

MetricDefinition
Price Rel RMSE1ni(VimVikVik)2\sqrt{\tfrac{1}{n}\sum_i\left(\tfrac{V_i^{m} - V_i^{k}}{V_i^{k}}\right)^2}
Price MAPE1niVimVikVik×100%\tfrac{1}{n}\sum_i\left|\tfrac{V_i^{m} - V_i^{k}}{V_i^{k}}\right| \times 100\%
IV RMSENaN-robust: over contracts with resolvable implied vols only
Market parity violationLargest |put-call parity RHS − market price| across the chain
Market put-call parity
The complement option type is priced under the model and the implied parity value compared against the observed quote. A large violation flags internally inconsistent market quotes, not a bad model.

15. Assumptions & Limitations

AssumptionRealityTreatment
Constant volatilitySmile/skew varies by strike & expirySingle σ input for GBM; the quant workspace fits Heston & SVI models to the smile
GBM / log-normal returnsFat tails & negative skewGBM; Merton jump-diffusion as extension
Constant risk-free rateTerm structure, stochastic ratesFlat r; bond curve integration as fix
Continuous dividend yieldDiscrete cash paymentsContinuous q approx; discrete modeling as gap
European exercise onlyMost US options are AmericanExplicit scope; Longstaff-Schwartz LSM as fix
Frictionless marketsBid-ask spreads, market impactNot modeled; pricing vs trading system distinction
Risk-neutral measure QPhysical drift ≠ risk-neutral driftPriced under Q; appropriate for hedging, not forecasting

16. Multi-Leg Strategy Engine

A strategy is a portfolio of 1–10 signed legs — a long has positive quantity, a short negative. Each option leg is priced by closed-form Black-Scholes; stock legs are valued at the forward-carried price SeqTSe^{-qT} with Δ=1\Delta = 1.

Portfolio Greeks are quantity-weighted sums of the per-leg Greeks. The net premium is the signed sum of leg values: positive = debit (we pay to enter), negative = credit (we were paid).

Δnet=iqiΔi,P&L(ST)=payoff(ST)piecewise-linear in spotnet premium\Delta_{net} = \sum_i q_i \Delta_i, \quad \text{P\&L}(S_T) = \underbrace{\text{payoff}(S_T)}_{\text{piecewise-linear in spot}} - \text{net premium}
Breakevens

The spot levels where net P&L = 0, found by linear interpolation across the net P&L's zero crossings (where payoff = net premium).

Max Profit / Loss

Exact: the payoff is piecewise-linear, so extrema live at strike kinks and the tails. Unbounded (∞) is reported when the high-tail slope is nonzero — a finite grid scan would misstate this.

Presets
Ten presets cover the classic structures — long/short straddles, strangles, bull/bear spreads, iron condor, iron butterfly, call butterfly, covered call, protective put — each with a distinct risk/reward shape visible on the payoff diagram.

17. Scenario Stress Testing

Reprices an option under named market scenarios — 2008 Crisis (−40% spot, +20 vol pts, +100 bp rates), COVID Crash, Vol Crush, Flash Crash — each defined as coordinate shifts in spot, vol, rate, and elapsed time:

S=max(ϵ,S0+ΔSabs+ΔSpctS0),σ=max(MIN_SIGMA,σ+Δσ)S' = \max(\epsilon, S_0 + \Delta S_{abs} + \Delta S_{pct}\cdot S_0), \quad \sigma' = \max(\text{MIN\_SIGMA}, \sigma + \Delta\sigma)

Every scenario reports its repriced option value plus absolute and percentage P&L versus the base price. The engine selects the worst/best scenarios and computes an unrealized-risk metric — the largest single-scenario loss as a fraction of the base price.

Stress vs. P&L Explain
P&L attribution (§9) decomposes one observed move into Greek contributions. Stress testing imposes many hypothetical moves and reads off the outcomes — the forward-looking complement to the backward-looking attribution.

18. Put-Call Parity Data-Quality Probes

Put-call parity is the no-arbitrage identity CP=S0eqTKerTC - P = S_0 e^{-qT} - K e^{-rT}. The probes run it in reverse: given market prices, what rate or dividend is the market implicitly assuming? Consistent quotes land near consensus values; a large divergence flags stale mids, crossed markets, or mis-priced dividends.

Implied Rate
r=1Tln(S0eqTC+PK)r = -\frac{1}{T}\ln\left(\frac{S_0 e^{-qT} - C + P}{K}\right)
Guarded: non-positive discounted strike ⇒ quotes inconsistent ⇒ parity_inconsistent error
Implied Dividend
q=1Tln(KerT+CPS0)q = -\frac{1}{T}\ln\left(\frac{K e^{-rT} + C - P}{S_0}\right)
Given a trusted rate, recovers the dividend the market is pricing in
Why the extracted value is never re-verified against parity
Plugging the recovered rr or qq back into parity is a tautology — the parameter is defined as the value that makes the identity hold, so recomputation reproduces the spread by construction and can never fail. The real checks are the positivity guard and the divergence versus a reference rate/dividend. The probes are ATM-only because ATM quotes are the most liquid and least corrupted by deep-OTM noise.

19. Delta-Hedging Comparison

Benchmarks two hedging strategies across hundreds of simulated Heston paths: BS hedging (constant implied vol) versus Heston hedging (model-informed deltas that adapt to the current variance state). The hedger is short the option — receives premium at t=0t=0, delta-hedges to expiry, and the hedging error reveals which strategy is more precise.

Hedging Error

ε=cashT+ΔTSTpayoff(ST)\varepsilon = \text{cash}_T + \Delta_T \cdot S_T - \text{payoff}(S_T)
Positive = hedge over-performed (hedger profits); Negative = under-performed

BS Delta (Fixed IV)

Solve for σIV\sigma_{\text{IV}} from the Heston ATM price at t=0t=0, then use that constant vol for every rebalance:

ΔtBS=eq(Tt)N(d1),d1=ln(St/K)+(rq+12σIV2)(Tt)σIVTt\Delta_t^{\text{BS}} = e^{-q(T-t)} N(d_1), \quad d_1 = \frac{\ln(S_t/K) + (r - q + \tfrac{1}{2}\sigma_{\text{IV}}^2)(T-t)}{\sigma_{\text{IV}}\sqrt{T-t}}

Heston Delta (Expected Average Variance)

The delta uses the BS formula evaluated at σh=vˉt\sigma_h = \sqrt{\bar{v}_t}, where vˉt\bar{v}_t is the expected time-averaged variance over the remaining life. For the CIR variance process:

vˉt=θv+(vtθv)1eκ(Tt)κ(Tt)\bar{v}_t = \theta_v + (v_t - \theta_v)\cdot\frac{1 - e^{-\kappa(T-t)}}{\kappa(T-t)}
Taylor expansion for small κ(Tt)\kappa(T-t): f(x)1x/2+x2/6f(x) \approx 1 - x/2 + x^2/6 avoids catastrophic cancellation
ΔtHeston=eq(Tt)P1(calls),ΔtHeston=eq(Tt)(P11)(puts)\Delta_t^{\text{Heston}} = e^{-q(T-t)} \cdot P_1 \quad (\text{calls}), \qquad \Delta_t^{\text{Heston}} = e^{-q(T-t)}(P_1 - 1) \quad (\text{puts})
P1P_1 is the stock-measure probability from the Heston Fourier-inversion engine (§11)

Transaction Costs

TC=τδtradeSt,τ=B/10,000\text{TC} = \tau \cdot |\delta_{\text{trade}}| \cdot S_t, \qquad \tau = B / 10{,}000
Default: 5 bps (B=5B = 5). Applied at every rebalance step.

Summary Statistics

Variance Ratio
R=Var(εBS)/Var(εHeston)R = \text{Var}(\varepsilon^{\text{BS}}) / \text{Var}(\varepsilon^{\text{Heston}})
>1 means Heston is more precise
RMSE
1Niεi2\sqrt{\frac{1}{N}\sum_i \varepsilon_i^2}
Combined bias + variance
Max Absolute Error
maxiεi\max_i |\varepsilon_i|
Worst-case loss across all paths
Variance % Improvement
(11/R)×100%(1 - 1/R) \times 100\%
How much tighter the Heston distribution is

20. Design Decisions FAQ

Question Rationale
Why MC for something BS solves?Validation infrastructure for machinery meant to generalise to unsolvable cases
Why S_T as control, not BS price?BS is the benchmark; using it as control would be circular
Why exact GBM sampling?Closed-form terminal density makes Euler bias unnecessary
Why normal CI, not bootstrap?CLT applies cleanly to i.i.d. draws; bootstrap adds cost with no benefit
Why FD Greeks need CRN?Without CRN, bumps are swamped by MC noise, not sensitivity
Why continuous dividend yield?Free data lacks reliable ex-div schedules; explicitly named gap
Why close-to-close vol?Data quality across US, Indian, FX, and cryptocurrency tickers matters more than marginal efficiency
Why default_rng not RandomState?PCG64 is superior; avoids shared global state in concurrent backend
Why Newton-Raphson + Brent?NR fast near root; Brent handles near-zero-Vega without derivative
Why residual in P&L explain?Taylor expansion exact only for infinitesimal moves; residual = cross-Greeks + higher-order
Why vectorise the risk grid?625 cell-level loops dominate runtime; broadcast evaluates all at NumPy speed
Why RQMC instead of standard MC?O(N^{-1}) vs O(N^{-1/2}) convergence for smooth integrands; CI is heuristic
Why Fourier inversion for Heston?No closed-form density, but the characteristic function is closed form — fast, deterministic, no MC noise in Greeks
Why Volga w.r.t. √v₀, not v₀?Traders quote volatility; chain rule 4v₀·V″ + 2·V′ converts variance bumps
Why blend relative + absolute RMSE in calibration?Pure relative over-penalizes deep-OTM; the blend keeps ATM dominant while the smile stays shaped
Why reject calendar arbitrage at build?Total variance decreasing in T admits a riskless spread; rejecting keeps surfaces economically sane
Why not verify an implied rate by recomputing parity?It is a tautology — the parameter is defined as the parity-solver; it reproduces the spread by construction and never fails
Why analytic max profit/loss for strategies?Expiration payoff is piecewise-linear; extrema are exact at kinks/tails, and unbounded (∞) is reported correctly
Why are parity probes ATM-only?ATM quotes are the most liquid and least corrupted by deep-OTM noise — the cleanest rate/dividend signal
Why hedge with expected avg variance, not spot v_t?Spot v_t overreacts to vol spikes and ignores mean reversion; E[v_avg] smooths the delta and produces a tighter error distribution
Why solve BS IV from the Heston price?Traders observe market IV and hedge with it — the fixed-IV BS strategy replicates this realistic scenario, not an artificial one
Why transaction costs at 5 bps default?A reasonable equity round-trip cost; zero TC makes both strategies look perfect, masking the practical rebalancing penalty
Why even n_paths for antithetic variates?Antithetic pairs (+Z, −Z) require pairing; odd counts would leave one unpaired path, breaking the variance-reduction guarantee
Full mathematical specification available in the project’s Quantitative Methodology document.