Module contents
Lesson 13 of 30Core 110 min

Monte Carlo pricing: exotics and Greeks

Price path-dependent options with Monte Carlo, variance reduction, Brownian bridges and simulation-based Greeks.

After this lesson you can

  • Design a Monte Carlo pricer with confidence intervals for path-dependent payoffs.
  • Separate discretization and statistical error and choose steps and paths for a fixed cost.
  • Correct discrete-monitoring barrier bias with Brownian-bridge crossing probabilities.
  • Use a geometric Asian option as a control variate and quantify variance reduction.
  • Derive and implement pathwise and likelihood-ratio Greeks and identify when each works.

Before you start

Simulating payoffs beyond terminal prices

A European call needs only STS_T; an Asian depends on an average, a barrier option on a crossing and a lookback on an extremum. To price under risk-neutral measure QQ, simulate the required state, calculate payoff GG, discount it and average:

V^=1N∑i=1Ne−rTGi,EE^=sGN.\widehat V=\frac1N\sum_{i=1}^N e^{-rT}G_i,\qquad \widehat{\mathrm{EE}}=\frac{s_G}{\sqrt N}.

In Monte Carlo pricing, sGs_G is the sample standard deviation of already discounted payoffs. An approximate normal interval is V^±1.96EE^\widehat V\pm1.96\widehat{\mathrm{EE}}; it expresses simulation uncertainty under the model, not model error or grid bias. Independent units are individual paths, or pairs with antithetics. A seed makes the experiment reproducible; it does not improve precision.

For GBM with constant parameters, the exact transition on a Δt\Delta t grid is

Si+1=Siexp⁡[(r−q−12σ2)Δt+σΔtZi],Zi∼N(0,1).S_{i+1}=S_i\exp[(r-q-\tfrac12\sigma^2)\Delta t+\sigma\sqrt{\Delta t}Z_i],\qquad Z_i\sim N(0,1).

Euler and its transition bias are unnecessary. Even so, exact nodes do not observe what happens between them: continuous monitoring of a barrier or maximum introduces another error. For path-dependent options, specify whether average, barrier or extremum is observed on particular dates or continuously. For an asset basket, a valid correlation matrix and its Cholesky factorization correlate shocks; innovation correlation is not automatically price correlation.

For a computational budget proportional to NnNn, more steps nn often reduce monitoring bias but leave fewer paths NN and greater statistical error. There is no universal optimal allocation: it depends on payoff, scheme, bias and cost criterion. A narrow interval from a biased grid can give a precise answer to the wrong problem.

The geometric Asian as a control

Let A=n−1∑jStjA=n^{-1}\sum_j S_{t_j} be the arithmetic average and G=(∏jStj)1/nG=(\prod_jS_{t_j})^{1/n} the geometric average, observed at tj=jT/nt_j=jT/n without S0S_0. Log GG is normal and its call has a closed-form price. Exploit correlation between discounted payoffs X=(A−K)+e−rTX=(A-K)^+e^{-rT} and Y=(G−K)+e−rTY=(G-K)^+e^{-rT}:

Xcv=X−β(Y−E[Y]),β∗=Cov⁡(X,Y)Var⁡(Y).X_{\rm cv}=X-\beta(Y-\E[Y]),\qquad \beta^*=\frac{\operatorname{Cov}(X,Y)}{\operatorname{Var}(Y)}.

The geometric control variate does not change expectation if β\beta is fixed and E[Y]\E[Y] is the correct price for the same dates. Estimating β\beta and evaluating on the same sample can introduce finite-sample bias; an independent pilot avoids that dependence. The variance-reduction factor is Var⁡(X)/Var⁡(Xcv)\operatorname{Var}(X)/\operatorname{Var}(X_{\rm cv}): if it equals 100, one controlled path has approximately the precision of 100 uncontrolled paths before pilot and computational costs. Antithetics average payoffs with ZZ and −Z-Z; one pair is an independent observation and costs two paths.

InteractiveThe Monte Carlo funnel
  • Estimate
  • Pointwise 95% CI
