diff --git a/src/client/spark/AW2/Misc/OptionInterpolationData.cs b/src/client/spark/AW2/Misc/OptionInterpolationData.cs index c2529d6dc..f5b2462e4 100644 --- a/src/client/spark/AW2/Misc/OptionInterpolationData.cs +++ b/src/client/spark/AW2/Misc/OptionInterpolationData.cs @@ -1,4 +1,6 @@ -using System; +using bts.api; + +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -10,11 +12,15 @@ namespace mbts.spark { // indexed by option_expiration->driver_price->option_strike->TheoPoint public class OptionTheoInterpolationData { public readonly string symbol; + public readonly Venue venue; private IDictionary>> _map = new Dictionary>>(); private IDictionary _zero_move_driver_map = new Dictionary(); - public OptionTheoInterpolationData(string symbol) { this.symbol = symbol; } + public OptionTheoInterpolationData(string symbol, Venue venue) { + this.symbol = symbol; + this.venue = venue; + } public void set_data(DateTime option_expiration, double driver_price, double move, double option_strike, TheoPoint theo_point) { @@ -125,4 +131,4 @@ namespace mbts.spark { #endregion } -} \ No newline at end of file +} diff --git a/src/client/spark/AW2/VolSurfaceInterpGreeksMultiplexer.cs b/src/client/spark/AW2/VolSurfaceInterpGreeksMultiplexer.cs index 815d66bff..ad7010c60 100644 --- a/src/client/spark/AW2/VolSurfaceInterpGreeksMultiplexer.cs +++ b/src/client/spark/AW2/VolSurfaceInterpGreeksMultiplexer.cs @@ -95,7 +95,7 @@ namespace mbts.spark { foreach (var kv in vs_theos) { OptionTheoInterpolationData sym_data = null; if (!rv.TryGetValue((kv.Key.symbol, kv.Key.venue), out sym_data)) { - sym_data = new OptionTheoInterpolationData(kv.Key.symbol); + sym_data = new OptionTheoInterpolationData(kv.Key.symbol, kv.Key.venue); rv.Add((kv.Key.symbol, kv.Key.venue), sym_data); } foreach (var t in kv.Value) diff --git a/src/client/spark/Analytics/Pricing/VolSurfaceInterpGreeksProducer.cs b/src/client/spark/Analytics/Pricing/VolSurfaceInterpGreeksProducer.cs index 0bacb7778..c049708ba 100644 --- a/src/client/spark/Analytics/Pricing/VolSurfaceInterpGreeksProducer.cs +++ b/src/client/spark/Analytics/Pricing/VolSurfaceInterpGreeksProducer.cs @@ -154,11 +154,8 @@ namespace mbts.analytics { private IDictionary _sync_exp_params() { var master_exp_keys = _exp_strikes_map.Keys.Select(k => - new SecurityExpiration(Venue.Unset, SecurityType.Option, k.symbol, k.expiration)); - // TODO: add exchange to key (so we don't have to 'Crush' the duplicate keys) - var exp_params_no_exch = _exp_params_map.ToDictionaryCrushed( - kv => kv.Key.unset_exchange(), kv => kv.Value); - return exp_params_no_exch.sync(master_exp_keys, true, + new SecurityExpiration(k.venue, SecurityType.Option, k.symbol, k.expiration)); + return _exp_params_map.sync(master_exp_keys, true, exp => AnalyticsExpirationParameters.empty); }