Skip to content

Commit

Permalink
Merge branch 'master' of github.com:cvxgrp/cvxportfolio
Browse files Browse the repository at this point in the history
  • Loading branch information
enzbus committed Jan 2, 2024
2 parents fa6faab + 4b189f1 commit b4471d4
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 b4471d4

Please sign in to comment.