SuperAPI AI Directory

stock-analysis

Data & analytics

View repository

Updated 10-16 09:55

About this skill

Stock Market Analysis Skill

Through stk CLI collects market data and generates structured analysis reports.

Reference Documents

  • references/commands.md — Command parameters and return values
  • references/report-templates.md — Report format templates

Mode Selection

First confirm which mode the user wants (or infer from context):

Trigger Words Mode
Daily report/market/market action/news Market Overview
Hotspots/stock selection/technical patterns/into pool Technical Hotspots
Analyze XXX/look at XXX Individual Stock Analysis
Watchlist analysis/group analysis/position check/analyze XX group Group Overall Analysis
Daily report (with stock selection intent) Market Overview + Technical Hotspots (serial, two reports)

Mode One: Market Overview

Goal: Summarize the market in one sentence + extract important news + flag affected sectors.

Steps:

并行:
  ├─ stk market                  → 指数 + 温度
  └─ stk market news --count 20  → 新闻(cls+ths 合并)

Analysis Points:

  • Summarize the market in one sentence (based on index gains/losses + temperature)
  • Extract 3 important news items, flag affected sectors/stocks/concepts

Report → report-templates.md Template 1 → ~/.stk/reports/市场总览_{date}_{time}.md


Mode Two: Technical Hotspots

Goal: Analyze 8-screen bull/bear sentiment + summarize hotspot industries + Top 15 into pool.

stk stock hotspot Returns industry bull/bear statistics,stk stock candidates Returns cross-validated candidate stocks (appearing in 3+ bullish screens, no bearish signals, no ST).

Steps:

步骤 1 — 并行:
  ├─ stk stock hotspot     → TechIndustries(行业情绪)
  └─ stk stock candidates  → TechCandidates(入池候选)
步骤 2: stk stock scan <code1> <code2> ...    → 批量评分(空格分隔,勿用逗号)
步骤 3: 取 Top 15(按 score 降序)
步骤 4: stk watchlist create <MMDD> --symbol S1 --symbol S2 ... --symbol S15

Note:

  • stk stock scan Usespaceto separate multiple codes:stk stock scan 002218 600207 688552
  • stk watchlist create/add Each symbol is a separate --symbol / space-separated parameter, codes only (exchange suffix auto-filled)
  • Before step 4, first stk watchlist list check for a group with the same name; if it exists, use stk watchlist add <group> S1 S2 ... to append in batch
  • candidates have passed cross-validation; pass all of them during scan

Analysis Points:

  • Judge market sentiment based on industries' bull_count/bear_count (bullish/bearish/divergent)
  • Extract hotspot industries: high bull_count = capital inflow, high bear_count = risk

Report → report-templates.md Template 2 → ~/.stk/reports/技术热点_{date}_{time}.md


Mode Three: Individual Stock Analysis

Goal: Comprehensive scoring + in-depth technicals + peer comparison.

Steps:

全部并行:
  ├─ stk stock scan <symbol>              → 评分 + 估值 + 信号 + ATR 风控
  ├─ stk stock kline <symbol>             → K 线 + 全部指标
  └─ stk stock fundamental <symbol>       → 行业对比(growth + valuation + dupont)

Note: fundamental's dupont is only supported for A-shares; Hong Kong/US stocks are automatically skipped

Analysis Points:

  • Score interpretation (signals across dimensions + ATR risk control)
  • K-line technicals (moving averages/MACD/RSI/BOLL/volume-price)
  • Industry comparison positioning (growth/valuation/DuPont)
  • Output conclusion: technical outlook + fundamental strengths and weaknesses + risk warnings + trading suggestions

Report → report-templates.md Template 3 → ~/.stk/reports/个股分析_{symbol}_{date}_{time}.md


Mode 4: Group-wide analysis

Goal: Batch scanning of watchlist groups + anomaly alerts + per-stock commentary.

Steps:

步骤 1 — 并行:
  ├─ stk watchlist scan <group>   → 全组评分排名(默认按 score 排序)
  └─ stk watchlist kline <group>  → 全组 K 线
步骤 2 — 分析(见下方要点)
步骤 3 — 可选: 对评分前 3 或异动标的执行 stk stock fundamental

Group name resolution (strictly follow):

  1. Extract the group name from the user message (e.g., "ETF group" →ETF, "analyze the semiconductor group" →半导体),request directly with that name, do not list first
  2. If the request fails (group does not exist), then stk watchlist list find the closest group name and retry with the correct name
  3. Only when the user completely does not mention a group name, then stk watchlist list list options for selection

Analysis points:

  • Score ranking, mark high-score/low-score targets
  • Anomaly alerts (identify from ScanItem.signals the signals with the [买]/[卖]/[警] prefix)
  • Per-stock commentary: technical outlook + trading suggestions

Report → report-templates.md Template 4 → ~/.stk/reports/分组分析_{name}_{date}_{time}.md


Operating rules

Parallelization

Independent queries must be initiated simultaneously. Only serialize when subsequent steps depend on prior results.

Error handling

  • Single stock failure → log the error and continue processing, mark the report as having incomplete data
  • Mass failures → stk doctor check investigate the data source and inform the user
  • Cache anomaly → stk cache clear then retry

Report storage

Save to ~/.stk/reports/(if the directory does not exist, mkdir -p), and note the save path at the end of the report.

Tone and format

  • Chinese, use tables for comparative data, use bullet lists for analysis
  • Bold key numbers and alerts
  • Focus on "so what" rather than listing data
  • Directional views must include supporting evidence (which indicators, what values)