QuantBox.DataSimulator
直接读取QuantBox.Data数据进行回测的工具
Install / Use
/learn @QuantBox/QuantBox.DataSimulatorREADME
QuantBox.DataSimulator 数据模拟器
##介绍 很多客户有自己的历史数据文件或数据源,但每次将历史数据导入到OpenQuant中是一件很麻烦的事情,如果能直接读取数据文件进行回测不就很方便了。所以我们在这提供了一种直接读取数据进行回测的方法。<br/>
##依赖库
- 7z库:SevenZipSharp.dll、7z64.dll、7z.dll
- QuantBox.Data项目:QuantBox.Data.Serializer.dll,protobuf-net.dll https://github.com/QuantBox/QuantBox.Data
使用方法
- Data.zip是测试用的数据,先解压
- 将QuantBox.DataSimulator.dll以及上面的几个依赖库复制到OpenQuant2014的安装目录下
- 给项目添加QuantBox.DataSimulator.dll引用
- 在用来回测或优化的项目中的Scenario中添加如下
解释
- GetProvider(50)是因为FileDataSimulator中默认设的是50
- DataPath是数据目录路径,里面的文件夹名是合约名如IF1509,文件夹中的文件中的日期就是数据的交易日
- 很多时候合约列表中添加合约太麻烦,自己又是只是回测的时候临时用一下,用BacktestInstrumentServer.AddDirectoryInstrument可以根据指定文件夹下的子文件夹创建对应的合约
其它
- 有兴趣的可以改成一个读取通达信行情文件的版本
- 读取文本和数据库也是可以实现的
Related Skills
node-connect
351.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
