Token导航 LogoToken导航

Agent Skill · 研究检索

stock-kline-analysis(股票 K 线分析)

stock-kline-analysis 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

stock-kline-analysis 是研究检索类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为需要联网;许可证为 MIT-0,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 5,556。

总安装 25,402周安装 1,080GitHub Stars 公开资料未说明下载 8,899核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.0.0

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:stock-kline-analysis(股票 K 线分析)
来源仓库:https://github.com/iideas18/stock-kline-analysis
安装命令:
openclaw skills install stock-kline-analysis
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install stock-kline-analysis

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

自动生成六个月 K 线图并叠加多种技术指标。包含布林带、ATR 波动率及多时间框架确认功能。当用户指定股票代码并要求技术分析时调用。安装命令:openclaw skills install stock-kline-analysis,需 matplotlib 支持。仅支持主流交易所上市股票,小众品种可能无法识别。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install stock-kline-analysis;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

stock-kline-analysis 怎么安装?

在终端执行 openclaw skills install stock-kline-analysis。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

stock-kline-analysis 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

stock-kline-analysis 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

stock-kline-analysis 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

stock-kline-analysis 用的人多吗?

公开数据是累计安装 25,402 次,近一周安装 1,080 次,下载 8,899 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

stock-kline-analysis 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
stock-kline-analysis

股票 K 线分析 · 本页

25,402—需要联网MIT-0通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
stock-kline-analysis
description
Given a stock name or code, auto-detect its market, fetch 6-month daily K-line, plot candlestick + MA/Bollinger/MACD/RSI/ATR with multi-timeframe confirmation, and deliver structured analysis with trend, momentum, valuation context, portfolio-relative strength, and event-aware risk notes.

Stock K-Line Analysis Skill

Use this skill when the user gives a stock name or code and wants K-line output and/or analysis, e.g.:

  • "Analyze 600519"
  • "K-line and trend for 贵州茅台"
  • "How is AAPL doing?"
  • "Compare 000001 and 600036 by relative strength"

Defaults (baked-in)

ParameterDefault
MarketAuto-detect; only ask if unresolvable or genuinely ambiguous
K-line periodDaily (primary) + Weekly & Monthly for multi-timeframe
Time rangeLast 6 months (today − 182 days) for daily; auto-extend for weekly/monthly
Price adjustqfq for A-share; none for HK/US
IndicatorsMA5/MA20/MA60, Bollinger Bands (20,2), MACD (12/26/9), RSI-14, ATR-14
LanguageBilingual: Chinese label + English explanation

User overrides these defaults at any time.

Market Auto-Detection Rules

Code patternInferred market
6-digit starting with 6A-share Shanghai
6-digit starting with 0 or 3A-share Shenzhen
5-digit starting with 0HK (prefix 0)
4–5 chars, lettersUS (NYSE/NASDAQ)
Name onlySearch A-share first, then HK; disambiguate if needed

If detection confidence is low, list top-2 candidates and ask once.

AkShare API Reference

MarketAkShare function
A-share dailyak.stock_zh_a_hist(symbol, period="daily", start_date, end_date, adjust="qfq")
A-share real-timeak.stock_zh_a_spot_em() (network may fail — wrap in try/except)
HK dailyak.stock_hk_daily(symbol, adjust="qfq")
US dailyak.stock_us_daily(symbol, adjust="qfq")
A-share symbol listak.stock_info_a_code_name()
Financial indicatorsak.stock_financial_analysis_indicator(symbol, start_year) — EPS, ROE, margins (use this; stock_a_lg_indicator does NOT exist)
Latest earnings summaryak.stock_yjbb_em(date="YYYYMMDD") — EPS, revenue, net profit YoY, industry
Industry PEak.stock_industry_pe_ratio_cninfo(symbol)
Macro calendarak.news_economic_baidu() — date column is datetime.date objects; data may be stale (up to ~2 months behind current date)

Scripts

All implementation code lives in scripts/ next to this file. You can run a full analysis end-to-end with:

python .github/skills/stock-kline-analysis/scripts/run_analysis.py 000063
python .github/skills/stock-kline-analysis/scripts/run_analysis.py 贵州茅台
python .github/skills/stock-kline-analysis/scripts/run_analysis.py AAPL --out-dir /tmp/reports
ScriptPurpose
scripts/run_analysis.pyCLI orchestrator — runs all steps end-to-end
scripts/fetch_kline.pyStep 2 — multi-timeframe K-line fetch with retry/fallback
scripts/indicators.pyStep 3 — compute MA/BB/MACD/RSI/ATR for all timeframes
scripts/chart.pyStep 4 — 4-panel matplotlib chart (K线+BB \Vol \MACD \RSI-14)
scripts/valuation.pyStep 5 — fetch EPS/revenue/ratios and compute PE/PB
scripts/events.pyStep 7 — macro events with hardcoded fallback calendar

