I am trying to get a list of historical trading days. This is to assist in looking up historical fundamental data at a specific frequency, rather than checking every day of historical data. By getting a list of trading days, I also avoid holidays.

Attached is the backtest I have tried. I have also tried replacing GetTradingDays with GetDaysByType, as shown here. Someone has a python implementation at the bottom of the thread here, but I can't see why mine does not work since it is an almost identical setup.

Any help is appreciated.