From 91c6fb4e52d188624666e570360c7e84d0f389f8 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Wed, 11 Sep 2024 11:42:15 -0400 Subject: [PATCH] diag: Log added/removed exps when syncing vs input w/ system exps This shouldn't happen often, but if it does, we should know about it. PS: We recently fixed a bug caused by inequalities between VolSurfaceExpirations in vs input, and in SystemContractData. User inputs to the vs grid would be immediately reverted, as the exps associated with the inputs were not found in the SystemContractData. This bug would have been easier to track down with this logging in place. --- src/client/spark/Analytics/Misc/VolSurfaceDataFunctions.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/client/spark/Analytics/Misc/VolSurfaceDataFunctions.cs b/src/client/spark/Analytics/Misc/VolSurfaceDataFunctions.cs index 2da31159b..1f64e208b 100644 --- a/src/client/spark/Analytics/Misc/VolSurfaceDataFunctions.cs +++ b/src/client/spark/Analytics/Misc/VolSurfaceDataFunctions.cs @@ -1,4 +1,6 @@ -using Spark.Core.Collections; +using bts; + +using Spark.Core.Collections; using System; using System.Collections.Generic; @@ -26,6 +28,9 @@ namespace mbts.analytics out HashSet deleted_exps, out HashSet added_exps); if (deleted_exps.Any() || added_exps.Any()) { + Log.Gen.info( + $"VolSurfaceDataFunctions.sync_input_expirations_to_master_list exps changed. " + + $"deleted: {string.Join(", ", deleted_exps)}; added: {string.Join(", ", added_exps)}"); VolSurfaceInput rv = VolSurfaceUtilityFunctions.clone_proto(vs_input); rv.surface_parameters.curve_parameters_map = rv.surface_parameters.curve_parameters_map ?? new List>(); rv.surface_parameters.curve_parameters_map.RemoveAll(t => deleted_exps.Contains(t.Item1));