Hello,
Can anyone direct me to sample code on pricing plain american equity options with discrete dividends? All of the code I can find uses dividend yields... Thanks. graham |
Graham, I think you could use something like: std::vector<Time> dividend; std::vector<double> divamount; divdate.push_back(0.00547945205479); divdate.push_back(0.00821917808219); divamount.push_back(0.140000); divamount.push_back(2.4900000); FdDividendAmericanOption fdAmericanoption(Option::Call, underlyingPrice,strike; 0,zero_rate,maturity,implvol,divamount,divdate,TimeStep,GridPoint); Xavier
Hello, Can anyone direct me to sample code on pricing plain american equity options with discrete dividends? All of the code I can find uses dividend yields... Thanks. graham ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ Quantlib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users ************************************************************************* 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.
|
In reply to this post by Graham Miller-7
I would not take this option
in production code. might be better to use
vector< pair <Time, double> > DividendStructure
Daniel
From:
[hidden email] on behalf of
[hidden email]
Sent: Tue 02/11/2004 09:49 To: Graham Miller Cc: [hidden email]; [hidden email] Subject: Re: [Quantlib-users] American options with discrete dividends. Graham, I think you could use something like: std::vector<Time> dividend; std::vector<double> divamount; divdate.push_back(0.00547945205479); divdate.push_back(0.00821917808219); divamount.push_back(0.140000); divamount.push_back(2.4900000); FdDividendAmericanOption fdAmericanoption(Option::Call, underlyingPrice,strike; 0,zero_rate,maturity,implvol,divamount,divdate,TimeStep,GridPoint); Xavier
Hello, Can anyone direct me to sample code on pricing plain american equity options with discrete dividends? All of the code I can find uses dividend yields... Thanks. graham ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ Quantlib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users ************************************************************************* 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.
|
In reply to this post by Graham Miller-7
Another option would be
map<Time, double>
DividendStructure;
or even
multimap<Time, double> // means
several doubles per each time
From: [hidden email] on behalf of [hidden email] Sent: Tue 02/11/2004 09:49 To: Graham Miller Cc: [hidden email]; [hidden email] Subject: Re: [Quantlib-users] American options with discrete dividends. Graham, I think you could use something like: std::vector<Time> dividend; std::vector<double> divamount; divdate.push_back(0.00547945205479); divdate.push_back(0.00821917808219); divamount.push_back(0.140000); divamount.push_back(2.4900000); FdDividendAmericanOption fdAmericanoption(Option::Call, underlyingPrice,strike; 0,zero_rate,maturity,implvol,divamount,divdate,TimeStep,GridPoint); Xavier
Hello, Can anyone direct me to sample code on pricing plain american equity options with discrete dividends? All of the code I can find uses dividend yields... Thanks. graham ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ Quantlib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users ************************************************************************* 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.
|
At 16:47 02/11/2004, Daniel J. Duffy wrote:
>Another option would be > >map<Time, double> DividendStructure; > >or even > >multimap<Time, double> // means several doubles per each time Or some class encapsulating the above behind a domain-specific interface. Later, Luigi |
In reply to this post by Graham Miller-7
Luigi,
yes, with nice methods for your domain,
absolutely.
ciao
Daniel From: [hidden email] on behalf of Luigi Ballabio Sent: Wed 03/11/2004 09:36 To: [hidden email] Subject: RE: [Quantlib-users] American options with discrete dividends. At 16:47 02/11/2004, Daniel J. Duffy wrote: |
Free forum by Nabble | Edit this page |