zhugf / java-trader Goto Github PK
View Code? Open in Web Editor NEWJava Future trader CTP FEMAS XTP
License: Apache License 2.0
Java Future trader CTP FEMAS XTP
License: Apache License 2.0
谢谢
希望能建立<合约详情数据库>,用于复杂回测(期货主力合约回测,期权回测等)
参考:
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'
}
回测场景
eg:
股票:订阅指定板块的个股,个股会随着时间变化,尽管是缓慢变化的
期货:订阅指数合约同时订阅主力合约,主力合约随着时间变化
支持在期货指数数据上进行策略运算,在主力合约上下单
期权:往往只需要指定标的资产/到期月份,就可以订阅一系列期权合约,也是随着时间变化的
标的的动态订阅/退订,用于回测&实盘
尤其是期权回测,标的必须能动态变更,而不是在开始的时候就固定不变
批量订阅----回测/实盘时,根据<标的Filter规则>和<实际可订阅标的列表>来
退订分为:
a.自动退订(标的到期or退市)
b.主动退订(满足某些条件,该标的不具有再开仓的价值了,可退订,eg:持有的头寸平仓,不再交易该标的了;期货标的接近交割月,可退订;...)
希望能支持期权数据(商品的,ETF50的),谢谢!
希望能增加 mac 支持
同时希望在打 jar 包的时候,把 java source code 打进去,方便 debug
如题
你打算怎么支持XTP?
支持期货指数数据,eg:通达信的IFL9/IHL9/ICL9
支持在期货指数数据上进行策略运算,在主力合约上下单!!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.