Normalize Date timezone (#8420)

* First draft of the solution

* Add unit test

* Nit change
This commit is contained in:
Ricardo Andrés Marino Rojas
2024-11-25 15:44:22 -05:00
committed by GitHub
parent 469d960f50
commit 5ac7d00e24
4 changed files with 59 additions and 16 deletions
@@ -35,7 +35,7 @@ class BaseFrameworkRegressionAlgorithm(QCAlgorithm):
# With this procedure, the Alpha Model will experience multiple universe changes
self.add_universe_selection(ScheduledUniverseSelectionModel(
self.date_rules.every_day(), self.time_rules.midnight,
lambda dt: symbols if dt.replace(tzinfo=None) < self.end_date - timedelta(1) else []))
lambda dt: symbols if dt < self.end_date - timedelta(1) else []))
self.set_alpha(ConstantAlphaModel(InsightType.PRICE, InsightDirection.UP, timedelta(31), 0.025, None))
self.set_portfolio_construction(EqualWeightingPortfolioConstructionModel())