Bugs item #2104135, was opened at 2008-09-10 20:01
Message generated for change (Settings changed) made by lballabio You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=2104135&group_id=12740 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) >Assigned to: Klaus Spanderen (klausspanderen) Summary: HybridHestonHullWhiteProcess -> negative prices for a Call Initial Comment: I am getting negative prices for a call option (among other calibration problems) in the following example code. (Almost entirely based on test-suite code.) ---------------------------------------------------------------------- Comment By: Luigi Ballabio (lballabio) Date: 2009-02-23 10:44 Message: The bug is now fixed in the Subversion repository. Thank you for the report. ---------------------------------------------------------------------- Comment By: Luigi Ballabio (lballabio) Date: 2008-09-24 15:46 Message: results.value = std::max(0.0, results.value); at the end of the engine's calculate() method? Luigi ---------------------------------------------------------------------- Comment By: Klaus Spanderen (klausspanderen) Date: 2008-09-16 09:01 Message: Hi Luigi, I can also generate negative option NPVs with Monte-Carlo engines we have in actual library code (I guess nearly all MC engines supporting control variate can generate negative NPVs for deep OTM options. At least for the MCAmericanEngine it was pretty easy to find an example.). The root of the problem is the control variate algorithm itself, which might generate negative NPVs having a finite MC statistics, see line 104 in montecarlomodel.hpp. At the time being I don't see a one line fix for this behaviour. best regards Klaus ---------------------------------------------------------------------- Comment By: Luigi Ballabio (lballabio) Date: 2008-09-15 18:08 Message: Klaus, I hope you don't mind my stepping in. Is this an issue of the MultiVanillaOption class you had in the example, or of an instrument/engine we have in actual library code? If it's library code, I'd try and avoid negative NPVs being returned--even if the calibration or the use of control variates is not optimal. Maybe the engine can floor the option value at zero? Luigi ---------------------------------------------------------------------- Comment By: Klaus Spanderen (klausspanderen) Date: 2008-09-13 14:27 Message: Hi The example is using control variate to reduce the statistical error. But this method can also lead to small negative option NPV for deep OTM options (as happen in your example). Therefore these options are ignored during the calibration. A few other thinks - in line 751 a constant vol of 12% is added to initialize the calibration helper. IMO that's a bug because the calibration helper does not match to the impliedVols array. - you are using only a few instruments to calibrate the Hull-WHite model. The \sigma is IMO unrealistically high. Look e.g. into the BermudanSwaption example to get more realistic values. - the targetQualityIndex of the test case is much too small for real world problems. For real problems it is better to monitor the improvements of the qualityIndex and exit if no further progress is made. (E.g. for your example I'm getting a qualityIndex of around 100.) - The algorithm is based on Monte-Carlo optimization and therefore by far not as stable as a normal Heston calibration. That the reason why I've removed the example a month ago. best regards Klaus ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=2104135&group_id=12740 ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Free forum by Nabble | Edit this page |