def make_future_info(first_sid, root_symbols, years, notice_date_func, expiration_date_func, start_date_func, month_codes=None):
 if (month_codes is None):
  month_codes = CME_CODE_TO_MONTH
 year_strs = list(map(str, years))
 years = [pd.Timestamp(s, tz='UTC') for s in year_strs]
 contract_suffix_to_beginning_of_month = tuple((((month_code + year_str[(-2):]), (year + MonthBegin(month_num))) for ((year, year_str), (month_code, month_num)) in product(zip(years, year_strs), iteritems(month_codes))))
 contracts = []
 parts = product(root_symbols, contract_suffix_to_beginning_of_month)
 for (sid, (root_sym, (suffix, month_begin))) in enumerate(parts, first_sid):
  contracts.append({'sid': sid, 'root_symbol': root_sym, 'symbol': (root_sym + suffix), 'start_date': start_date_func(month_begin), 'notice_date': notice_date_func(month_begin), 'expiration_date': notice_date_func(month_begin), 'multiplier': 500, 'exchange': 'TEST', 'exchange_full': 'TEST FULL'})
 return pd.DataFrame.from_records(contracts, index='sid')

def make_future_info ( first_sid , root_symbols , years , notice_date_func , expiration_date_func , start_date_func , month_codes = None ) : if ( month_codes is None ) : month_codes = CME_CODE_TO_MONTH year_strs = list ( map ( str , years ) ) years = [ pd . Timestamp ( s , tz = 'UTC' ) for s in year_strs ] contract_suffix_to_beginning_of_month = tuple ( ( ( ( month_code + year_str [ ( - 2 ) : ] ) , ( year + MonthBegin ( month_num ) ) ) for ( ( year , year_str ) , ( month_code , month_num ) ) in product ( zip ( years , year_strs ) , iteritems ( month_codes ) ) ) ) contracts = [ ] parts = product ( root_symbols , contract_suffix_to_beginning_of_month ) for ( sid , ( root_sym , ( suffix , month_begin ) ) ) in enumerate ( parts , first_sid ) : contracts . append ( { 'sid' : sid , 'root_symbol' : root_sym , 'symbol' : ( root_sym + suffix ) , 'start_date' : start_date_func ( month_begin ) , 'notice_date' : notice_date_func ( month_begin ) , 'expiration_date' : notice_date_func ( month_begin ) , 'multiplier' : 500 , 'exchange' : 'TEST' , 'exchange_full' : 'TEST FULL' } ) return pd . DataFrame . from_records ( contracts , index = 'sid' )
create a dataframe representing futures for root_symbols during year .