Skip to main content

股票量化代码,包括通过qmt、同花顺问题和东财api等获取金融数据,以及处理量化这些数据。

查看库中的函数文档,请前往:https://wd.sanrenjz.com/yuhanbolh/about

代码是从多个渠道获取金融数据,在运行过程中提示没有什么模块,就用pip安装什么模块。 但迅投的xtdata和xttrade是不能通过pip安装的,需要把官网http://dict.thinktrader.net/nativeApi/download_xtquant.html 下载,然后放到python的...\Lib\site-packages路径中。

需要证券开户开QMT的可以联系我,微信:yuhanbo758

联系我们

主站:三人聚智-余汉波 - QMT量化、效率工具和财经知识的搬运工

程序小店(个人开发的所有程序,包括开源和不开源):首页 | 三人聚智-余汉波程序小店

文档站点(财经、代码和库文档等):余汉波 文档 | 财经、python与效率工具的知识搬运工

python 程序管理工具下载:sanrenjz - 三人聚智-余汉波

三码合一

余汉波打赏码

schedule akshare scipy yfinance pywencai baostock pytdx MetaTrader5 yuhanbolh

安装

python -m pip install --upgrade yuhanbolh

项目不再锁死 NumPy 与 pandas 的补丁版本,当前兼容范围为 numpy>=1.26.4pandas>=2.2.2,并通过 NumPy 2.x 与 pandas 3.x 回归测试。需要在 Jupyter 中使用时,可安装 Notebook 可选依赖:

python -m pip install --upgrade "yuhanbolh[notebook]"

ipykernel 7 与 Spyder 自带的 spyder-kernels 2.x/3.x 当前存在上游约束冲突 (后者要求 ipykernel<7)。请把最新版 Jupyter 内核放在独立虚拟环境中;若必须 使用 Spyder 控制台,则应遵循 Spyder 的环境要求保留 ipykernel 6.x。这不是 yuhanbolh 的运行依赖冲突。

QMT 的 xtquant 仍需按迅投官方方式安装。包入口已改为按需加载,因此只使用 技术指标、SQLite 等功能时,不会因为缺少 xtquant 而无法导入 yuhanbolh

自动发布到 PyPI

仓库的 .github/workflows/publish.yml 会在代码推送到 main 后自动完成以下操作:

  1. 查询 PyPI 上 yuhanbolh 的当前版本。
  2. 按每位逢十进一的规则生成下一版本,例如 0.6.8 → 0.6.9 → 0.7.0
  3. 构建并校验 wheel 和源码发行包。
  4. 自动提交 setup.py 中的新版本、创建 v版本号 标签并发布到 PyPI。

首次使用前,需要在 GitHub 仓库中完成一次配置:

  1. 打开 Settings → Secrets and variables → Actions,新增仓库 Secret:PYPI_API_TOKEN
  2. Secret 的值填写从 PyPI Account settings → API tokens 创建的 API Token(建议限定到 yuhanbolh 项目)。
  3. 打开 Settings → Actions → General → Workflow permissions,选择 Read and write permissions

自动生成的版本提交带有 [skip ci],不会递归触发下一次发布。

Download files

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

Source Distribution

yuhanbolh-0.6.3.tar.gz (66.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yuhanbolh-0.6.3-py3-none-any.whl (68.1 kB view details)

Uploaded Python 3

File details

Details for the file yuhanbolh-0.6.3.tar.gz.

File metadata

  • Download URL: yuhanbolh-0.6.3.tar.gz
  • Upload date:
  • Size: 66.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for yuhanbolh-0.6.3.tar.gz
Algorithm Hash digest
SHA256 c304996450ea586305fc2efead0e08327cdb7a6170d774720baac0c9f5e17665
MD5 7ef57793955cde823ef82bf35bc1edbd
BLAKE2b-256 78471214718be1e5bc5ffb30c55cadef2120c2a5e2ecb3323fa50b213cf3f35e

See more details on using hashes here.

File details

Details for the file yuhanbolh-0.6.3-py3-none-any.whl.

File metadata

  • Download URL: yuhanbolh-0.6.3-py3-none-any.whl
  • Upload date:
  • Size: 68.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for yuhanbolh-0.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2fd20946e495401ab219165ff784523f6997b0409fbbf8d487584f9c5bbe18ae
MD5 2e65b1c16b053bbbfb42f241e251ed07
BLAKE2b-256 25ecc1710d5365dbbc58439eb9d07e4a48090c6a2b0bf26b3f96224130a552e9

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.6

2 files

0.6.5

2 files

0.6.4

2 files

This release

0.6.3 This release

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.0

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.9

2 files

0.3.7

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.2.1

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page