Skip to content

Commit

Permalink
Update CreditDefaultSwapFunctionsTest.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
bleunguts committed May 1, 2024
1 parent 0d9f8f0 commit cf12820
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ProjectX.AnalyticsLib.Tests/CreditDefaultSwapFunctionsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void WhenValuingCdsPVUsingFlatInterestCurveItShouldReturnValidPV()
var couponInBps = 100;
var notional = 10_000;
Protection.Side protectionSide = Protection.Side.Buyer;
var interestRate = 0.15;
var interestRate = 0.07;
var actual = CreditDefaultSwapFunctions.PV(
evalDate,
effectiveDate,
Expand All @@ -36,7 +36,7 @@ public void WhenValuingCdsPVUsingFlatInterestCurveItShouldReturnValidPV()
Assert.That(actual.SurvivalProbabilityPercentage, Is.EqualTo(82).Within(1));
Assert.That(actual.DefaultProbabilityPercentage, Is.EqualTo(17).Within(1));
Assert.That(actual.HazardRatePercentage, Is.EqualTo(3).Within(1));
Assert.That(actual.PV, Is.EqualTo(405).Within(1), "PV must be equal to expected value within tolerance");
Assert.That(actual.FairSpread, Is.EqualTo(224).Within(1), "Fair spread must be equal to expected value within tolerance");
Assert.That(actual.PV, Is.EqualTo(471).Within(1), "PV must be equal to expected value within tolerance");
Assert.That(actual.FairSpread, Is.EqualTo(218).Within(1), "Fair spread must be equal to expected value within tolerance");
}
}

0 comments on commit cf12820

Please sign in to comment.