Questions about VanillaMain4.cpp

This forum is to discuss the book "C++ design patterns and derivatives pricing."

Questions about VanillaMain4.cpp

Postby alokswain1@gmail.com » Tue May 21, 2013 7:51 pm

Hi Mark,
CC Quant-Experts,

I have two questions about VanillaMain4.cpp file.

a) I see that the call price calculated from the 1st method and the 2nd method varies considerably.

Only when we increase the 'Number of paths' to like 1000,000 or at least more than 100,000 we get a close enough value.

Why is that and in that case what would be a good value for the 'Number of Paths'.

b) Why is the put value so low

0.07 for a put option at the money expiring in 90 days with 0.30 volatility doesn't sound right.

What do you think.

Thanks

Alok

Appendix A : A sample output with inputs shown
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

bash-4.0$ ./VanillaMain4.exe

Enter expiry
90

Strike
20

Enter spot
20

Enter vol
0.3

r
0.05

Number of paths
100000

the call price is 18.5151

the call price is 20.2047

the call price is 20.6795

the put price is 0.0702747
q
bash-4.0$


Appendix B : I modified the code to include a new option called fourthOption similar to the thirdOption.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
double result = SimpleMonteCarlo4(theOption, Spot, VolParam, rParam, NumberOfPaths);

cout <<"\nthe call price is " << result << "\n";

VanillaOption secondOption(theOption);

result = SimpleMonteCarlo4(secondOption, Spot, VolParam, rParam, NumberOfPaths);

cout <<"\nthe call price is " << result << "\n";

//Alok-S-
VanillaOption fourthOption(theOption);

result = SimpleMonteCarlo4(fourthOption, Spot, VolParam, rParam, NumberOfPaths);

cout <<"\nthe call price is " << result << "\n";
//Alok-E-

PayOffPut otherPayOff(Strike);
VanillaOption thirdOption(otherPayOff, Expiry);
theOption = thirdOption;

result = SimpleMonteCarlo4(theOption, Spot, VolParam, rParam, NumberOfPaths);

cout <<"\nthe put price is " << result << "\n";
alokswain1@gmail.com
 
Posts: 2
Joined: Tue May 21, 2013 5:24 pm
Location: Duluth, GA, USA, 30097

Re: Questions about VanillaMain4.cpp

Postby alokswain1@gmail.com » Tue May 21, 2013 8:14 pm

I guess I got the answer to part a) of my question. This is a related discussion for a similar question.

http://www.markjoshi.com/books/phpBB3/viewtopic.php?f=3&t=945#p2928

I guess we should give very large paths 100,000 and above and still can expect large variation in answer of option prices.

My question b) remains why the put price is so low.
alokswain1@gmail.com
 
Posts: 2
Joined: Tue May 21, 2013 5:24 pm
Location: Duluth, GA, USA, 30097

Re: Questions about VanillaMain4.cpp

Postby mj » Tue May 21, 2013 8:41 pm

you can modify the code to return standard errors and see whether the differences are within
a reasonable amount,.

To check the put price, I'd advise using the BS formula.
mj
Site Admin
 
Posts: 1380
Joined: Fri Jul 27, 2007 7:21 am


Return to C++ design patterns and derivatives pricing

Who is online

Users browsing this forum: No registered users and 0 guests

cron