Estimator
Price with 8,192 units6.5588
Standard error0.0036
Pilot β1.041
Variance reduction per unit858.4
Hypothetical arithmetic Asian call, S₀ = K = 100, r = 3%, σ = 25%, T = 1 and 32 dates without S₀. Use 1024 pilot paths for β and up to 8192 evaluation units with seed 281301. The geometric control uses an approximate CDF; each antithetic unit contains two paths. Bands are approximate pointwise intervals, not a simultaneous band.

The discrete geometric price follows from log⁡G∼N(m,v)\log G\sim N(m,v), where

m=log⁡S0+(r−q−12σ2)Tn+12n,v=σ2T(n+1)(2n+1)6n2.m=\log S_0+(r-q-\tfrac12\sigma^2)T\frac{n+1}{2n},\qquad v=\sigma^2T\frac{(n+1)(2n+1)}{6n^2}.

The geometric call is e−rT[em+v/2N((m−log⁡K+v)/v)−KN((m−log⁡K)/v)]e^{-rT}[e^{m+v/2}N((m-\log K+v)/\sqrt v)-KN((m-\log K)/\sqrt v)]. The formula changes if the average includes S0S_0 or dates are unequally spaced. The control does not turn an arithmetic average into a geometric one: it adjusts the estimator without replacing the contract.

The barrier crossed between nodes

Consider a down-and-out call with lower barrier H<S0H<S_0 and no rebate. Monitoring only at nodes may miss a crossing: discrete payoff is at least continuously monitored payoff on every path, so discrete price is upward biased relative to continuous price.

For endpoints Si,Si+1>HS_i,S_{i+1}>H, the log-price Brownian bridge gives conditional crossing probability

pi=exp⁡[−2log⁡(Si/H)log⁡(Si+1/H)σ2Δt].p_i=\exp\left[-\frac{2\log(S_i/H)\log(S_{i+1}/H)}{\sigma^2\Delta t}\right].

If an endpoint touches or crosses the barrier, pi=1p_i=1. Conditional on all nodes, survival probability is ∏i(1−pi)\prod_i(1-p_i); multiplying terminal payoff by that product integrates hidden crossings and avoids simulating another coin flip. With GBM, constant barrier and constant parameters, it exactly corrects continuous monitoring conditional on nodes. It does not transfer unchanged to jumps or variable volatility. Broadie, Glasserman and Kou (1997) develop a different continuity correction that shifts the barrier to approximate discrete monitoring.

To check by another route, with q=0q=0, H<KH<K and H<S0H<S_0, log-price reflection gives CDO=CBS(S0,K)−(H/S0)2λCBS(H2/S0,K)C_{\rm DO}=C_{\rm BS}(S_0,K)-(H/S_0)^{2\lambda}C_{\rm BS}(H^2/S_0,K), where λ=(r−σ2/2)/σ2\lambda=(r-\sigma^2/2)/\sigma^2 and both calls have the same maturity. The second term subtracts the effect of paths touching the barrier. This form depends on H<KH<K and no rebate; it cannot simply be reused for every contract.

InteractiveThe invisible crossing
  • Observed nodes
  • Three possible bridges
  • Barrier
85
12
2
Crossing probability19.5 %
Discrete price ± SE10.873 ± 0.179
Bridge ± SE10.239 ± 0.176
Analytical continuous price10.124
Hypothetical down-and-out call with S₀ = K = 100, r = 3%, σ = 25% and T = 1. The blue line initially contains 12 intervals simulated with seed 281302; three conditional bridges are drawn in the selected segment. Change the interval count. Price uses 10,000 independent paths with seed 281303 and is compared with the continuous solution for H < K. Standard errors are calculated per path.

Greeks by simulation

The pathwise method differentiates each path’s payoff when derivative and expectation can be exchanged. For the European call, ST=S0XS_T=S_0X and, except for the zero-probability event ST=KS_T=K,