Each script has a __main__ smoke-test (e.g. python fetch_kline.py 000063).


Workflow

Step 1 — Resolve Identifier

  1. Apply market auto-detection rules to the raw input.
  2. If code is numeric and 6-digit, run ak.stock_info_a_code_name() to confirm name.
  3. If name is given, filter symbol list for closest match.
  4. If ambiguous (>1 high-confidence match), show max 3 options and ask.
  5. If unresolvable, report clearly and stop.

Completion check: one confirmed {code, name, market} tuple before fetching any data.


Step 2 — Fetch K-Line Data

See scripts/fetch_kline.py — fetch_all_timeframes(code, adjust="qfq") returns (df_daily, df_weekly, df_monthly), all normalized.

Key implementation notes (do NOT get wrong):

  • stock_zh_a_hist returns 12 Chinese-named columns — always use explicit rename(col_map), never positional assignment.
  • Windows: daily = last 182 days, weekly = last 365 days, monthly = last 3 years.
from scripts.fetch_kline import fetch_all_timeframes
df_daily, df_weekly, df_monthly = fetch_all_timeframes(code)

Fallback logic:

  • On network error, retry once.
  • If daily fetch is empty: report (suspended / delisted / wrong symbol / holiday) and stop.
  • Weekly/monthly failures: skip that timeframe and note it in output.

Completion check: len(df_daily) > 20 and all OHLCV columns present and non-null.


Step 3 — Compute Indicators

See scripts/indicators.py — add_indicators(df) and add_tf_indicators(df_weekly, df_monthly).

Critical notes:

  • bb_width = (upper − lower) / mid * 100 — result is a percentage (e.g. 12.7, not 0.127).
  • RSI must use a standalone helper; do not chain .diff() twice on the same series.
  • Support/resistance stored in df.attrs["support"] / df.attrs["resistance"].
from scripts.indicators import add_indicators, add_tf_indicators
df_daily = add_indicators(df_daily)
df_weekly, df_monthly = add_tf_indicators(df_weekly, df_monthly)

If fewer than 60 bars exist on daily, use all available and note the limitation. Bollinger Bands require minimum 20 bars.


Step 4 — Build K-Line Chart

Primary path — matplotlib (4-panel: K线+布林带 | 成交量 | MACD | RSI-14):

See scripts/chart.py — plot_kline(df, code, name, out_path, market_label, dpi) returns the saved path.

mplfinance is NOT installed in the base environment. chart.py calls matplotlib.use("Agg") at module level — always import before pyplot.
from scripts.chart import plot_kline
chart_path = plot_kline(df_daily, code=code, name=name, market_label="A股",
                        out_path=f"{code}_kline.png")

Fallback (text table — only if matplotlib is also unavailable), latest 20 bars:

date        close   MA20    BB_up   BB_low  RSI14   ATR%
2026-02-10  15.38   14.90   16.20   13.60   58.3    1.4%
...

Step 5 — Valuation Context

See scripts/valuation.py — fetch_valuation(code) and compute_pe_pb(result, last_close).

ak.stock_a_lg_indicator and ak.stock_a_indicator_lg do not exist — use stock_yjbb_em + stock_financial_analysis_indicator instead (both implemented in valuation.py).
from scripts.valuation import fetch_valuation, compute_pe_pb
val = fetch_valuation(code)
val = compute_pe_pb(val, last_close=float(df_daily["close"].iloc[-1]))
# val keys: eps, revenue, revenue_yoy, net_profit, net_profit_yoy,
#           book_value_per_share, roe, gross_margin, industry,
#           report_date, fin_df, pe_ttm, pb

For HK/US: skip valuation section or note it as unavailable.

Report:

  • Current PE (TTM, computed from EPS), PB.
  • ROE and net profit margin.
  • Revenue/profit YoY growth from latest report.
  • Industry classification.
  • Note: historical PE percentile not available without stock_a_lg_indicator; skip that sub-bullet and state the reason.

Step 6 — Portfolio / Relative Strength Mode

Activated when user provides multiple symbols (e.g. "compare 600519 and 000858").

  1. Fetch 6-month daily data for all symbols (same window as default).
  2. Compute normalized 6-month return (base=100 on start date).
  3. Compute 20-day rolling volatility and ATR% for each symbol.
  4. Rank by: return, Sharpe-proxy (return/vol), RSI, and ATR% (lower = more stable).
  5. Produce a comparison table and identify the relative leader.

Single-symbol mode: compare to its own industry index if identifiable.


Step 7 — Event-Aware Risk Overlay

See scripts/events.py — fetch_events(lookback_days, lookahead_days, min_importance) returns a list of formatted strings.

