question on Chapter 16

Building Customisable High Performance C++ Applications

question on Chapter 16

Postby Cuchulainn » Wed Mar 24, 2010 6:45 am

Question

----------

Also some of the software on the book doesn't work for me, chapter 16 mentions a HESTON PDF plotting excelsheet which I can't find on the CD, and the StochasticVol.xll on the cd doesnt load into my excel (says format not recognised). Any chance you have working versions on these xls sheets?











Answer

--------

the Heston pdf sheet is not on the CD. You just have to use the pricing described in chapter 16 and use the Breeden Litzenberger result partial^2 C / partial K^2 = exp(-(r-d)T) F(S(T)).







The problem with xll is obviously that it is not compiled as a stand alone xll. Thus, it needs several dlls from Visual Studio. So, to use the xll you should recompile everything and use the output dll.







I have the following suggestions.



1) I can set up some Excel Sheet (based on VBA) for plotting the Heston prob dist. This you can use right away. This might take a while (End of next wekk ;-(()



2) I will find out which dll are necessary or how to compile into a stand alone xll.
User avatar
Cuchulainn
 
Posts: 677
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

Chapter 16 Bates semi-analytic solver ... issue

Postby jakmer » Tue May 18, 2010 2:53 pm

Hello,

I have compiled the Chapter16 project on the CD with the purpose to get a benchmark semi-analytical pricer for Bates model. The test case I am using is below. The semi-analytic pricer is not giving me the correct price for this case. What am I doing wrong?

Thanks.



OUTPUT (correct analytic HestonJ should be 8.3807):

Heston: 4.07665

HestonJ: 9.08283 (wrong)

MC Heston: 4.07291

MC HestonJ: 8.38521 (good convergence to the correct number)



INPUTS:

double S = 100.0; // Spot

double K = 100.0; // Strike

double t = 1.0; // Time to maturity

double r = 0.0; // Interest Rate

double d = 0.0; // Dividend

double vInst = 0.0291262219274451; // Current Volatility

double vLong = 0.00527334506728337; // Long Term Volatility

double kappa = 1.0; // Mean Reversion

double omega = 0.553926012028579; // Volatility of Variance

double rho = -0.7; // Correlation

double sigma = 0.1; // Volatility BS



double jumpintensity = 0.5; // Jumpintensity -> Jumps occur with intensity, refers to lambda in Poisson process

double jumpmean = -0.2; // JumpMean -> Jumpheights are lognormally distributed

double jumpvol = 0.2; // JumpVol -> Jumpheights are lognormally distributed
jakmer
 
Posts: 1
Joined: Tue May 18, 2010 2:40 pm

Answer to question on chapter 16

Postby Lapsilago » Tue May 18, 2010 9:33 pm

Thank you very much for your question. There is a mistake indeed!



But I think it is not the semi analytic price. This one is correct. I checked with FFT and Lewis integration method. I think there is an error in the MC.



Please change the following lines in the file MCJumps.hpp



//compute parameters for the jump height

double mu = exp(log(1+mue) + 0.5 * sigma * sigma);



This should lead to better results!



Best,

Lapsilago
Lapsilago
 
Posts: 5
Joined: Wed Jan 31, 2007 5:30 pm
Location: Germany, Bonn

Re: question on Chapter 16

Postby zohaa » Sun Oct 12, 2014 12:04 am

thanks so much
zohaa
 
Posts: 1
Joined: Sat Oct 11, 2014 9:50 pm


Return to Monte Carlo Frameworks (Duffy/Kienitz)

Who is online

Users browsing this forum: No registered users and 1 guest

cron