Δ^PW=e−rT1ST>KSTS0,V^PW=e−rT1ST>KST(WT−σT).\widehat\Delta_{\rm PW}=e^{-rT}\mathbf 1_{S_T>K}\frac{S_T}{S_0},\qquad \widehat{\mathcal V}_{\rm PW}=e^{-rT}\mathbf 1_{S_T>K}S_T(W_T-\sigma T).

The average estimates the derivative under integrability assumptions. For an Asian, replace ST/S0S_T/S_0 by the average of Stj/S0S_{t_j}/S_0 and differentiate each node with respect to σ\sigma. For a digital, payoff is constant on almost every path but its expectation changes with S0S_0: pathwise differentiation gives zero and fails because of discontinuity.

The likelihood-ratio method differentiates the density, not payoff: ∂θEθ[G]=Eθ[G ∂θlog⁡fθ]\partial_\theta\E_\theta[G]=\E_\theta[G\,\partial_\theta\log f_\theta], under interchange conditions. In European GBM, the delta score is Z/(S0σT)Z/(S_0\sigma\sqrt T) and vega score is (Z2−1)/σ−ZT(Z^2-1)/\sigma-Z\sqrt T. Scores handle digitals but can have high variance. For a full path, vega score sums increment scores and the S0S_0 score enters through the first transition. See Broadie and Glasserman (1996).

Central finite differences approximate the derivative using bump hh: if the same normals are used for S0+hS_0+h and S0−hS_0-h, the two valuations are correlated and their difference is often less noisy. Too large an hh causes bias; too small can amplify cancellation and noise, especially with independent seeds. Gamma and discontinuous barriers need extra treatment: repeating a pathwise derivative is not automatically valid.

InteractiveGreek-estimator race
  • Differences with common draws
  • Differences with independent draws
  • Pathwise
  • Likelihood ratio
Payoff
Analytical delta0.59677
Common / independent draws0.61230 / 0.81517
Pathwise / likelihood ratio0.61314 / 0.62397
Call and digital with S₀ = K = 100, r = 3%, σ = 25%, T = 1; 8192 observations generated with seed 281304 and central differences h = 1. Curves show the negative logarithm of estimated standard error: higher is more precise. Each contribution's standard deviation is divided by √N; independent samples are not simulated at each N. Naive digital pathwise is zero and omitted because it is biased.

Lab: exotic-option engine

The engine uses exact GBM nodes, discrete geometric price and an independent pilot sample for the control. The continuous barrier is also checked against a reflection formula for H<KH<K, with no dividends or rebate. The presented lookback observes the maximum only at nodes. Intervals ignore model uncertainty.

[ ]Paths, Asian and barrierBrowser
import numpy as np
from scipy.special import ndtr
def bs_call(S,K,r,sigma,T):
    a=sigma*np.sqrt(T); d1=(np.log(S/K)+(r+.5*sigma*sigma)*T)/a; d2=d1-a
    return S*ndtr(d1)-K*np.exp(-r*T)*ndtr(d2)
def geo_call(S,K,r,sigma,T,n):
    m=np.log(S)+(r-.5*sigma*sigma)*T*(n+1)/(2*n); v=sigma*sigma*T*(n+1)*(2*n+1)/(6*n*n); a=np.sqrt(v)
    return np.exp(-r*T)*(np.exp(m+v/2)*ndtr((m-np.log(K)+v)/a)-K*ndtr((m-np.log(K))/a))
def paths(seed,N,n,S=100.,r=.03,sigma=.25,T=1.):
    g=np.random.default_rng(seed); dt=T/n; z=g.standard_normal((N,n)); logs=np.log(S)+np.cumsum((r-.5*sigma*sigma)*dt+sigma*np.sqrt(dt)*z,axis=1)
    return np.column_stack((np.full(N,S),np.exp(logs)))
def summary(x):
    mean=x.mean(); se=x.std(ddof=1)/np.sqrt(len(x)); return (round(mean,5),round(se,5),tuple(np.round([mean-1.96*se,mean+1.96*se],5)))
def asian(p,K=100.,r=.03):
    a=p[:,1:].mean(axis=1); g=np.exp(np.log(p[:,1:]).mean(axis=1)); return np.exp(-r)*np.maximum(a-K,0),np.exp(-r)*np.maximum(g-K,0)
