From f1be04d3dfe52e2d398c18b9778a1e2f3688ae86 Mon Sep 17 00:00:00 2001 From: Gavin Brennan Date: Tue, 10 Sep 2024 11:46:02 +0100 Subject: [PATCH] Fix for non-LME curves in delta --- src/Qwack.Models/Risk/BasicMetrics.cs | 3 ++- version.props | 2 +- version.txt | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Qwack.Models/Risk/BasicMetrics.cs b/src/Qwack.Models/Risk/BasicMetrics.cs index b584addc..03ccbff2 100644 --- a/src/Qwack.Models/Risk/BasicMetrics.cs +++ b/src/Qwack.Models/Risk/BasicMetrics.cs @@ -11,6 +11,7 @@ using Qwack.Core.Instruments.Asset; using Qwack.Core.Models; using Qwack.Dates; +using Qwack.Futures; using Qwack.Math; using Qwack.Models.MCModels; using Qwack.Models.Models; @@ -789,7 +790,7 @@ public static ICube AssetDelta(this IPvModel pvModel, bool computeGamma = false, Dictionary bumpedCurves; Dictionary bumpedDownCurves; - if (isSparseLMEMode) + if (isSparseLMEMode && curveObj is BasicPriceCurve bpc && bpc.CurveType == Transport.BasicTypes.PriceCurveType.LME) { lastDateInBook = NextThirdWeds(lastDateInBook); var sparseDates = curveObj.PillarDates.Where(x => x <= lastDateInBook && DateExtensions.IsSparseLMEDate(x, curveObj.BuildDate, calendars)).ToArray(); diff --git a/version.props b/version.props index 823770e4..c7385596 100644 --- a/version.props +++ b/version.props @@ -1,5 +1,5 @@ - 0.8.86 + 0.8.87 diff --git a/version.txt b/version.txt index f6df0d66..29f8544f 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.8.86 \ No newline at end of file +0.8.87 \ No newline at end of file