← 返回 Skills 市场
zaferliu

股票技术分析 (Stock Technical Analysis)

作者 Zafer Liu · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ✓ 安全检测通过
98
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install eastmoney-tech-analysis
功能描述
提供股票K线数据及计算KDJ、MACD、BOLL、MA技术指标,支持资金流向排名和综合买卖信号分析。
使用说明 (SKILL.md)

股票技术分析 Skill (Stock Technical Analysis)

技能信息

  • 名称: stock-technical-analysis
  • 描述: 股票技术分析工具 - 获取K线数据、计算技术指标(KDJ/MACD/BOLL/MA)、资金流向排名
  • 触发关键词: 股票分析、技术指标、查股票、行情分析、KDJ、MACD、BOLL

功能

  1. K线数据获取 - 获取股票历史行情数据(日/周/月K线)
  2. 技术指标计算 - KDJ、MACD、BOLL、MA 均线
  3. 资金流向 - 主力资金排名(今日/5日/10日)
  4. 综合信号 - 金叉/死叉、超买/超卖状态

环境依赖

  • Python 3.8+
  • requests>=2.28.0
  • pandas>=1.5.0
  • numpy>=1.21.0

使用示例

1. 完整分析一只股票

from eastmoney_spider import EastmoneySpider
from indicators import (
    calculate_kdj, 
    calculate_macd, 
    calculate_boll, 
    calculate_ma,
    get_latest_signals
)

spider = EastmoneySpider()

# 获取K线数据(默认100天)
df = spider.get_stock_kline("600519", days=100)

# 计算各技术指标
kdj = calculate_kdj(df)
macd = calculate_macd(df)
boll = calculate_boll(df)
ma = calculate_ma(df)
signals = get_latest_signals(df)

# 输出结果
print(f"股票: {df.iloc[0]['name']}")
print(f"收盘价: {df.iloc[-1]['close']}")
print(f"KDJ: K={kdj['k'][-1]:.1f} D={kdj['d'][-1]:.1f} J={kdj['j'][-1]:.1f}")
print(f"MACD: DIF={macd['dif'][-1]:.3f} DEA={macd['dea'][-1]:.3f}")
print(f"BOLL: 上轨={boll['upper'][-1]:.2f} 中轨={boll['middle'][-1]:.2f} 下轨={boll['lower'][-1]:.2f}")
print(f"综合信号: {signals}")

2. 获取资金流向排名

from eastmoney_spider import EastmoneySpider

spider = EastmoneySpider()

# 今日主力资金排名
date, df = spider.fetch_capital_flow_rank(days=0, limit=20)

# 5日主力资金排名
date, df = spider.fetch_capital_flow_rank(days=5, limit=20)

print(df.head(10))

3. 命令行直接运行

python stock_analyze.py 600519
python stock_analyze.py 000001 --json

指标说明

KDJ 随机指标

  • K值: 快速随机指标
  • D值: 慢速随机指标
  • J值: 3×K - 2×D
  • 信号: K/D金叉(买)、K/D死叉(卖)
  • 超买: J>80 | 超卖: J\x3C20

MACD 指数平滑异同移动平均线

  • DIF: 快线 (EMA12 - EMA26)
  • DEA: 慢线 (DIF的EMA9)
  • MACD: (DIF-DEA)×2
  • 信号: DIF上穿DEA(金叉)、下穿DEA(死叉)
  • 趋势: DIF>DEA 多头 | DIF\x3CDEA 空头

BOLL 布林线

  • 上轨: 中轨 + 2×标准差
  • 中轨: 20日均线
  • 下轨: 中轨 - 2×标准差
  • 信号: 突破上轨(超买)、跌破下轨(超卖)

MA 移动平均线

  • MA5: 5日均线(短期)
  • MA10: 10日均线(短期)
  • MA20: 20日均线(中期)
  • MA60: 60日均线(长期)

返回格式

综合信号 (get_latest_signals)