pilot=paths(281310,4000,32); xp,yp=asian(pilot); beta=np.cov(xp,yp,ddof=1)[0,1]/np.var(yp,ddof=1)
p=paths(281311,30000,32); x,y=asian(p); geom=geo_call(100,100,.03,.25,1,32); adjusted=x-beta*(y-geom)
print('asiática aritmética',summary(x),'control',summary(adjusted),'geométrica analítica',round(geom,5),'geométrica MC',summary(y))
print('beta piloto',round(beta,5),'factor varianza',round(np.var(x,ddof=1)/np.var(adjusted,ddof=1),2))
H=80.; dt=1/32; a,b=p[:,:-1],p[:,1:]; above=(a>H)&(b>H)
cross=np.where(above,np.exp(-2*np.log(np.maximum(a,H)/H)*np.log(np.maximum(b,H)/H)/(.25**2*dt)),1.)
pay=np.exp(-.03)*np.maximum(p[:,-1]-100,0); discrete=pay*(p.min(axis=1)>H); bridge=pay*np.prod(1-cross,axis=1)
power=2*(.03-.5*.25**2)/.25**2; continuous=bs_call(100,100,.03,.25,1)-(H/100)**power*bs_call(H*H/100,100,.03,.25,1)
print('barrera discreta',summary(discrete),'puente',summary(bridge),'continua analítica',round(continuous,5))
print('lookback discreta',summary(np.exp(-.03)*np.maximum(p.max(axis=1)-100,0)))

In this run, plain arithmetic Asian gave 6.46012 with SE 0.05727; the independent control gave 6.55834 with SE 0.00195 and variance factor 859.25. Analytical geometric price was 6.25765 and estimated 6.16329 with SE 0.05490. The arithmetic estimators use the same paths and are correlated; their marginal intervals should not be treated as independent experiments.

[ ]Correlated basket and monitoringBrowser
g=np.random.default_rng(281312); N=30000; rho=.4; L=np.linalg.cholesky(np.array([[1.,rho],[rho,1.]])); z=g.standard_normal((N,2))@L.T
terminal=np.array([100.,95.])*np.exp((.03-.5*np.array([.2,.3])**2)+np.array([.2,.3])*z)
basket=np.exp(-.03)*np.maximum(terminal.mean(axis=1)-100,0)
print('correlación choques',round(float(np.corrcoef(z.T)[0,1]),4),'cesta',summary(basket))
for n in (12,64):
    p=paths(281312+n,30000,n); a,b=p[:,:-1],p[:,1:]; above=(a>80)&(b>80)
    cross=np.where(above,np.exp(-2*np.log(np.maximum(a,80)/80)*np.log(np.maximum(b,80)/80)/(.25**2/n)),1.)
    pay=np.exp(-.03)*np.maximum(p[:,-1]-100,0)
    print('pasos',n,'discreta',summary(pay*(p.min(axis=1)>80)),'puente',summary(pay*np.prod(1-cross,axis=1)))

Simulations at different grid sizes use different seeds; a small difference should not be interpreted as established bias without comparing its standard error. The control also consumes the pilot sample and per-unit variance factor excludes that cost. For a continuous barrier price, the bridge removes crossing bias in this model but not Monte Carlo error.

With 32 intervals, the discrete barrier gave 11.02341 and the bridge 10.87616, with SE 0.10379 and 0.10359; the continuous reflection reference was 10.95520. The discrete lookback gave 19.80704 with SE 0.11005 and basket 8.35521 with SE 0.07900. These values apply only to the cells’ seeds and parameters.

Lab: Greeks and discontinuity

The same set of normals allows comparison of call and Asian methods. Each row reports mean, contribution standard deviation and standard error; different Greeks have different units. For the Asian, the vega score sums scores of all increments and can be much noisier.

