Hello Quantlib,
I've added the Roll, Geske, Whaley method to price American Call with discrete dividends like it is discribed in Hull 4th P271. I've added new things: RGWAmericanOption is the new class cumulativebinormaldistribution(x,y,rho) is the cumulative binormal distribution. impliedCriticalStock is used to find the critical stock value S : c(S) = S + D1 - X. In term of performance it looks like it really improves the Binonial method. It took me 195 seconds to price 2 000 American Options with discrete dividends with the fddividend class, now it takes 20 seconds to price the same 100 000 American Options with discrete dividends. this is how I use it: double underlyingPrice =4000; double strike =4000; vector<Time> divdate; vector<double> divamount; divdate.push_back(0.16); divdate.push_back(0.41); divamount.push_back(50); divamount.push_back(50); Time maturity =0.5; RGWAmericanOption Europeanoptioniv2(Option::Call,underlyingPrice,strike,dividend,zero_rate,maturity,implvol,divamount,divdate,4331); // the 4331 has no effect here double criticalstrike=Europeanoptioniv2.impliedCriticalStock(4000); // retreive the critical stock value the 4000 is the strike value RGWAmericanOption Europeanoptioniv3(Option::Call,underlyingPrice,strike,dividend,zero_rate,maturity,implvol,divamount,divdate,criticalstrike); std::cout<<"American option value "<<Europeanoptioniv3.value()<<std::endl; std::cout<<"Implied Vol value " <<Europeanoptioniv3.impliedVolatility(327.68)<<std::endl; Is there a good soul who would like to help me to debug it and check the way I developped that? Also, I have a problem with American Put options. I don' know how to apply the Roll Geske Whaley formula. It looks like with a critical stock price very small (e.g 1), the pricing is not too bad but I don't know if there's something better to do. Here, I'm just using a standard European option Pricer if I understand correclty. Quantlib Admin: is it something you could add in a next release please? Thanks Xavier (See attached file: quantlib.hpp)(See attached file: singleassetoption.hpp) (See attached file: rgwamericanoption.hpp)(See attached file: singleassetoption.cpp)(See attached file: rgwamericanoption.cpp) ************************************************************************* Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. La Fimat et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. ******** This message and any attachments (the "message") are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither Fimat nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. ************************************************************************* quantlib.hpp (14K) Download Attachment singleassetoption.hpp (10K) Download Attachment rgwamericanoption.hpp (3K) Download Attachment singleassetoption.cpp (12K) Download Attachment rgwamericanoption.cpp (10K) Download Attachment |
At 2:17 PM +0100 10/31/02, [hidden email] wrote:
>I've added the Roll, Geske, Whaley method to price American Call with >discrete dividends like it is discribed in Hull 4th P271. Hi Xavier, great. I'll have a look at it. >Quantlib Admin: is it something you could add in a next release please? Sure. Xavier: I had to tame QuantLib in order to deploy it to a customer of ours which uses Solaris. After applying a few patches, it seems like it works with gcc now. Can you check it? If you get the current CVS version and run: ./solaris.setup ./bootstrap ./configure make make check it should compile and pass the tests. Thanks, Luigi |
Free forum by Nabble | Edit this page |