Sources: extracted from two upstream archives (skill-repo, skills-main),
merged with the following policy:
- 15 broken symlinks (pointing to /Users/jameslee/.cc-switch/skills or
../../.agents/skills on a foreign machine) discarded
- 3 real name collisions with identical content (ai-pair, ifind-http-api,
zhipu-websearch) kept as one copy
- Functional overlaps deduped keeping the strongest variant:
- docx family: kept docx (official, full toolchain) + docx-cn
(GB/T 9704 Chinese official-document constants),
dropped docx_writer (no scripts, name collided with docx)
- humanizer family: kept humanizer-zh (6 zh reference docs),
dropped humanizer (en, redundant for CN workflow)
- Skills that only ran in a foreign environment removed:
ablemind-ops, app-publish, hlb-design-system, openclaw-adj-skill,
claude-driver
- alphapai excluded from this public repo because its SKILL.md hard-coded
live credentials
Result: 25 skills, 572 files, ~7.5 MB.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
94 lines
2.9 KiB
Markdown
94 lines
2.9 KiB
Markdown
# WindPy 技术指标字段参考
|
||
|
||
技术指标通过 `w.wsd()` 函数获取时间序列数据。
|
||
|
||
## 基础技术指标(无需参数)
|
||
|
||
| 字段 | 名称 | 说明 |
|
||
|------|------|------|
|
||
| `MACD` | MACD指标 | 默认参数 (12,26,9) |
|
||
| `RSI` | RSI相对强弱指标 | 默认参数 (14) |
|
||
| `KDJ` | KDJ随机指标 | 默认参数 (9,3,3) |
|
||
| `BOLL` | 布林带 | 默认参数 (20,2) |
|
||
| `CCI` | CCI顺势指标 | 默认参数 (14) |
|
||
| `WR` | 威廉指标 | 默认参数 (14) |
|
||
|
||
**注意:** 带参数格式如 `MACD(12,26,9)`、`RSI(14)` 需要特殊权限,默认参数版本可用。
|
||
|
||
---
|
||
|
||
## 使用示例
|
||
|
||
```python
|
||
from WindPy import w
|
||
w.start()
|
||
|
||
# 获取 MACD 时间序列
|
||
err, df = w.wsd("600519.SH", "MACD", "-30D", "", "", usedf=True)
|
||
# DataFrame 列名: ['MACD']
|
||
|
||
# 获取 RSI
|
||
err, df = w.wsd("600519.SH", "RSI", "-30D", "", "", usedf=True)
|
||
|
||
# 获取 KDJ
|
||
err, df = w.wsd("600519.SH", "KDJ", "-30D", "", "", usedf=True)
|
||
|
||
# 获取布林带
|
||
err, df = w.wsd("600519.SH", "BOLL", "-30D", "", "", usedf=True)
|
||
|
||
# 获取 CCI
|
||
err, df = w.wsd("600519.SH", "CCI", "-30D", "", "", usedf=True)
|
||
|
||
# 获取威廉指标
|
||
err, df = w.wsd("600519.SH", "WR", "-30D", "", "", usedf=True)
|
||
|
||
# 多指标同时获取
|
||
err, df = w.wsd("600519.SH", "MACD,RSI,KDJ", "-30D", "", "", usedf=True)
|
||
# DataFrame 列名: ['MACD', 'RSI', 'KDJ']
|
||
|
||
w.stop()
|
||
```
|
||
|
||
---
|
||
|
||
## 指标说明
|
||
|
||
### MACD (Moving Average Convergence Divergence)
|
||
- **原理:** 通过快速线和慢速线的关系判断趋势
|
||
- **默认参数:** (12, 26, 9) - 快线周期、慢线周期、信号线周期
|
||
- **返回值:** MACD 值(可能包含 DIF、DEA、MACD柱,取决于 Wind 实现)
|
||
|
||
### RSI (Relative Strength Index)
|
||
- **原理:** 衡量价格上涨和下跌的相对强度
|
||
- **默认参数:** (14) - 计算周期
|
||
- **解读:** >70 超买,<30 超卖
|
||
|
||
### KDJ (随机指标)
|
||
- **原理:** 通过收盘价在价格区间中的位置判断超买超卖
|
||
- **默认参数:** (9, 3, 3) - K值周期、D值平滑、J值平滑
|
||
- **返回值:** 通常返回 K、D、J 三个值
|
||
|
||
### BOLL (布林带)
|
||
- **原理:** 基于移动平均线的标准差通道
|
||
- **默认参数:** (20, 2) - 移动平均周期、标准差倍数
|
||
- **返回值:** 上轨、中轨、下轨
|
||
|
||
### CCI (Commodity Channel Index)
|
||
- **原理:** 衡量价格与平均价格的偏离程度
|
||
- **默认参数:** (14) - 计算周期
|
||
- **解读:** >100 强势,<-100 弱势
|
||
|
||
### WR (William's %R)
|
||
- **原理:** 类似 KDJ,衡量超买超卖
|
||
- **默认参数:** (14) - 计算周期
|
||
- **解读:** >-20 超买,<-80 超卖
|
||
|
||
---
|
||
|
||
## 注意事项
|
||
|
||
1. **列名大写:** 返回的 DataFrame 列名自动大写,如 `MACD`, `RSI`
|
||
2. **数据长度:** 技术指标需要足够的历史数据计算,建议查询时间范围 ≥ 指标周期
|
||
3. **空值处理:** 初期数据点可能为 NaN(因数据不足无法计算)
|
||
4. **权限限制:** 自定义参数版本(如 `RSI(6)`)可能需要额外权限,返回 -40522007
|