On Wed, 2008-01-23 at 08:25 -0800, [hidden email] wrote: > Revision: 14166 > http://quantlib.svn.sourceforge.net/quantlib/?rev=14166&view=rev > Author: nando > Date: 2008-01-23 08:25:24 -0800 (Wed, 23 Jan 2008) > > Log Message: > ----------- > - added explicit guess parameter in implied volatility calculation > @@ -93,8 +84,9 @@ > Volatility impliedVolatility( > Real price, > const Handle<YieldTermStructure>& discountCurve, > + Volatility guess, > Real accuracy = 1.0e-4, > - Size maxEvaluations = 100, > + Natural maxEvaluations = 100, > Volatility minVol = 1.0e-7, > Volatility maxVol = 4.0) const; Same concern here. The accuracy seems to me more likely to be specified than the guess. Moreover, the guess should have a default value, too. Luigi -- Don't let school get in the way of your education. -- Mark Twain ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
> > Volatility impliedVolatility(
> > Real price, > > const Handle<YieldTermStructure>& discountCurve, > > + Volatility guess, > > Real accuracy = 1.0e-4, > > - Size maxEvaluations = 100, > > + Natural maxEvaluations = 100, > > Volatility minVol = 1.0e-7, > > Volatility maxVol = 4.0) const; > > Same concern here. The accuracy seems to me more likely to be specified > than the guess. Moreover, the guess should have a default value, too. I disagree here. In the previous implementation the guess was hardcoded in the cpp file to be 10%. Providing a reasonable guess does speed up computation significantly, and it seems to me uncontroversial that a user might provide a reasonable guess, while usually he should not specify accuracy: if he does, it's the accuracy default value which is probably wrong... but that's for another possible future change: moving from absolute accuracy to nominal-relative accuracy in implied vol for swaption and cap/floor As usual, despite being this uncontroversial for me I'm willing to follow your suggestions if you're strong about them :-) I'm agnostic about providing a default value for the guess, just taught that with no default value there would be more chances of end user noticing that he's now able to provide a guess ciao -- Nando ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Free forum by Nabble | Edit this page |