public void AssertInterpolationTest1() { var flows = new ListTermCashflowSet(cashFlowSet, Term.MonthlyEffective); var zSpread = new ZSpread(flows, 2000000m); var result = zSpread.Spread(); var annuity = new Annuity(flows, 30); var check = annuity.GetZSpreadPV(0.0132866482605499030537820089M); Assert.IsTrue(IsEqualWithinThreshold(result, 0.0132866482605499030537820089M)); Assert.IsTrue(IsEqualWithinThreshold(check, 2000000m)); }
public decimal ZSpreadOfAnnuityModel(decimal zSpread) { return(7.14m * annuity1.GetZSpreadPV(zSpread) - 2 * annuity2.GetZSpreadPV(zSpread)); }