Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Carver committed Mar 5, 2024
1 parent 36bb315 commit 05184ea
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
18 changes: 17 additions & 1 deletion sysinit/futures/check_instrument_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from syscore.interactive.progress_bar import progressBar
from sysproduction.data.prices import diagPrices
from sysproduction.data.instruments import diagInstruments
from systems.provided.rob_system.run_system import futures_system ## replace with your own

diag_prices = diagPrices()

Expand Down Expand Up @@ -63,4 +64,19 @@ def check_for_zero_commission():
if commission==0:
zero_warnings.append(instrument_code)

return zero_warnings
return zero_warnings

def print_missing_and_no_trade_markets():
system =futures_system()
all_instruments =system.data.get_instrument_list()
duplicates = system.get_list_of_duplicate_instruments_to_remove()
ignored = system.get_list_of_ignored_instruments_to_remove()
all_instruments_without_duplicates = [instrument_code for instrument_code in all_instruments if instrument_code not in duplicates and instrument_code not in ignored]

configured_in_system = list(system.config.instrument_weights.keys()) ## not all will be traded

missing= [instrument_code for instrument_code in all_instruments_without_duplicates if instrument_code not in configured_in_system]
missing.sort()

print("Missing: %s" % missing)
print("No trade: %s" % system.get_list_of_markets_with_trading_restrictions())
8 changes: 6 additions & 2 deletions systems/provided/rob_system/run_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@


def futures_system(
sim_data=arg_not_supplied, config_filename="systems.provided.rob_system.config.yaml"
sim_data=arg_not_supplied, config_filename="systems.provided.rob_system.config.yaml",
rules = arg_not_supplied
):
if sim_data is arg_not_supplied:
sim_data = dbFuturesSimData()

config = Config(config_filename)

if rules is arg_not_supplied:
rules = Rules()

system = System(
[
Risk(),
Expand All @@ -44,7 +48,7 @@ def futures_system(
myFuturesRawData(),
ForecastCombine(),
volAttenForecastScaleCap(),
Rules(),
rules,
],
sim_data,
config,
Expand Down

0 comments on commit 05184ea

Please sign in to comment.