Skip to content

Commit

Permalink
Merge branch 'backtest_improve' of github.com:microsoft/qlib into bac…
Browse files Browse the repository at this point in the history
…ktest_improve
  • Loading branch information
you-n-g committed Oct 15, 2021
2 parents ac08468 + df9745f commit b3b5cb0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions qlib/contrib/strategy/order_generator.py
Expand Up @@ -80,6 +80,9 @@ def generate_order_list_from_target_weight_position(
:rtype: list
"""
if target_weight_position is None:
return []

# calculate current_tradable_value
current_amount_dict = current.get_stock_amount_dict()

Expand Down Expand Up @@ -164,6 +167,9 @@ def generate_order_list_from_target_weight_position(
:rtype: list of generated orders
"""
if target_weight_position is None:
return []

risk_total_value = risk_degree * current.calculate_value()

current_stock = current.get_stock_list()
Expand Down

0 comments on commit b3b5cb0

Please sign in to comment.