Hi, 

Any reason why the number of sp500 constituents drop over time maybe the way i'm calling it's not good.

Thanks for your help 


class StandardizedUnexpectedEarnings(QCAlgorithm):
 
    def Initialize(self):
        
        self.SetStartDate(2020, 3, 1)                               # Set Start Date. Warm up for first 36 months
        self.SetEndDate(2024, 6, 6)                                 # Set End Date
        self.SetCash(100000)                                        # Set Strategy Cash

        self.add_universe_selection(
            ETFConstituentsUniverseSelectionModel("SPY", universe_filter_func=self.etf_constituents_filter)
        )
        
    def etf_constituents_filter(self, constituents: List[ETFConstituentUniverse]) -> List[Symbol]:
    
        if self.time.month == self.month:
            return Universe.Unchanged
        self.month = self.time.month
        self.debug(self.time)
        self.debug(len(list(constituents)))
        return  Universe.Unchanged

That my logs output :

2020-03-01 00:00:00 504
2020-04-01 00:00:00 503
2020-05-01 00:00:00 504
2020-07-01 00:00:00 505
2020-08-01 00:00:00 504
2020-11-03 00:00:00 503
2021-04-01 00:00:00 504
2021-05-01 00:00:00 503
2021-07-01 00:00:00 502
2021-08-03 00:00:00 501
2022-03-01 00:00:00 500
2022-04-01 00:00:00 1000
2022-05-03 00:00:00 498
2022-11-01 00:00:00 496
2022-12-01 00:00:00 497
2023-01-04 00:00:00 496
2023-02-01 00:00:00 497
2023-03-01 00:00:00 496
2023-04-01 00:00:00 497
2023-06-01 00:00:00 498
2023-07-01 00:00:00 497
2023-09-01 00:00:00 496
2023-11-01 00:00:00 495
2024-04-02 00:00:00 496
2024-05-01 00:00:00 495