Logo Search packages:      
Sourcecode: quantlib version File versions

Real QuantLib::Bond::dirtyPrice (  )  const [inherited]

theoretical dirty price

The default bond settlement is used for calculation.

Warning:
the theoretical price calculated from a flat term structure might differ slightly from the price calculated from the corresponding yield by means of the other overload of this function. If the price from a constant yield is desired, it is advisable to use such other overload.

Definition at line 167 of file bond.cpp.

References QuantLib::Instrument::calculate().

Referenced by QuantLib::Bond::cleanPrice(), and QuantLib::Bond::yield().

                                {
        calculate();
        // !!!
        return NPV_/faceAmount_*100.0;
    }


Generated by  Doxygen 1.6.0   Back to index