def get_market_index(symbol_list): var = md.get_last_market_index(mtsymbol_list(symbol_list)) var = to_pd(var, 'symbol') return var
#按时间周期提取ShareIndex r = md.get_share_index('SHSE.600000', '2015-12-01 09:30:00', '2016-01-08 12:00:00') print('get_share_index', len(r)) #提取快照, 即最新的ShareIndex r = md.get_last_share_index('SHSE.600000,SZSE.000001') print('get_last_share_index', len(r)) #提取最近n条ShareIndex r = md.get_last_n_share_index('SHSE.600000', 5) print('get_last_n_share_index', len(r)) #按时间周期提取MarketIndex r = md.get_market_index('SHSE.600000', '2015-12-01 09:30:00', '2016-01-08 12:00:00') print('get_market_index', len(r)) #提取快照, 即最新的MarketIndex r = md.get_last_market_index('SHSE.600000,SZSE.000001') print('get_last_market_index', len(r)) #提取最近n条MarketIndex r = md.get_last_n_market_index('SHSE.600000', 5) print('get_last_n_market_index', len(r)) #提取交易日历 r = md.get_calendar('SHSE', '2016-01-00', '2016-03-16') print('get_calendar', len(r)) input()