Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
bug-or-feature committed Jan 24, 2024
1 parent 330696a commit ed6dc54
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions sysexecution/stack_handler/roll_orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,14 +472,17 @@ def get_strategy_name_with_largest_position_for_instrument(
)

try:
strategy_name = all_instrument_positions.strategy_name_with_largest_abs_position_for_instrument(
instrument_code
)
strategy_name = all_instrument_positions.strategy_name_with_largest_abs_position_for_instrument(
instrument_code
)
except:
## corner case where nets out to 0
strategies = diag_positions.get_list_of_strategies_with_positions()
strategy_name = strategies[0]
data.log.debug("No strategies have net positions in %s, using arbitrary strategy %s" % (instrument_code, strategy_name))
data.log.debug(
"No strategies have net positions in %s, using arbitrary strategy %s"
% (instrument_code, strategy_name)
)

return strategy_name

Expand Down

0 comments on commit ed6dc54

Please sign in to comment.