Bugs item #934626, was opened at 2004-04-13 17:09
Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=934626&group_id=12740 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Excel is hung when calling qlAmericanOption_FD Initial Comment: it seems it only happens when the Type = C, and when the function template is used. XL version = 0.35, OS = XP Professional SP1; QuantLib & QuantLibXL are compiled off the source code by the user using the 0.35 release. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-06-24 16:53 Message: Logged In: NO Excel's function template invokes the function each time you tab through the input fields. Excel hangs when you enter the expiry date (the 8th of the 10 input parameters). The reason that Excel does not hang before then is because the relevant QuantLibXL function (xlAmericanOption_FD in file QuantLibXL\qlxl\pricers.cpp) contains the line double maturity = Actual365().yearFraction(valueDate, maturityDate); which throws an exception when either or both date is null, causing the function to return #N/A to Excel. Once both dates are provided, the above line completes successfully, and the code proceeds to call the underlying Quantlib constructor FdAmericanOption(), which hangs because the remaining input parameters are still null. The problem can be corrected by validating the input parameters at the beginning of function xlAmericanOption_FD() and exiting if any is missing: if (xltype.IsMissing() || xlunderlying.IsMissing() || ... etc ... xlgridPoints.IsMissing()) throw("missing inputs"); // returns #N/A to Excel but I'm not sure that's the right thing to do, there may be times when you legitimately want to call a function with some parameters missing, in which case the validation would have to be more elaborate. this bug occurs regardless of whether the type is C or P. eric at ehlers dot plus dot com. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=934626&group_id=12740 |
Free forum by Nabble | Edit this page |