news_economic_baidu() date column is datetime.date objects — compare natively. Data lags 4–8 weeks; events.py always appends a hardcoded China macro calendar (PMI, Two Sessions, earnings windows) regardless of API success.
from scripts.events import fetch_events
event_lines = fetch_events()  # returns list[str] ready to print

Overlay on analysis:

  • Note any major macro event dates near current price levels.
  • Flag the applicable earnings season window relative to today.
  • Highlight price behavior around large news days visible in the K-line.

If event API is unavailable, note it and manually annotate the known calendar dates above.


Step 8 — Deliver Structured Output

Return in this exact order:

[Symbol Summary]
名称/代码:           e.g. 贵州茅台 (600519) · A-Share Shanghai
分析区间:            2025-09-12 → 2026-03-12 (daily 6M, qfq-adjusted)
多周期确认:          Weekly trend: Uptrend | Monthly trend: Consolidation

[K-Line Snapshot]
最新收盘:           ¥1,580.00
1日涨跌:           +1.2% (+18.80)
MA5 / MA20 / MA60: ¥1,572 / ¥1,540 / ¥1,490   (排列多头 Bullish stack)
布林带 Bollinger:  Upper ¥1,640 | Mid ¥1,540 | Lower ¥1,440  (Width: 12.7%)
ATR-14 (波动幅):   ¥22.4 / day  (1.4% of price — moderate volatility)
20日区间:           ¥1,420 – ¥1,610
成交量 vs 20日均:   +35%  (放量)

[Technical View — 技术面]
趋势 Trend:         Daily Uptrend — MA5 > MA20 > MA60, price above all MAs
                    Weekly confirm: above weekly MA20 ✓
                    Monthly confirm: testing monthly MA20 resistance ⚠
动量 Momentum:     5D: +3.1% | 10D: +5.8% | 20D: +8.2% | Ann.Vol: 18%
MACD:              MACD line above signal, histogram expanding → bullish momentum
RSI-14:            68 — approaching overbought; momentum still intact
布林挤压 BB Squeeze: Width 12.7% — expanding (breakout in progress, not overextended)
支撑 Support:      ¥1,490 (MA60 + BB lower + prior swing low)
阻力 Resistance:   ¥1,640 (BB upper) / ¥1,650 (6M high zone)
ATR止损参考:       Trailing stop = last close − 1.5×ATR = ¥1,580 − ¥33.6 ≈ ¥1,546

[Valuation — 估值]
PE (TTM):          28x — 3-year 40th percentile (moderate)
PB:                8.2x
行业 PE 中位:      25x (white spirits industry) → slight premium to peers

[Relative Strength]  (if multi-symbol mode)
Symbol   6M Return  Vol    Sharpe  RSI   ATR%   Rank
600519   +22%       18%    1.22    68    1.4%   1st ← Leader
000858   +14%       21%    0.67    55    1.7%   2nd

[Event Overlay — 事件]
- 2026-03-15: NPC economic policy announcement (macro risk)
- 2026-04-30: Q1 earnings release window (re-rating trigger)
- No major gap days observed in 6M K-line window.

[Risk & Watchpoints — 风险]
- 多单失效: If price closes below MA20 (¥1,540) on volume → trend weakening
- 布林下轨破位: Price below BB lower (¥1,440) = volatility expansion to downside
- 超买风险: RSI near 70; daily overbought but weekly RSI 58 = room still exists
- ATR止损: Position sizing reference — 1 ATR = ¥22.4; adjust size accordingly
- 突破条件: Break above BB upper (¥1,640) + volume >+50% avg → momentum continuation

Quality Criteria

  • Market mapping is stated and auditable.
  • All indicator values are computed from actual fetched data, not estimated.
  • Valuation section states data source and percentile basis.
  • Event overlay explicitly covers ±30 days around analysis date.
  • No language implying guaranteed price direction or investment advice.
  • If any section fails (e.g. valuation API times out), skip it with an explicit note.

Example Prompts

  • "Use stock-kline-analysis to analyze 600519."
  • "Use stock-kline-analysis for 贵州茅台 — show K-line with Bollinger Bands, MACD, RSI, and ATR stop-loss."
  • "Use stock-kline-analysis on AAPL — multi-timeframe trend: are daily/weekly/monthly aligned?"
  • "Use stock-kline-analysis to compare 600036 and 601318 by relative strength and ATR-based risk."
  • "Use stock-kline-analysis for 000858 — show Bollinger squeeze and flag any upcoming earnings event."
  • "Use stock-kline-analysis for TSLA — is price near Bollinger upper band? What does ATR say about position sizing?"

平台分布

OpenClaw

77.96%
按下载量换算6,938

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills