缠论技术分析库 — Rust 高性能实现
Project description
chanlun — 缠论技术分析 Python 绑定
基于 chanlun Rust 核心库的 PyO3 高性能 Python 绑定,API 与 chan.py 完全兼容。
安装
pip install chanlun
快速开始
import chanlun
# 创建配置(全部默认值)
config = chanlun.缠论配置()
# 读取 K 线数据文件,创建观察者
obs = chanlun.观察者.读取数据文件("path/to/data.nb", config)
# 查看各层级序列
print(f"K线数量: {len(obs.普通K线序列)}")
print(f"笔数量: {len(obs.笔序列)}")
print(f"线段数量: {len(obs.线段序列)}")
print(f"中枢数量: {len(obs.中枢序列)}")
# 或使用立体分析器进行多周期分析
analyzer = chanlun.立体分析器("BTCUSD", ["1min", "5min", "30min"], config)
# 逐根投喂 K 线...
从源码构建
pip install maturin
# 开发模式(直接安装到当前 venv)
maturin develop
# 或构建 wheel
maturin build --release
pip install target/wheels/chanlun-*.whl
也可使用项目内的 build.sh:
./build.sh develop # 开发安装
./build.sh wheel # 构建 wheel
./build.sh test # 运行集成测试
导出类
| 类别 | 类名 | 说明 |
|---|---|---|
| 枚举 | 买卖点类型, 相对方向, 分型结构 |
缠论基础枚举 |
| 数据 | 缺口, K线, 缠论K线 |
K 线数据结构 |
| 结构 | 分型, 虚线, 线段特征, 特征分型 |
分析层级结构 |
| 指标 | 平滑异同移动平均线, 相对强弱指数, 随机指标 |
MACD/RSI/KDJ |
| 算法 | 笔, 线段, 中枢, 背驰分析 |
识别算法 |
| 业务 | 缠论配置, 基础买卖点, 买卖点, 观察者, K线合成器, 立体分析器 |
分析框架 |
兼容性
- Python 3.9+
- 类名 / 方法名 / 字段名 / 签名与
chan.py一致 - 支持
.nb/.dat二进制文件格式(大端字节序)
许可
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chanlun-2605.101.tar.gz.
File metadata
- Download URL: chanlun-2605.101.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d25feeea5aef45ce767e7441cefe6d805bcddbc6b429a71e44283a8729ed7a30
|
|
| MD5 |
1ce8d1677ac7a38fb125220803425eec
|
|
| BLAKE2b-256 |
b8b81a3c3ab454f182af8458cf47d6b00f58ef8fae55b485e481b1699ba487cc
|
Provenance
The following attestation bundles were made for chanlun-2605.101.tar.gz:
Publisher:
publish.yml on YuYuKunKun/chanlun.rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chanlun-2605.101.tar.gz -
Subject digest:
d25feeea5aef45ce767e7441cefe6d805bcddbc6b429a71e44283a8729ed7a30 - Sigstore transparency entry: 1674037492
- Sigstore integration time:
-
Permalink:
YuYuKunKun/chanlun.rs@22109d8b308ee351a97a3f3f6b9d483eb006e333 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/YuYuKunKun
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@22109d8b308ee351a97a3f3f6b9d483eb006e333 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file chanlun-2605.101-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: chanlun-2605.101-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 896.2 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d45945381578421da40822625baaaff1ed4c3ce90e4fcb033b007ab83535f445
|
|
| MD5 |
0ff08479cc0087225e9285b54417952c
|
|
| BLAKE2b-256 |
a5c0ee2d53282ed1c16a3870bb3edd62768d37190726b438112afc08b9ca1c8a
|
Provenance
The following attestation bundles were made for chanlun-2605.101-cp312-cp312-win_amd64.whl:
Publisher:
publish.yml on YuYuKunKun/chanlun.rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chanlun-2605.101-cp312-cp312-win_amd64.whl -
Subject digest:
d45945381578421da40822625baaaff1ed4c3ce90e4fcb033b007ab83535f445 - Sigstore transparency entry: 1674037629
- Sigstore integration time:
-
Permalink:
YuYuKunKun/chanlun.rs@22109d8b308ee351a97a3f3f6b9d483eb006e333 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/YuYuKunKun
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@22109d8b308ee351a97a3f3f6b9d483eb006e333 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file chanlun-2605.101-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: chanlun-2605.101-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 994.3 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d87bedf1f35c474afb717b1fd9bc7dbbec79a7f181b12a34b599e76707bc00c9
|
|
| MD5 |
b1bed50ee21908c1b0edad2c90437029
|
|
| BLAKE2b-256 |
a46fcf20f3a2e2d6470525618efa9951414d316d304b452e8a9e34b878dd4653
|
Provenance
The following attestation bundles were made for chanlun-2605.101-cp312-cp312-macosx_11_0_arm64.whl:
Publisher:
publish.yml on YuYuKunKun/chanlun.rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chanlun-2605.101-cp312-cp312-macosx_11_0_arm64.whl -
Subject digest:
d87bedf1f35c474afb717b1fd9bc7dbbec79a7f181b12a34b599e76707bc00c9 - Sigstore transparency entry: 1674037597
- Sigstore integration time:
-
Permalink:
YuYuKunKun/chanlun.rs@22109d8b308ee351a97a3f3f6b9d483eb006e333 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/YuYuKunKun
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@22109d8b308ee351a97a3f3f6b9d483eb006e333 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file chanlun-2605.101-cp312-cp312-macosx_10_12_x86_64.whl.
File metadata
- Download URL: chanlun-2605.101-cp312-cp312-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.12, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f44e93aa2fb7d06eddacfb6154cc9cee1f5b7f444dc3bc51f861d6f7063eaa2b
|
|
| MD5 |
7171fc1312ac179e10f2d9f8ca871e91
|
|
| BLAKE2b-256 |
0aaea1a057636f20a7c938d99646ca3e41db80e85eb401a8582ecef4266fa148
|
Provenance
The following attestation bundles were made for chanlun-2605.101-cp312-cp312-macosx_10_12_x86_64.whl:
Publisher:
publish.yml on YuYuKunKun/chanlun.rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chanlun-2605.101-cp312-cp312-macosx_10_12_x86_64.whl -
Subject digest:
f44e93aa2fb7d06eddacfb6154cc9cee1f5b7f444dc3bc51f861d6f7063eaa2b - Sigstore transparency entry: 1674037535
- Sigstore integration time:
-
Permalink:
YuYuKunKun/chanlun.rs@22109d8b308ee351a97a3f3f6b9d483eb006e333 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/YuYuKunKun
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@22109d8b308ee351a97a3f3f6b9d483eb006e333 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file chanlun-2605.101-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: chanlun-2605.101-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85369219c454d64d4e1118b690bbb13d41ae9f4fc91848430543671f750483e9
|
|
| MD5 |
d39a2b93ddb5c070500d41cb43cb1b46
|
|
| BLAKE2b-256 |
ca990cf1c5a75c462776e3566d076c26e47515faf2e60d1e07c30e5015f16551
|
Provenance
The following attestation bundles were made for chanlun-2605.101-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
publish.yml on YuYuKunKun/chanlun.rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chanlun-2605.101-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
85369219c454d64d4e1118b690bbb13d41ae9f4fc91848430543671f750483e9 - Sigstore transparency entry: 1674037659
- Sigstore integration time:
-
Permalink:
YuYuKunKun/chanlun.rs@22109d8b308ee351a97a3f3f6b9d483eb006e333 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/YuYuKunKun
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@22109d8b308ee351a97a3f3f6b9d483eb006e333 -
Trigger Event:
workflow_dispatch
-
Statement type: