Added method getForwardDiscountBond (analog to getLIBOR).
public RandomVariable getForwardDiscountBond(double time, double
maturity)
@@ -914,6 +914,13 @@ public class LIBORMarketModelFromCovarianceModel extends AbstractProcessModel im
}
}
+ public RandomVariable getForwardDiscountBond(double time, double maturity) throws CalculationException {
+ RandomVariable inverseForwardBondAsOfTime = getLIBOR(time, time, maturity).mult(maturity-time).add(1.0);
+ RandomVariable inverseForwardBondAsOfZero = getLIBOR(0.0, time, maturity).mult(maturity-time).add(1.0);
+ RandomVariable forwardDiscountBondAsOfZero = getNumeraireAdjustment(maturity).div(time);
+ return forwardDiscountBondAsOfZero.mult(inverseForwardBondAsOfZero).div(inverseForwardBondAsOfTime);
+ }
+
private void ensureCacheConsistency() {
/*
* Check if caches are valid (i.e. process did not change)
