1 Star 0 Fork 1

vxquant / vxquant

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

vxquant

介绍

一个简单、易用、面向中国股市实盘的python量化交易框架

模块架构

vxquant 包括以下三个模块:

  1. vxquant -- 量化交易中的标准化组件
  2. vxsched -- 基于事件驱动的调度器实现
  3. vxutils -- 各种常用的python小功能

安装教程

  1. 通过 pip 安装
    pip install vxquant
  1. 通过源代码安装
    git clone https://gitee.com/vxquant/vxquant && cd  vxquant/
    pip install .

使用说明

  1. 策略文件目录
# 配置文件存放在 etc/ 目录中
etc/config.json
# 日志文件存放在 log/ 目录中
log/vxquant.log
# 策略文件存放在 mod/ 目录中
mod/
    demo1.py
    demo2.py
    demo3.py
  1. demo1.py
"""策略demo 1 """

from vxsched import vxengine, vxEvent, vxContext, logger


@vxengine.event_handler("__init__")
def demo1_init(context: vxContext, event: vxEvent) -> None:
    """策略初始化"""
    logger.info(f"title内容: {context.settings.title}")


@vxengine.event_handler("every_tick")
def demo1_every_tick(context: vxContext, event: vxEvent) -> None:
    """每个tick事件触发"""
    logger.info(f"触发时间: {event.type}")
  1. 运行策略

python -m vxsched -s worker -c etc/config.json -m mod/

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request
MIT License Copyright (c) 2022 vex1023 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

一个简单、易用、面向中国股市实盘的python量化交易框架 展开 收起
Python
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/vxquant/vxquant.git
git@gitee.com:vxquant/vxquant.git
vxquant
vxquant
vxquant
master

搜索帮助