The two most relevant flags are:
marketable_enrollable_course_runs_with_archived will include course runs whose start date has passed and whose end date is in the future
The course end date is not taken into consideration
marketable_course_runs_only will include course runs whose course end date and enrollment end date are in the future
The problem is that while we can use these flags to get the course runs of archived courses, these will not get archived course runs, ie runs whose enrollment dates have passed.