Login  Register

Re: LocalVolCurve::localVolImpl

Posted by Luigi Ballabio-2 on Dec 31, 2002; 9:02am
URL: http://quantlib.414.s1.nabble.com/LocalVolCurve-localVolImpl-tp10206p10208.html

At 3:29 PM +0100 12/31/02, Jens Thiel wrote:

>Hi Luigi,
>
>
>         template<class Interpolator1D>
>         double LocalVolCurve<Interpolator1D>::localVolImpl(
>             Time t, double, bool extrapolate) const {
>
>             double dt = (1.0/365.0),
>                    var1 = blackVarianceCurve_->blackVariance(t,extrapolate),
>                    var2 = blackVarianceCurve_->blackVariance(t+dt,true),
>                    derivative = (var2-var1)/dt;
>             return QL_SQRT(derivative);
>         }
>
>in the calls to blackVarianceCurve_->blackVariance the only matching method
>signature I could find is:
>
>        //! Black present (a.k.a spot) variance
>         double BlackVolTermStructure::blackVariance(Time maturity,
>                              double strike,
>                              bool extrapolate = false) const;
>
>Is this, as I guess, a C++ type conversion "feature" (aka unnoticed error)

I hate C++ when it does this.
I'll fix it when I'm back to work.

Happy new year,
                Luigi