Пример #1
0
def get_last_financial_index(symbol_list):
    var = md.get_last_financial_index(mtsymbol_list(symbol_list))
    var = to_pd(var,'symbol')
    return var
Пример #2
0
print('get_instruments: ', len(r))

#根据期货品种提取交易代码
r = md.get_instruments_by_name('ag')
print('get_instruments_by_name', len(r))

#提取指数的成分股代码
r = md.get_constituents('SHSE.000001')
print('get_constituents', len(r))

#按时间周期提取FinancialIndex
r = md.get_financial_index('SHSE.600000', '2010-12-01 09:30:00', '2016-01-08 12:00:00')
print('get_financial_index', len(r))

#提取快照, 即最新的FinancialIndex
r = md.get_last_financial_index('SHSE.600000,SZSE.000001')
print('get_last_financial_index', len(r))

#提取最近n条FinancialIndex
r = md.get_last_n_financial_index('SHSE.600000', 5)
print('get_last_n_financial_index', len(r))

#按时间周期提取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
Пример #3
0
def get_last_financial_index(symbol_list):
    var = md.get_last_financial_index(mtsymbol_list(symbol_list))
    var = to_pd(var, 'symbol')
    return var