Add TODO for sanitizing the start and end dates

This commit is contained in:
moshferatu 2024-01-19 07:57:39 -08:00
parent 02763460cf
commit e4bb364e11

View File

@ -358,6 +358,7 @@ def backtest_iron_condor(
file_date_str = os.path.splitext(file)[0] file_date_str = os.path.splitext(file)[0]
file_date = datetime.strptime(file_date_str, '%Y-%m-%d') file_date = datetime.strptime(file_date_str, '%Y-%m-%d')
# TODO: This doesn't work as expected when the start date is not set to midnight.
if file_date < start_date or file_date > end_date: if file_date < start_date or file_date > end_date:
continue continue