Logo Search packages:      
Sourcecode: quantlib version File versions  Download package

Volatility QuantLib::BlackVarianceTermStructure::blackVolImpl ( Time  maturity,
Real  strike 
) const [inline, protected, virtual, inherited]

Returns the volatility for the given strike and date calculating it from the variance.

Implements QuantLib::BlackVolTermStructure.

Definition at line 389 of file voltermstructure.hpp.

References QuantLib::BlackVolTermStructure::blackVarianceImpl().

        Time nonZeroMaturity = (maturity==0.0 ? 0.00001 : maturity);
        Real var = blackVarianceImpl(nonZeroMaturity, strike);
        return std::sqrt(var/nonZeroMaturity);

Generated by  Doxygen 1.6.0   Back to index