Hi,
I am trying to work around the problem of zero dividend time by using a small, say 1e-4, dividend time and has run into a problem of another kind. If the number of asset steps is bigger than the number of time steps the solver doesn't work right. Below are reulsts of pricing an option using timeSteps of 40 and various assetSteps: 20, 40, 60. You can see that for assetSteps=60 the results are completely wrong. assetSteps=20 price=2.16968 delta=0.51742 vega=7.7254 assetSteps=40 price=2.16968 delta=0.517419 vega=7.72562 assetSteps=60 price=4.75005 delta=-4.39606 vega=131.91 Does anyone have an explanation for this phenomenon and/or suggestions for a work around? Thanks, Vadim P.S. This is how to reproduce the results #include <ql/quantlib.hpp> using namespace std; using namespace QuantLib; using namespace QuantLib::Pricers; int main() { const unsigned timeSteps = 40; vector<unsigned> assetStepsA; assetStepsA.push_back(20); assetStepsA.push_back(40); assetStepsA.push_back(60); vector<double> dividendA, dividendTimeA; dividendA.push_back(0.025); dividendTimeA.push_back(1e-4); double under=54.625; double strike=55; double dividendYield=0; double interestRate=0.052706; double expirationTime=0.126027; double sigma=0.282922; for (unsigned i=0; i<assetStepsA.size(); i++) { const unsigned assetSteps = assetStepsA[i]; FdDividendAmericanOption opt(Option::Call, under, strike, dividendYield, interestRate, expirationTime, sigma, dividendA, dividendTimeA, timeSteps, assetSteps); cout << "assetSteps=" << assetSteps << " price=" << opt.value() << " delta=" << opt.delta() << " vega=" << opt.vega() << '\n'; } return 0; } -------------------------------------------------- DISCLAIMER This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify me and permanently delete the original and any copy of any e-mail and any printout thereof. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. NOTICE REGARDING PRIVACY AND CONFIDENTIALITY Knight Trading Group may, at its discretion, monitor and review the content of all e-mail communications. |
Free forum by Nabble | Edit this page |