def make_commodity_future_info(first_sid, root_symbols, years, month_codes=None):
 nineteen_days = pd.Timedelta(days=19)
 one_year = pd.Timedelta(days=365)
 return make_future_info(first_sid=first_sid, root_symbols=root_symbols, years=years, notice_date_func=(lambda dt: ((dt - MonthBegin(2)) + nineteen_days)), expiration_date_func=(lambda dt: ((dt - MonthBegin(1)) + nineteen_days)), start_date_func=(lambda dt: (dt - one_year)), month_codes=month_codes)

def make_commodity_future_info ( first_sid , root_symbols , years , month_codes = None ) : nineteen_days = pd . Timedelta ( days = 19 ) one_year = pd . Timedelta ( days = 365 ) return make_future_info ( first_sid = first_sid , root_symbols = root_symbols , years = years , notice_date_func = ( lambda dt : ( ( dt - MonthBegin ( 2 ) ) + nineteen_days ) ) , expiration_date_func = ( lambda dt : ( ( dt - MonthBegin ( 1 ) ) + nineteen_days ) ) , start_date_func = ( lambda dt : ( dt - one_year ) ) , month_codes = month_codes )
make futures testing data that simulates the notice/expiration date behavior of physical commodities like oil .