fix: Avoid dupl keys when stripping exch from SecurityExpiration
This commit is contained in:
1 parent
7b9310f595
commit
ea0705e7e4
1 file changed
+5
-3
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -734,8 +734,10 @@ namespace mbts.analytics {
|
||||
IDictionary<SecurityExpiration, AnalyticsExpirationParameters> exp_params_map,
|
||||
IDictionary<SecurityExpiration, double> future_driver_price_map) {
|
||||
IDictionary<SecurityExpiration, VolSurfaceDriverTheo> rv = new Dictionary<SecurityExpiration, VolSurfaceDriverTheo>();
|
||||
exp_params_map = exp_params_map.ToDictionary(kv => kv.Key.unset_exchange(), kv => kv.Value);
|
||||
future_driver_price_map = future_driver_price_map.ToDictionary(kv => kv.Key.unset_exchange(), kv => kv.Value);
|
||||
exp_params_map = exp_params_map.ToDictionaryCrushed(
|
||||
kv => kv.Key.unset_exchange(), kv => kv.Value);
|
||||
future_driver_price_map = future_driver_price_map.ToDictionaryCrushed(
|
||||
kv => kv.Key.unset_exchange(), kv => kv.Value);
|
||||
foreach (SecurityExpiration exp in future_exps) {
|
||||
/// This is not the best sln, but the calculations are
|
||||
/// exchange agnostic, the other data may not be.
|
||||
|
||||
Reference in new issue
Block a user