SuperAPI AI Directory

ai-decision

Data & analytics

View repository

Updated 10-15 22:38

About this skill

AI Decision Dashboard

Based on technical analysis results, generate complete investment decision recommendations.

Execute

python scripts/decision.py <股票代码> --date YYYY-MM-DD [--news "舆情内容"]

# 示例
python scripts/decision.py 600519 --date 2025-01-01
python scripts/decision.py 600519 --date 2025-01-01 --news "公司发布利好公告"

Input (required)

You need to first run technical-analysis, and ensure --date is consistent.

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

Data flow

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

Output (stable fields)

  • core_conclusion: One-sentence conclusion + signal type + position recommendation
  • price_levels: Key price levels such as buy/stop-loss/take-profit/risk-reward ratio
  • checklist: Check key conditions one by one
  • summary: Final action, score, confidence

Complete workflow

# 1. 收集数据
python skills/data-collect/scripts/collect_stock_data.py 600519 --date 2025-01-01

# 2. 技术分析
python skills/technical-analysis/scripts/analyze.py 600519 --date 2025-01-01

# 3. 生成决策
python scripts/decision.py 600519 --date 2025-01-01

Failure handling

  • Cannot find analysis.json: first run technical-analysis(the same --date)
  • analysis.json field missing/abnormal format: check whether the technical-analysis output is complete; rerun the analysis if necessary
  • --news default: does not affect decision generation (it just does not include sentiment-related conclusions)

Output content

  1. Core conclusion - One-sentence conclusion + position recommendation
  2. Precise price levels - Ideal buy/second-best buy/stop-loss/target price
  3. Checklist - Check 6 key conditions one by one
  4. Sentiment intelligence - Risk alerts + positive catalysts

Output format

{
  "core_conclusion": {
    "one_sentence": "多头趋势良好但乖离率偏高,等待回踩MA5",
    "signal_type": "HOLD",
    "position_advice": {"no_position": "...", "has_position": "..."}
  },
  "price_levels": {
    "ideal_buy": 1670.00,
    "stop_loss": 1640.00,
    "take_profit": 1750.00,
    "risk_reward_ratio": 2.67
  },
  "checklist": [
    "[YES] 多头排列:MA5>MA10>MA20 满足",
    "[YES] 乖离率<5%:当前0.3%",
    "[YES] 量能配合:缩量回调",
    "[YES] 无重大利空",
    "[WARN] 筹码结构:获利盘85%",
    "[NO] 买点位置:当前价高于理想买点"
  ],
  "summary": {"action": "观望", "score": 72, "confidence": "中"}
}

Signal type

Signal Meaning Action
BUY Buy signal Can open a position
HOLD Hold and wait Wait for a better opportunity
SELL Sell signal Reduce position/exit

For detailed trading rules, see references/trading-rules.md