#region imports from AlgorithmImports import * #endregion # 05/19/2023: -Updated universe selection timing to run at the start of each month. # -Updated the portfolio rebalancing to occur at 9:31 AM on the first trading day of each month. # -Added OnWarmupFinished to liquidate existing holdings that aren't backed by active insights. # -Removed flat insights because https://github.com/QuantConnect/Lean/pull/7251 made them unnecessary. # https://www.quantconnect.com/terminal/processCache?request=embedded_backtest_cc58f591c6fba4be8cd3fdd9db9feceb.html # # 05/24/2023: -Updated universe selection timing so that the first trading day of each month always has the latest universe already selected. # Before this change, if the first trading day of the month was a Monday, the universe selection would run on Tuesday morning, # cancelling some of the month's insights during warm-up. # https://www.quantconnect.com/terminal/processCache?request=embedded_backtest_186c27da47cef216c5e54565a3eafaea.html # # 06/02/2023: -Replaced OnWarmupFinished and its associated Insight creation with Liquidate in OnData to ensure the algorithm exits # positions that aren't backed by active insights. # https://www.quantconnect.com/terminal/processCache?request=embedded_backtest_159dd766b146580ab689cc8870a06669.html # # 07/03/2023: -Removed the SymbolData class in the Alpha model in favor of directly adding members to the Security object # https://www.quantconnect.com/terminal/processCache?request=embedded_backtest_6f0cd1ed85d776802a9e8d5b01839afe.html # # 04/15/2024: -Updated to PEP8 style # https://www.quantconnect.com/terminal/processCache?request=embedded_backtest_f82f194ebf34adab550a2bcc32a98fc9.html