java-trader
java-trader copied to clipboard
希望能建立<合约详情数据库>
希望能建立<合约详情数据库>,用于复杂回测(期货主力合约回测,期权回测等)
参考: CTP合约信息API https://www.vnpy.com/forum/topic/4358
TdApi.reqQryInstrument()函数,返回的部分字段(顺序有调整): { //-----------------------------------以下是<合约详情>,固定的----可以写入数据库中! 'InstrumentID': 'rb2010', 'ExchangeID': 'SHFE', 'InstrumentName': '螺纹钢2010', 'ExchangeInstID': 'rb2010', 'ProductID': 'rb', 'ProductClass': '1',
'UnderlyingInstrID': '',
'StrikePrice': 0.0,
'OptionsType': '\x00',
'UnderlyingMultiple': 0.0,
'VolumeMultiple': 10,
'PriceTick': 1.0,
'DeliveryYear': 2020,
'DeliveryMonth': 10,
'CreateDate': '20190912',
'OpenDate': '20191016',
'ExpireDate': '20201015',
'StartDelivDate': '20201016',
'EndDelivDate': '20201022',
//-----------------------------------以下是状态量,变化的----也可以入库,但分成多条记录入库!
'IsTrading': 1,
'InstLifePhase': '1',
'MaxMarketOrderVolume': 30,
'MinMarketOrderVolume': 1,
'MaxLimitOrderVolume': 500,
'MinLimitOrderVolume': 1,
'LongMarginRatio': 0.1,
'ShortMarginRatio': 0.1,
'MaxMarginSideAlgorithm': '1',
'PositionType': '2',
'PositionDateType': '1',
'CombinationType': '0'
}
会在最近加入这个功能