public static double basisPointValue(Bond bond, InterestRate yield, Date settlementDate = null) { if (settlementDate == null) { settlementDate = bond.settlementDate(); } Utils.QL_REQUIRE(BondFunctions.isTradable(bond, settlementDate), () => "non tradable at " + settlementDate + " (maturity being " + bond.maturityDate() + ")"); return(CashFlows.basisPointValue(bond.cashflows(), yield, false, settlementDate)); }
public static double basisPointValue(Bond bond, double yield, DayCounter dayCounter, Compounding compounding, Frequency frequency, Date settlementDate = null) { return(CashFlows.basisPointValue(bond.cashflows(), new InterestRate(yield, dayCounter, compounding, frequency), false, settlementDate)); }