//! dirty price given a yield and settlement date /*! The default bond settlement is used if no date is given. */ public double dirtyPrice(double yield, DayCounter dc, Compounding comp, Frequency freq, Date settlement = null) { double currentNotional = notional(settlement); if (currentNotional.IsEqual(0.0)) { return(0.0); } return(BondFunctions.cleanPrice(this, yield, dc, comp, freq, settlement) + accruedAmount(settlement)); }
//! clean price given a yield and settlement date /*! The default bond settlement is used if no date is given. */ public double cleanPrice(double yield, DayCounter dc, Compounding comp, Frequency freq, Date settlement = null) { return(BondFunctions.cleanPrice(this, yield, dc, comp, freq, settlement)); }