[ ]Pathwise and scoresBrowser
g=np.random.default_rng(281313); N,n=30000,32; S,K,r,sigma,T=100.,100.,.03,.25,1.; dt=T/n
z=g.standard_normal((N,n)); W=np.cumsum(np.sqrt(dt)*z,axis=1); t=np.arange(1,n+1)*dt
prices=S*np.exp((r-.5*sigma*sigma)*t+sigma*W); terminal=prices[:,-1]; disc=np.exp(-r*T)
average=prices.mean(axis=1); call=disc*np.maximum(terminal-K,0); asian_pay=disc*np.maximum(average-K,0); active=average>K
score_delta=z[:,0]/(S*sigma*np.sqrt(dt)); score_vega=np.sum((z*z-1)/sigma-np.sqrt(dt)*z,axis=1)
pw_delta=disc*(terminal>K)*terminal/S; pw_vega=disc*(terminal>K)*terminal*(W[:,-1]-sigma*T)
asian_delta=disc*active*average/S; asian_vega=disc*active*np.mean(prices*(W-sigma*t),axis=1)
def report(name,arr): print(name,'media',round(arr.mean(),5),'sd',round(arr.std(ddof=1),5),'EE',round(arr.std(ddof=1)/np.sqrt(N),5))
for name,arr in [('call delta PW',pw_delta),('call delta LR',call*score_delta),('call vega PW',pw_vega),('call vega LR',call*score_vega),('asiática delta PW',asian_delta),('asiática delta LR',asian_pay*score_delta),('asiática vega PW',asian_vega),('asiática vega LR',asian_pay*score_vega)]: report(name,arr)
d1=(np.log(S/K)+(r+.5*sigma*sigma)*T)/(sigma*np.sqrt(T)); print('call delta y vega analíticas',ndtr(d1),S*np.exp(-d1*d1/2)/np.sqrt(2*np.pi)*np.sqrt(T))
digital=disc*(terminal>K); report('digital delta LR',digital*score_delta); print('digital pathwise ingenua',0.)

The first-transition score is correct for the full path, but a call depending only on STS_T permits a lower-dimensional terminal score. Variance comparison depends on payoff and specific estimator. Equality in expectation does not imply equal finite-sample precision.

For the call, analytical delta was 0.59677; pathwise gave 0.60050 with SE 0.00355 and first-transition score 0.59098 with SE 0.02865. Analytical vega was 38.71469 and the path score had SE 4.24108 versus pathwise 0.46728. Naive digital pathwise gave zero, while its score estimated 0.01483 with SE 0.00089. These compare this sample, not a universal ranking of methods.

Exercises

ProofPathwise delta
Prove: Derive the pathwise delta of a European call under GBM.
0
Write ST=S0XS_T=S_0X, with XX independent of S0S_0, and assume derivative and expectation can be exchanged.

Step 1 of 3. What is the derivative of S_T with respect to S₀?

ProofDerive the score
Prove: Obtain the delta score for lognormal terminal price and explain why it works for a digital.
0
Let Z=[log⁡(ST/S0)−(r−q−σ2/2)T]/(σT)Z=[\log(S_T/S_0)-(r-q-\sigma^2/2)T]/(\sigma\sqrt T).

Step 1 of 3. Which part of the lognormal density depends on S₀?

NumericReduce the error
A standard error of 0.04 is obtained with 10,000 paths. How many are needed to reach 0.005 with the same variance per path?
QuizMissed crossings
A down-and-out without rebate is continuously monitored, but simulation checks only daily dates. In which direction is price biased?
CodeControl with independent pilot
Implement control(pilot_x,pilot_y,x,y,mean_y). Estimate β = cov(X,Y)/var(Y) on the pilot and return (adjusted sample, β, variance-reduction factor). Use consistent sample variance; reject a constant pilot control and return infinity if the adjusted sample is constant.
def control(pilot_x,pilot_y,x,y,mean_y):
  raise NotImplementedError()
Shift+Enter to run

Ideas to remember

Monte Carlo gives an interval for the model and grid estimator, not for the real world. The bridge integrates invisible crossings under GBM; the geometric Asian can reduce variance without changing payoff. Pathwise and score methods require different assumptions, and a discontinuity can invalidate pathwise differentiation.