Metadata-Version: 2.4
Name: stock-indicators-cn
Version: 0.1.2
Summary: A股技术指标计算模块 — 对标东方财富/同花顺/通达信标准算法
License-Expression: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.24.0
Requires-Dist: pandas>=2.0.0

# stock-indicators-cn

A股技术指标计算模块 — 对标东方财富/同花顺/通达信标准算法。

## 安装

```bash
pip install stock-indicators-cn
```

## 指标列表

| 指标 | 函数 | 说明 |
|------|------|------|
| SMA | `sma(s, window)` | 简单移动平均 |
| EMA | `ema(s, span)` | 指数移动平均 |
| ATR | `atr(high, low, close, period=14)` | 平均真实波幅 |
| MACD | `macd(close, fast=12, slow=26, signal=9)` | 指数平滑异同移动平均线 |
| KDJ | `kdj(high, low, close, period=9)` | 随机指标 |
| RSI | `rsi(close, period=6)` | 相对强弱指标 |
| ForceIndex | `force_index(close, volume, period=2)` | 强力指数 |
| weekly_close | `weekly_close(df)` | 周线收盘价 |
| safe_float_atr | `safe_float_atr(atr_val, price)` | 安全化 ATR 值 |

## 使用示例

```python
from stock_indicators_cn import ema, macd, kdj, rsi

# MACD
dif, dea, hist = macd(close)

# KDJ
k, d, j = kdj(high, low, close)

# RSI
rsi_val = rsi(close, period=6)
