Skip to main content

Arrowpi

量化交易策略与技术指标库。

安装

# 核心指标函数(pandas + polars)
pip install arrowpi

# 含 tqsdk 交易集成
pip install arrowpi[tqsdk]

# 全部依赖
pip install arrowpi[full]

模块说明

模块 说明 依赖
tdx_function TDX 风格指标函数(pandas 版) pandas, numpy
tdx_function_polars TDX 风格指标函数(polars 版) polars, numpy
weiswave_indicator Weiswave 止损线指标计算(pandas) pandas, numpy
weiswave_indicator_polars Weiswave 止损线指标计算(polars) polars, numpy
supertrend_strategy Supertrend 趋势策略 tqsdk, loguru
supertrend_qqemod_strategy Supertrend + QQE Mod 组合策略 tqsdk, loguru

快速开始

TDX 指标函数

import pandas as pd
from arrowpi import HHV, LLV, REF, standardize_columns

df = standardize_columns(df)  # 统一列名为大写
high_n = HHV(df['HIGH'], 20)  # 最近 20 根 K 线最高价
ref_close = REF(df['CLOSE'], 1)  # 前一根 K 线收盘价

Polars 版本

import polars as pl
from arrowpi import HHV_polars, LLV_polars, standardize_columns_polars

df = standardize_columns_polars(df)
high_n = HHV_polars(df['HIGH'], 20)

Weiswave 止损线

import pandas as pd
from arrowpi import calculate_indicator

# df 需包含 HIGH, LOW, CLOSE 列
result = calculate_indicator(df)
# result 包含 X_34 ~ X_58, StopLine 等指标列

开发

pip install -e ".[dev]"
python -m build
twine upload dist/*

Metadata

Release files for arrowpi 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arrowpi 0.1.0
File Size Uploaded
arrowpi-0.1.0.tar.gz 43.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for arrowpi 0.1.0
File Interpreter ABI Platform
arrowpi-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 92.7 kB

Release files / arrowpi-0.1.0.tar.gz

Download URL arrowpi-0.1.0.tar.gz
Size 43.0 kB
Tags Source
SHA-256 checksum
How to use checksums
34c400a0e8e02bac7d811529f9fb4266358ef35b68e6d362494d5bcc10842914
BLAKE2b-256 checksum
How to use checksums
880ffcaa984957142454e852e37be5ac111e0d9505dd42e01000fadb5f5414ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / arrowpi-0.1.0-py3-none-any.whl

Download URL arrowpi-0.1.0-py3-none-any.whl
Size 49.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5f9c9e8e956425cbd1e6fa5e79c5b895f1a8c438055d7d606338386be3df806
BLAKE2b-256 checksum
How to use checksums
f1c5fdd798e85ba4d646d59cd22dd67087a6b42950039e2f5b52a502dfeb0331
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release 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