SuperAPI AI Directory

technical-analysis

Data & analytics

View repository

Updated 10-15 09:10

About this skill

Technical Analysis

Perform complete technical analysis based on K-line data, and output trend judgments and buy/sell signals.

Execution

python scripts/analyze.py <股票代码> --date YYYY-MM-DD

# 示例
python scripts/analyze.py 600519 --date 2025-01-01

Input (required)

Need to first run data-collect, and ensure --date is consistent.

output/<股票代码>/<日期>/data.json

Data flow

读取: output/<股票代码>/<日期>/data.json
输出: output/<股票代码>/<日期>/analysis.json

Output (stable fields)

  • trend: trend status, strength, whether bullish
  • bias: deviation rate and safety judgment
  • macd: MACD status and signals
  • volume: volume status
  • signal: action recommendation, score, reasons, and risks

Core trading philosophy

  1. Strict entry strategy - Absolutely do not buy if deviation rate > 5%
  2. Trend trading - MA5 > MA10 > MA20 bullish alignment
  3. Buy point preference - Pullback on reduced volume to MA5/MA10 support

Output

{
  "trend": {"status": "多头排列", "strength": 75, "is_bullish": true},
  "bias": {"ma5": 0.30, "status": "安全"},
  "macd": {"status": "GOLDEN_CROSS", "signal": "金叉,趋势向上"},
  "volume": {"status": "SHRINK_VOLUME_DOWN", "trend": "缩量回调"},
  "signal": {"action": "买入", "score": 72, "reasons": [...], "risks": [...]}
}

Scoring criteria

Score Signal
75+ Strong Buy
60-74 Buy
45-59 Hold
30-44 Wait and see
<30 Sell

For detailed indicator descriptions, see references/indicators.md

Failure handling

  • Cannot find data.json: first run data-collect(the same --date)
  • data.json field missing/empty: check whether data-collect was fetched successfully; if necessary, expand --days
  • Indicators cannot be calculated (insufficient samples): try increasing data-collect --days(for example 120/240)