Serving the Quantitative Finance Community

 
User avatar
cougar91
Topic Author
Posts: 0
Joined: December 13th, 2002, 7:00 pm

Can't get my gamma right via MC simulation

October 9th, 2006, 5:07 pm

Hi,I am writing a C++ program for MC simulation and don't seem to be able to get my gamma right. I got the price and delta, but the gamma is way off. Can someone tell me what I am doing wrong? Basically for delta I multiply the spot price by 1.01 and for gamma by 1.02. .......... newspot = spot*exp((intrate_ - 0.5*vol*vol)*expiration); deltanewspot = (spot*1.01)*exp((intrate_ - 0.5*vol*vol)*expiration); gammanewspot = (spot*1.01*1.01)*exp((intrate_ - 0.5*vol*vol)*expiration); .... call some function to generate a series of normal RVs .... loop thru the RVs and stored in vector of doubles the different S(T) prices gbmnode.GBMPrice=newspot*exp(voltime*(*rand_iter)); gbmnode.DeltaGBMPrice=deltanewspot*exp(voltime*(*rand_iter)); gbmnode.GammaGBMPrice=gammanewspot*exp(voltime*(*rand_iter)); ... loop thru the different S(T) prices and calculate the payoff for European call running_sum += max((*gbm_iter).GBMPrice - strike, 0); delta_running_sum += max((*gbm_iter).DeltaGBMPrice - strike, 0); gamma_running_sum += max((*gbm_iter).GammaGBMPrice - strike, 0); ... Average and PV the result prices running_sum = (running_sum / NumOfSim_)*exp(-intrate_*expiration); delta_running_sum = (delta_running_sum / NumOfSim_)*exp(-intrate_*expiration); gamma_running_sum = (gamma_running_sum / NumOfSim_)*exp(-intrate_*expiration); Price = running_sum; Delta = (delta_running_sum - running_sum)/(spot*0.01); Gamma = ((gamma_running_sum - delta_running_sum)/(spot*0.01)) - Delta; //I imagine this is where the problem is?The way I think about how to compute gamma is to increase the spot price 1% and then another 1%, calculate the payoff from delta price, the payoff from gamma price, take the difference bettween the two, normalize by 1 and get the second delta , then subtract from it the first delta, thus the change in delta due to spot price increase. What is wrong here?Thx in advance.
 
User avatar
QuantBit
Posts: 0
Joined: September 10th, 2003, 4:01 pm

Can't get my gamma right via MC simulation

October 10th, 2006, 10:47 am

Your problem line looks indeed problematic. A 2nd order finite difference for gamma is v_{n-1} - 2 v_n + v_{n+1}/(0.01²), the v_n correspond to your variables "Price", "Delta", "Gamma". The way I see it, "Gamma" just calculates another delta. In the text you write you take the difference between these two deltas but I don't see that in your code. Also try using centred differences instread of one-sided ones for better accuracy.If you indeed take this difference but encounter strange gammas you may be experiencing noise. First measure the noise by calculating the standard deviation of your gamma and second reduce it by using common random variables or more advanced schemes. Find these in Glasserman and Jäckel.
Last edited by QuantBit on October 9th, 2006, 10:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 20252
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Can't get my gamma right via MC simulation

October 10th, 2006, 11:47 am

In general, taking higher-order divided differences demands that the original solution is smooth enough. If note, then things get progressively worse. The problem is well known in other approximaion techniques as well.What data are you using?
Last edited by Cuchulainn on October 9th, 2006, 10:00 pm, edited 1 time in total.
 
User avatar
cougar91
Topic Author
Posts: 0
Joined: December 13th, 2002, 7:00 pm

Can't get my gamma right via MC simulation

October 10th, 2006, 7:30 pm

>What data are you using?You mean what kind of RNG am I using? It's Boost MT. I got both of your point about non-linearality of the hedge parameters, thus I shall re-program it to consider both ends and see how that turns out.Another question: I read somewhere that a good MC simulator should converge to theoretical B/S value within a couple of thousand iterations. Is this true?
 
User avatar
mutley
Posts: 20
Joined: February 9th, 2005, 3:51 pm

Can't get my gamma right via MC simulation

October 11th, 2006, 5:57 am

the speed of convergence will depend on the terms of the instrument you're pricing i.e. vol = 0.01, t = 0.1, and S=K this should converge pretty swiftlyvol = 0.5, t = 10.0 and 2*S=K0.5 this should converge pretty slowly
 
User avatar
mj
Posts: 12
Joined: December 20th, 2001, 12:32 pm

Can't get my gamma right via MC simulation

October 16th, 2006, 8:36 pm

gammas are notoriously slow by finite differencing MC, take a larger bump and 10 million paths and see what you get
 
User avatar
ZmeiGorynych
Posts: 6
Joined: July 10th, 2005, 11:46 am

Can't get my gamma right via MC simulation

October 19th, 2006, 6:24 am

If you want to get the gamma etc with comparatively low number of paths/high precision, you could use likelihood ratio monte carlo instead of bumping and differencing.
Last edited by ZmeiGorynych on October 18th, 2006, 10:00 pm, edited 1 time in total.
 
User avatar
quantie
Posts: 20
Joined: October 18th, 2001, 8:47 am

Can't get my gamma right via MC simulation

October 19th, 2006, 12:55 pm

well the best way to do gamma with MC is to combine the likelihood ratio method with the pathwise method.. so take the derivative under the density (LRM) and then use pathwise. (derivative wrt payoff)