I'm looking to use the geometric asian option as a control variable for a monte carlo simulation. However, I have an issue with the closed-form equation to get the geometric price.
I'm using the formula from a previous related Q&A on this site:
When I compute it for T=1, it gives me the right price. But when T > 1, the price found is different from the solution that I get from MC.
With the parameters below, I get 9.124 and something around 9.65 with MC (SE = 0.02).
Here is the code I use:
import numpy as np
from scipy.stats import norm
np.random.seed(1)
#### Closed form equation for geometric asian option ####
def BS_geo(S0,K,T,vol,r,n,type):
varbis = vol**2 * (((n+1)*(2*n+1))/(6*(n**2)))
rbis = (varbis/2) + (r-((vol**2)/2)) * ((n+1)/(2*n))
d1 = (np.log(S0/K) + ( (rbis+0.5*varbis)*T)) / np.sqrt(varbis)*np.sqrt(T)
d2 = d1 - (np.sqrt(varbis)*np.sqrt(T))
if type == "Call":
price = np.exp(-r*T) * (S0*np.exp(rbis*T)*norm.cdf(d1)-K*norm.cdf(d2))
else:
price = np.exp(-r*T) * (K*norm.cdf(-d2) - S0*np.exp(rbis*T)*norm.cdf(-d1))
return price
S0=100
K=105
T=3
vol = 0.25
r = 0.05
n= 100
type = "Call"
print(BS_geo(S0,K,T,vol,r,n,type))
When I compute it for different T between 1 and 20, here is what I got. Orange line is from Monte Carlo and the blue one from the closed-form equation.
np.exp(-rbis*T)
rather thannp.exp(-r*T)
? perhaps that's the source of the discrepancy $\endgroup$