cleanup: Remove unused code
This commit is contained in:
1 parent
ab2f0f975e
commit
c3cb8995bf
3 files changed
+1
-40
No files matched your search
@@ -53,14 +53,6 @@ namespace BCG
|
||||
_cached_atm_data = _assemble_atm_data_from_symbols(_sym_data_map);
|
||||
}
|
||||
|
||||
public static NMSheetData filter_data(NMSheetData data, HashSet<uint> restricted_seckey_map)
|
||||
{
|
||||
Dictionary<NMSheetSymbol, NMSheetSingleOptionData> main_data_map = new Dictionary<NMSheetSymbol, NMSheetSingleOptionData>();
|
||||
foreach (KeyValuePair<NMSheetSymbol, NMSheetSingleOptionData> p in data._sym_data_map)
|
||||
main_data_map.Add(p.Key, NMSheetSingleOptionData.filter_data(p.Value, restricted_seckey_map));
|
||||
return new NMSheetData(main_data_map, data._bbo_map, data._complete_ticker_data, data._task_data);
|
||||
}
|
||||
|
||||
public NMSheetData filter_for_strikes_in_tasks(bool is_on_only = false)
|
||||
{
|
||||
// if (_task_data != null)
|
||||
|
||||
@@ -63,25 +63,6 @@ namespace BCG {
|
||||
// BlueDataUtility.get_row_value<double>(kvp.Value, "ask_price", Double.NaN));
|
||||
}
|
||||
|
||||
public static NMSheetSingleOptionData filter_data(NMSheetSingleOptionData data, HashSet<uint> seckey_map) {
|
||||
ExpStrikeKeyedData<Triplet<mbts.spark.TheoPoint, uint, uint>> theo_data_map = new ExpStrikeKeyedData<Triplet<mbts.spark.TheoPoint, uint, uint>>();
|
||||
foreach (Triplet<DateTime, double, Triplet<mbts.spark.TheoPoint, uint, uint>> t in data._theo_data_map.get_data_linearly())
|
||||
if (seckey_map.Contains(t.third.second) || seckey_map.Contains(t.third.third))
|
||||
theo_data_map.set_data(t.first, t.second, t.third);
|
||||
HashSet<NMSheetExpiration> exp_map = new HashSet<NMSheetExpiration>(theo_data_map.get_expirations().Select(exp => new NMSheetExpiration(data._nmsheet_option.option_exchange, data._nmsheet_option.option_name, exp)));
|
||||
NMSheetDataRequest req = NMSheetDataRequest.restrict_for_expirations(data._data_request, exp_map);
|
||||
Dictionary<DateTime, NMSheetDriverData> driver_data = new Dictionary<DateTime, NMSheetDriverData>();
|
||||
foreach (KeyValuePair<DateTime, NMSheetDriverData> p in data._option_exp_driver_data)
|
||||
if (exp_map.Contains(new NMSheetExpiration(data._nmsheet_option, p.Key)))
|
||||
driver_data.Add(p.Key, p.Value);
|
||||
return new NMSheetSingleOptionData(data._nmsheet_option, req, theo_data_map,
|
||||
driver_data, data._theo_shift_map, data._atm_data_map,
|
||||
data._roll_over_data, data._position_map, data._presaved_aw2_theos, data._option_exp_driver_rows, data._sec_map, data._settings) {
|
||||
_bbo_data_map = data._bbo_data_map,
|
||||
_ticker_data = data._ticker_data,
|
||||
};
|
||||
}
|
||||
|
||||
public static double theo(TheoPoint tp, PutOrCall cp, NMSheetSettings settings) {
|
||||
bool use_fwd_normalized = settings != null && settings.setting_layout.show_forward_mormalized_theos;
|
||||
if (use_fwd_normalized)
|
||||
@@ -289,4 +270,4 @@ namespace BCG {
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -45,18 +45,6 @@ namespace BCG {
|
||||
return rv;
|
||||
}
|
||||
|
||||
public static void get_details(string bts_spread_def, out string spread_detail, out string spread_summary, out string spread_type,
|
||||
out string expirations, out string strikes, out double n_contracts, out string leg_ratio) {
|
||||
string symbol;
|
||||
List<string> symbols;
|
||||
SingleSpreadLeg[] legs;
|
||||
Type spread_type_type;
|
||||
SpreadInterpreter.interpret(ContractUtilities.add_offset_to_spreadleg_exps(bts_spread_def), out symbol, out symbols, out legs, out spread_detail, out spread_summary, out spread_type, out spread_type_type);
|
||||
expirations = get_expirations(legs);
|
||||
strikes = get_strikes(legs);
|
||||
get_leg_ratios(legs, out n_contracts, out leg_ratio);
|
||||
}
|
||||
|
||||
public static string get_expirations(SingleSpreadLeg[] legs) {
|
||||
string rv = String.Empty;
|
||||
foreach (SingleSpreadLeg l in legs)
|
||||
|
||||
Reference in new issue
Block a user