Metadata-Version: 2.4
Name: arrowpi
Version: 0.1.0
Summary: 量化交易策略与技术指标库：TDX 指标函数、Weiswave 止损线、Supertrend 策略
License-Expression: MIT
Keywords: indicator,quantitative,supertrend,tdx,trading,weiswave
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.10
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: polars
Provides-Extra: dev
Requires-Dist: build; extra == 'dev'
Requires-Dist: twine; extra == 'dev'
Provides-Extra: full
Requires-Dist: loguru; extra == 'full'
Requires-Dist: tqsdk>=3.8.7; extra == 'full'
Provides-Extra: tqsdk
Requires-Dist: tqsdk>=3.8.7; extra == 'tqsdk'
Description-Content-Type: text/markdown

# Arrowpi

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

## 安装

```bash
# 核心指标函数（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 指标函数

```python
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 版本

```python
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 止损线

```python
import pandas as pd
from arrowpi import calculate_indicator

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

## 开发

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