I've been setting the date range of my backtests like the following:

def Initialize(self):
        self.SetStartDate(2022, 11, 1)  # Set Start Date
        self.SetEndDate(2022, 11, 30)  # Set End Date

which would run a backtest for the month of November 2022. I'm curious if there is a simple way to set the backtest date range to the month of November, without having to look up the specific end date of the month? For instance, if I try to set the end date as the 31st it gives an error (which, if it didn't give an error, I could just leave it like that for each month). I would like to do this as I usually run my backtests one month at a time for various reasons (in case a specific month gives an error the whole backtest won't be messed up, overcome the daily log limit, run backtests using two backtest nodes), and it's a bit annoying to have to look up the dates every time. Thanks. 

 

Author