Loading ...

能否完善回测系统的品种种类

Author: edwardgyw, Created: 2016-03-24 20:46:27, Updated: 2019-08-01 10:51:02

近期有考虑将策略移植到更多品种的交易中,但无奈 发明者量化 没有提供商品期货或股票的回测数据,甚至准备退而求其次去其他量化平台上搞一搞了, 所以如果不是很麻烦的话,z大能不能抽点时间充实下更多种类的k线历史数据,比如从tushare,wind之类的开放平台弄一些数据回来,供大家回测使用,另外商品期货的交易广场上没有例子,希望z大有机会也可以写两个供大家参考


More

Zero 商品期货有的,可以回测的,SetContractType以后再GetTicker之类的就能获取了, 股票的数据暂时没有,近期正在准备架构这个事, 多谢意见。

韩诺她 什么时候把ok季度合约的回测数据加上去?

Zero 简单实例代码 ``` function main() { var insDetail = exchange.SetContractType('MA609'); // 这里做好重试, 登录到CTP前这个函数会失败的 Log(insDetail); Log("合约", insDetail.InstrumentName, "一手", insDetail.VolumeMultiple, "份, 最大下单量", insDetail.MaxLimitOrderVolume, "保证金率:", insDetail.LongMarginRatio, insDetail.ShortMarginRatio, "交割日期", insDetail.StartDelivDate); Log(exchange.GetTicker()); } ``` 实盘结果 ``` 2016-03-24 22:08:43 信息 {"High":1970,"Low":1948,"Sell":1961,"Buy":1960,"Last":1960,"Volume":49386,"Time":1458828523235} 2016-03-24 22:08:43 信息 合约 甲醇9月 一手 10 份, 最大下单量 1000 保证金率: 0.06999999999999999 0.06999999999999999 交割日期 20160914 2016-03-24 22:08:43 信息 {"CombinationType":48,"CreateDate":"20150917","DeliveryMonth":9,"DeliveryYear":2016,"EndDelivDate":"20160914","ExchangeID":"CZCE","ExchangeInstID":"MA609","ExpireDate":"20160914","InstLifePhase":49,"InstrumentID":"MA609","InstrumentName":"甲醇9月","IsTrading":1,"LongMarginRatio":0.06999999999999999,"MaxLimitOrderVolume":1000,"MaxMarginSideAlgorithm":48,"MaxMarketOrderVolume":1000,"MinLimitOrderVolume":1,"MinMarketOrderVolume":1,"OpenDate":"20150917","OptionsType":0,"PositionDateType":50,"PositionType":50,"PriceTick":1,"ProductClass":49,"ProductID":"MA","ShortMarginRatio":0.06999999999999999,"StartDelivDate":"20160914","StrikePrice":0,"UnderlyingInstrID":"","UnderlyingMultiple":1,"VolumeMultiple":10} ```

edwardgyw 正在测试,数据很完整准确啊,超级赞!