@@ -49,17 +49,13 @@ public static ParameterReport AnalyzeParameter(
4949 . Cast < IGrouping < string , OptimizationBacktestMetrics > > ( )
5050 : owning . GroupBy ( b => SliceKey ( b , otherParamNames ) ) ;
5151
52- var primaryKey = otherParamNames . Count == 0 ? "" : SliceKey ( best , otherParamNames ) ;
53-
5452 var slices = new List < SliceFit > ( ) ;
5553 foreach ( var group in grouped )
5654 {
57- var isPrimary = group . Key == primaryKey ;
58- var slice = BuildSlice ( group . ToList ( ) , name , otherParamNames , isPrimary ) ;
55+ var slice = BuildSlice ( group . ToList ( ) , name , otherParamNames ) ;
5956 if ( slice != null ) slices . Add ( slice ) ;
6057 }
6158
62- var distinctValueCount = owning . Select ( b => b . Parameters [ name ] ) . Distinct ( ) . Count ( ) ;
6359 var hasBest = best . Parameters . TryGetValue ( name , out var bestValue ) ;
6460 var ( searchedMin , searchedMax , step ) = ExtractGridSpec ( parameter , owning , name ) ;
6561 var bestAtEdge = hasBest && IsAtSearchedEdge ( bestValue , searchedMin , searchedMax , step ) ;
@@ -76,7 +72,6 @@ public static ParameterReport AnalyzeParameter(
7672 SearchedMin = searchedMin ,
7773 SearchedMax = searchedMax ,
7874 Step = step ,
79- DistinctValueCount = distinctValueCount ,
8075 MeanWithinSliceSharpeRange = meanRange ,
8176 MaxWithinSliceSharpeRange = maxRange ,
8277 MaxAbsDerivativePerStep = maxDerivPerStep ,
@@ -89,8 +84,7 @@ public static ParameterReport AnalyzeParameter(
8984 private static SliceFit BuildSlice (
9085 List < OptimizationBacktestMetrics > backtests ,
9186 string varyingParamName ,
92- IReadOnlyList < string > otherParamNames ,
93- bool isPrimary )
87+ IReadOnlyList < string > otherParamNames )
9488 {
9589 // Defensively collapse duplicate parameter values by averaging Sharpes.
9690 var points = backtests
@@ -136,11 +130,8 @@ private static SliceFit BuildSlice(
136130 return new SliceFit
137131 {
138132 FixedParameters = fixedParams ,
139- ParameterValues = xs ,
140- SharpeValues = ys ,
141133 SharpeRange = sharpeRange ,
142134 MaxAbsDerivative = maxAbsDerivative ,
143- IsPrimary = isPrimary ,
144135 Segments = segments
145136 } ;
146137 }
0 commit comments