Monte Carlo Errors in Arithmetic Asian Option Valuation
Summary
The document discusses a Python implementation of standard Monte Carlo valuation for an arithmetic average price Asian call. The method simulates asset-price paths with lognormal one-step growth, averages prices along each path, calculates discounted payoffs, and estimates a confidence interval from the simulated payoffs. It is intended as a basic estimator without control variates.
The answers point out implementation issues that can produce incorrect values: the path array should match the number of observations, and averaging uninitialized or unused entries can distort the payoff. They also distinguish Gaussian draws from uniform random draws and note that vectorized numerical code can reduce errors. The discussion provides debugging guidance rather than a full validated pricing model. It does not specify whether the averaging schedule includes the initial price, nor does it address discrete monitoring conventions, convergence, or comparison with an independent benchmark, so those modeling details remain open.
Key ideas
- Arithmetic Asian option Monte Carlo estimates discounted payoffs based on the average asset price along each simulated path.
- Each simulated path needs storage for its observation points, rather than for the number of paths.
- Incorrect array dimensions or averaging unintended entries can materially bias the estimate.
- The simulation requires Gaussian shocks for the stated lognormal asset evolution.
- The answer focuses on implementation pitfalls and does not validate the estimator against a benchmark.
Tags
Full text
# Monte carlo simulation for arithmetic average price asian option
# Monte carlo simulation for arithmetic average price asian option
I am trying to construct a method in python that evaluates the value of an Arithmetic Asian Option using standard Monte Carlo simulation (without control variates). However, I am not getting the correct option values. The code is adapted from MATLAB source provided here: http://personal.strath.ac.uk/d.j.higham/ch22.m
Here is my implementation: (Key => S0 = stock value, K = strike price, v = volatility, r = risk-free interest rate, T = time to maturity, N = # of observations, M = # of paths in MonteCarlo simulation)
```
def arithmeticAsianCallValue (S0, K, v, r, T, N, M):
dt = T*1.0/N
drift = exp((r-0.5*v*v)*dt)
Spath = numpy.empty(M, dtype=float)
arithPayOff = numpy.empty(M, dtype=float)
scipy.random.seed([100])
for i in range(0,M,1):
growthFactor = drift * exp(v*sqrt(dt)*scipy.random.randn(1))
Spath[i] = S0 * growthFactor
for j in range(i+1,N,1):
growthFactor = drift * exp(v*sqrt(dt)*scipy.random.randn(1))
Spath[j] = Spath[j-1] * growthFactor
arithMean = numpy.mean(Spath)
arithPayOff[i] = exp(-r*T)* math.max(arithMean-K, 0)
# Standard Monte Carlo
Pmean = numpy.mean(arithPayOff)
Pstd = numpy.std(arithPayOff)
confmc = [Pmean-1.96*Pstd/sqrt(M), Pmean+1.96*Pstd/sqrt(M)]
return confmc
```
## Answer by SmallChess (score 1)
https://quant.stackexchange.com/a/33645
- `numpy.max` wouldn't work in this case. Try `Math.max`. If you don't believe me, try this:
> print(numpy.max(-100, 0))
gives
> -100
- You're supposed to draw from random Gaussian, not uniform.
> https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.rand.html Create an array of the given shape and populate it with random samples from a uniform distribution.
Adivice for programming: you're not using the vectorized implementation offered by numpy. If you aren't, forget about it. Mixing looping code with numpy like in this case would just introduce unnecessary bugs.
EDITED
`Spath` is a single dimensional numpy array for a single path. You should have initialized it with `N` not `M`. Making it `M` means you'd average the uninitialised elements (0 by default in Python), and thus very low option value.
@Bob_Jansen and other mods: I'm tempted to close the question off-topic. This is is clearly homework. The finance concepts is fine, it's the actual implementation (e.g. python loops) that's creating incorrect outputs. When I wrote my response, I thought the error was just like misunderstanding in Gaussian. We're here to answer about finance, not python looping.Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.