Skip to content

Commit

Permalink
strategy_executor fix; wrongly recomputed target weights on market ho…
Browse files Browse the repository at this point in the history
…liday
  • Loading branch information
enzbus committed Jan 2, 2024
1 parent 96daaf7 commit 4b189f1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/strategies/strategy_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,11 @@ def run_execute_strategy(self):
:raises ValueError: If there are no hyper-parameters available.
"""

if self.today in self.all_target_weights:
logger.info(
"Already computed weights for last trading day, aborting.")
return

if len(self.all_hyper_params) < 1:
raise ValueError('Empty hyper-parameters file!')
hp_index = sorted(self.all_hyper_params.keys())[-1]
Expand Down

0 comments on commit 4b189f1

Please sign in to comment.