{
    'kdj': {
        'signal': 1,  # 1=金叉, -1=死叉, 0=无
        'status': '超买/超卖/正常',
        'j': 85.5    # J值
    },
    'macd': {
        'signal': 0,
        'trend': '多头/空头'
    },
    'boll': '突破上轨/跌破下轨/震荡区间',
    'price': {
        'close': 1460.0,
        'pct_chg': 0.12
    },
    'date': '2026-04-03'
}

注意事项

  • 股票代码需要是6位数字(如600519、000001)
  • 默认获取100天日K线数据
  • 资金流向API返回可能包含期货/债券数据
  • 本技能仅供技术分析参考,不构成投资建议
安全使用建议
This skill appears coherent and implements what it claims: it fetches public data from Eastmoney and calculates trading indicators. Before installing, consider: 1) The source is listed as unknown — review the bundled code yourself or run it in an isolated environment (virtualenv/container) if provenance matters. 2) The skill makes network requests to eastmoney.com endpoints — ensure that outbound network access is acceptable and that use complies with Eastmoney's terms. 3) Install only the listed Python dependencies (requests, pandas, numpy) from PyPI and keep them up to date. 4) Don't treat outputs as investment advice; validate results against other sources before acting on them. If you'd like, I can highlight any specific lines in the code for deeper review or run a small static check for risky patterns (shell exec, external unknown hosts, credential usage).
功能分析
Type: OpenClaw Skill Name: eastmoney-tech-analysis Version: 1.0.2 The skill bundle is a legitimate stock technical analysis tool that fetches market data from public Eastmoney APIs and calculates standard indicators (KDJ, MACD, BOLL). The code in 'eastmoney_spider.py', 'indicators.py', and 'stock_analyze.py' is well-structured, follows its stated purpose, and contains no evidence of data exfiltration, malicious execution, or prompt injection.
能力评估
Purpose & Capability
Name/description match the included code: eastmoney_spider.py fetches K-line and capital-flow data from Eastmoney endpoints; indicators.py and stock_analyze.py compute KDJ/MACD/BOLL/MA and produce reports. No unrelated binaries, env vars, or config paths are requested.
Instruction Scope
SKILL.md instructs importing the provided modules and running functions or CLI; runtime actions are limited to HTTP requests to eastmoney endpoints and local computations. The instructions do not ask the agent to read unrelated files or environment variables. Note: API responses may include futures/debt data (the README/SKILL.md already warns of this).
Install Mechanism
There is no external install script or download URL; the package includes source files and a small requirements.txt (requests/pandas/numpy). No extract-from-URL or untrusted remote installation is present.
Credentials
The skill requires no environment variables or credentials. Network access to Eastmoney public APIs is expected for its purpose. No secrets or unrelated service tokens are requested.
Persistence & Privilege
always is false and the skill does not request elevated or persistent platform privileges. It contains no code that modifies other skills or system-wide agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install eastmoney-tech-analysis
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /eastmoney-tech-analysis 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
开源发布 - GitHub仓库已创建并公开
v1.0.1
更新技能名称
v1.0.0
股票技术分析工具 - K线获取、KDJ/MACD/BOLL指标计算
元数据
Slug eastmoney-tech-analysis
版本 1.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

股票技术分析 (Stock Technical Analysis) 是什么?

提供股票K线数据及计算KDJ、MACD、BOLL、MA技术指标,支持资金流向排名和综合买卖信号分析。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 98 次。

如何安装 股票技术分析 (Stock Technical Analysis)?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install eastmoney-tech-analysis」即可一键安装,无需额外配置。

股票技术分析 (Stock Technical Analysis) 是免费的吗?

是的,股票技术分析 (Stock Technical Analysis) 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

股票技术分析 (Stock Technical Analysis) 支持哪些平台?

股票技术分析 (Stock Technical Analysis) 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 股票技术分析 (Stock Technical Analysis)?

由 Zafer Liu(@zaferliu)开发并维护,当前版本 v1.0.2。

💬 留言讨论