Code Monkey home page Code Monkey logo

engine's Introduction

Quant1X-Engine

量化交易(数据类)引擎

1. 设计原则

  • 更新历史数据,盘后更新历史数据
  • 回补历史数据,对于新增特征组合或者因子要能回补历史数据,以便回测
  • 盘中更新数据,盘中决策很重要,特征组合要有根据5档行情即时数据进行增量计算的能力
  • 缓存数据必须具备按照日期切换的功能

2. 模块划分

级别 模块 功能 盘中更新数据 更新当日数据 回补历史数据
0 cache 数据缓存 [ √ ] [ √ ] [ √ ]
0 datasets 数据集, 基础数据 [ X ] [ √ ] [ √ ]
0 factors 量化因子 [ X ] [ √ ] [ √ ]
0 features 特征 [ X ] [ √ ] [ √ ]
0 tracker 回测 [ X ] [ X ] [ X ]

3. 使用示例

3.1 更新数据

engine update --all

3.2 补登历史特征数据

engine repair --features=history --start=20230101

3.3 执行1号策略

engine --strategy=1

4. 协同开发

4.1 git仓库规则

4.1.1 分支规则

主库的分支分 master分支子版本分支

级别 分类 说明 示例
0 master 主线版本分支
1 {Major}.{Minor}.x 子版本分支 主版本1,子版本2, 分支为1.2.x

4.1.2 tag规则

  • tag只有一条, 小写字母v开头, 然后依次是主版本号、子版本号和修订版本号, 中间用“.”分隔。
  • 格式:
v${Major}.${Minor}.${Revision}

4.2 约定

级别 分类 单项 说明 示例
0 关键词 securityCode 完整的证券代码,格式:{MARKET_ID}{CODE} 上证指数: sh000001
永鼎股份: sh600105
鼎汉技术: sz300011
0 关键词 date 字符串类型的日期, 代表当前处理的日期, 可以是常见的任何格式, 默认为YYYY-MM-DD 2023-10-16
0 关键词 cacheDate 数据的缓存日期, 可以是常见的任何格式, 默认为YYYY-MM-DD 2023-10-16
0 关键词 featureDate 数据的特征日期, 可以是常见的任何格式, 默认为YYYY-MM-DD。cacheDate代表的是缓存文件, featureDate代表的是数据, 大多数的情况下, 前者是后者的下一个交易日 2023-10-16

4.3 协同开发流程

  • fork项目到自己的git仓库
  • 先提issue, 再实现、测试
  • 提交PR
  • PR审核, 不通过, 驳回
  • PR审核, 通过, 按照不同的issue级别, 合并当前次级版本分支, 并发布版本

4.4 开发中的问题

  • go test won't build: Call has possible formatting directive, 出现这个问题是因为test时会进行vet校验, 关闭(-vet=off)即可

engine's People

Contributors

mymmsc avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.