Login  Register

LocalVolCurve::localVolImpl

Posted by Jens Thiel on Dec 31, 2002; 6:30am
URL: http://quantlib.414.s1.nabble.com/LocalVolCurve-localVolImpl-tp10206.html

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)
or am I missing something?


Happy new year!!

Jens.