def gen_calendars(start, stop, critical_dates):
 all_dates = pd.date_range(start, stop, tz='utc')
 for to_drop in map(list, powerset(critical_dates)):
  (yield (all_dates.drop(to_drop),))
 trading_days = get_calendar('NYSE').all_days
 (yield (trading_days[trading_days.slice_indexer(start, stop)],))

def gen_calendars ( start , stop , critical_dates ) : all_dates = pd . date_range ( start , stop , tz = 'utc' ) for to_drop in map ( list , powerset ( critical_dates ) ) : ( yield ( all_dates . drop ( to_drop ) , ) ) trading_days = get_calendar ( 'NYSE' ) . all_days ( yield ( trading_days [ trading_days . slice_indexer ( start , stop ) ] , ) )
generate calendars to use as inputs .