Skip to main content

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

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vxquant-2022.12.21.tar.gz (80.4 kB view details)

Uploaded Source

Built Distribution

vxquant-2022.12.21-py3-none-any.whl (107.2 kB view details)

Uploaded Python 3

File details

Details for the file vxquant-2022.12.21.tar.gz.

File metadata

  • Download URL: vxquant-2022.12.21.tar.gz
  • Upload date:
  • Size: 80.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.8.13 Darwin/22.2.0

File hashes

Hashes for vxquant-2022.12.21.tar.gz
Algorithm Hash digest
SHA256 02cae895d79ab11e65d75b8b616683459b831c5dfe1fedce7e22210d7f9e62ec
MD5 08d81a54e3c95ac0d38fda4c740677b7
BLAKE2b-256 c9418230a5307a5c12bf4cea56a3011c7fc7ec4fcec8ef211a8ae0bce5c74f1b

See more details on using hashes here.

File details

Details for the file vxquant-2022.12.21-py3-none-any.whl.

File metadata

  • Download URL: vxquant-2022.12.21-py3-none-any.whl
  • Upload date:
  • Size: 107.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.8.13 Darwin/22.2.0

File hashes

Hashes for vxquant-2022.12.21-py3-none-any.whl
Algorithm Hash digest
SHA256 e3663a6c1cecfcbaa19f68d2e4d2bc51b9d2f040a6a8b578059db35b609609d0
MD5 5157fb73b67984909e0641dfc4b2b5de
BLAKE2b-256 d6e3b0569770c5cfadec3d828a817ba03963e2ada9a8755324102c9addd22bd6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page