trade-pilot

TradePilot — a multidimensional quantitative stock analysis framework. Integrates modules such as technical analysis, risk quantification, strategy backtesting, sentiment analysis, macro analysis, and industry analysis. Applicable to single‑stock analysis in A‑shares, HK stocks, US stocks, and similar markets.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "trade-pilot" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-eb3dd78b62e1b559d0861bf8a51655b8647351cbbf132e10a6d29c87a61620ac. Verify the upstream source and version against https://skillhub.cn/skills/user_31e3f164/trade-pilot before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

TradePilot — a multidimensional quantitative stock analysis framework. Integrates modules such as technical analysis, risk quantification, strategy backtesting, sentiment analysis, macro analysis, and industry analysis. Applicable to single‑stock analysis in A‑shares, HK stocks, US stocks, and similar markets.

0 Downloads

Introduction source: third_party · user_31e3f164 · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Inputs and outputs
```
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: trade-pilot
version: 2.0
description: |
  交易领航(TradePilot)- 多维量化股票分析框架
  集成技术分析、风险量化、策略回测、情绪分析、宏观分析、行业分析等完整模块
  适用于A股、港股、美股等市场的个股分析
author: Hermes Agent
created: 2026-06-26
tags: [股票分析, 量化交易, 技术分析, 风险管理, 策略回测]

交易领航(TradePilot)v2.0

多维量化股票分析框架

增强版股票分析框架 v2.0

概述

这是一个全功能的股票分析框架,集成了技术分析、风险量化、策略回测、情绪分析、宏观分析和行业分析等多个模块。相比基础版本,新增了10个技术指标、6种形态识别、4项风险量化指标,以及量化回测、情绪分析、宏观分析、行业分析等完整功能。

功能特性

1. 增强版技术分析(10个指标)

指标 用途 信号解读
MA5/10/20/60 趋势判断 多头/空头排列
MACD 动能分析 金叉/死叉
RSI6/12/24 超买超卖 >70超买,<30超卖
布林带 波动区间 上轨压力,下轨支撑
KDJ 短期动量 K>D金叉,K<D死叉
OBV 量价配合 能量潮趋势
威廉%R 超买超卖 >-20超买,<-80超卖
ATR 波动率量化 真实波幅
CCI 趋势跟踪 >100超买,<-100超卖

2. 形态识别(6种)

形态 信号 可靠性
双底 看涨反转 高
双顶 看跌反转 高
上升趋势 看涨延续 中
下降趋势 看跌延续 中
锤子线 看涨反转 中
射击之星 看跌反转 中

3. 风险量化指标(4项)

指标 用途 计算方法
VaR(95%) 最大预期损失 历史模拟法
最大回撤 最大亏损幅度 峰值到谷值
夏普比率 风险调整收益 (收益-无风险)/波动率
波动率排名 历史波动分位 百分位排名

4. 量化回测引擎

支持策略:

  • MA均线策略:金叉买入,死叉卖出
  • RSI策略:超卖买入,超买卖出

回测指标:

  • 总收益率
  • 年化收益率
  • 最大回撤
  • 胜率
  • 盈亏比

5. 市场情绪分析

指标:

  • 涨停家数占比:判断市场热度
  • 量比分析:判断资金活跃度
  • 涨跌家数:判断市场宽度
  • 恐慌贪婪指数:综合情绪指标

6. 宏观经济分析

维度:

  • 经济增长:GDP增速分析
  • 通胀分析:CPI/PPI分析
  • 货币政策:M2、利率、存准率
  • 财政政策:赤字率、税收政策

7. 行业分析

维度:

  • 行业生命周期:成长期/成熟期/衰退期
  • 竞争格局:市场集中度分析
  • 产业链分析:上下游议价能力
  • 估值水平:PE/PB溢价分析

安装与配置

文件结构

enhanced-stock-analysis/
├── SKILL.md                    # 本文档
├── scripts/                    # 脚本文件
│   ├── enhanced_technical_analysis.py  # 增强技术分析
│   ├── backtest_engine.py              # 量化回测引擎
│   ├── sentiment_analyzer.py           # 情绪分析器
│   ├── macro_analyzer.py               # 宏观分析器
│   ├── industry_analyzer.py            # 行业分析器
│   └── comprehensive_analyzer.py       # 综合分析框架
├── references/                 # 参考文档
│   └── indicator_guide.md      # 指标使用指南
└── templates/                  # 模板文件
    └── analysis_report.md      # 分析报告模板

安装步骤

  1. 将整个 enhanced-stock-analysis 文件夹复制到:

    ~/AppData/Local/hermes/skills/
  2. 确认Python环境已安装:

    python --version  # 需要Python 3.7+
  3. 测试安装:

    from enhanced_technical_analysis import EnhancedTechnicalAnalysis
    print("安装成功!")

使用方法

方法一:使用综合分析框架(推荐)

import sys
sys.path.append("~/AppData/Local/hermes/skills/enhanced-stock-analysis/scripts")

from comprehensive_analyzer import ComprehensiveStockAnalyzer

# 创建分析器
analyzer = ComprehensiveStockAnalyzer("002929", "润建股份")

# 加载数据(60天K线)
analyzer.load_data(close_prices, high_prices, low_prices, volumes)

# 综合分析
report = analyzer.comprehensive_analysis()
print(report)

方法二:单独使用各模块

技术分析

from enhanced_technical_analysis import EnhancedTechnicalAnalysis

analyzer = EnhancedTechnicalAnalysis(close, high, low, volume)

# 计算所有指标
k, d, j = analyzer.kdj()
obv = analyzer.obv()
wr = analyzer.williams_r()
atr = analyzer.atr()
cci = analyzer.cci()
patterns = analyzer.detect_pattern()
scores = analyzer.comprehensive_score()

回测分析

from backtest_engine import BacktestEngine

engine = BacktestEngine(close, volume)

# MA策略回测
ma_result = engine.backtest_ma_strategy(short_period=5, long_period=20)

# RSI策略回测
rsi_result = engine.backtest_rsi_strategy(period=14, buy_threshold=30, sell_threshold=70)

情绪分析

from sentiment_analyzer import MarketSentimentAnalyzer

analyzer = MarketSentimentAnalyzer()
report = analyzer.generate_sentiment_report(
    limit_up_count=50,
    total_stocks=5000,
    current_volume=1000000000,
    avg_volume=800000000,
    advancing=3000,
    declining=1500
)

宏观分析

from macro_analyzer import MacroAnalyzer

analyzer = MacroAnalyzer()
report = analyzer.generate_macro_report(
    gdp_data={'current': 5.5, 'previous': 5.0},
    inflation_data={'cpi': 2.1, 'ppi': 1.5},
    monetary_data={'m2_growth': 10.5, 'interest_rate': 2.5, 'reserve_ratio': 9.5},
    fiscal_data={'deficit_ratio': 3.5, 'tax_policy': '减税'}
)

行业分析

from industry_analyzer import IndustryAnalyzer

analyzer = IndustryAnalyzer()
report = analyzer.generate_industry_report("半导体", {
    'revenue_growth': 25,
    'profit_growth': 30,
    'market_size_growth': 20,
    'concentration_ratio': 45,
    'market_share_top3': 35,
    'upstream_concentration': 60,
    'downstream_concentration': 40,
    'pe': 50,
    'pb': 5,
    'industry_avg_pe': 40,
    'industry_avg_pb': 4
})

标准分析流程

六步分析法

第一步:数据采集
  - 获取60天K线数据
  - 获取基本面数据
  - 获取资金流向数据

第二步:增强技术分析
  - 计算10个技术指标
  - 识别6种形态
  - 判断多空趋势

第三步:风险量化
  - 计算VaR(95%)
  - 计算最大回撤
  - 计算夏普比率
  - 计算波动率排名

第四步:综合评分
  - 趋势得分(40分)
  - 动能得分(35分)
  - 量能得分(15分)
  - 风险得分(50分)
  - 总分(140分)

第五步:信息补充
  - 搜索研报
  - 分析公告
  - 验证数据

第六步:输出决策
  - 技术分析结论
  - 风险分析结论
  - 最终操作建议
  - 风控措施

输出格式模板

## [股票名称(代码)](行情链接) 深度分析报告

### 一、技术分析

**1. 价格表现:**
- 最新收盘价:XX元
- 今日涨跌幅:XX%
- 区间涨幅:XX%

**2. 均线系统:**
- MA5/10/20/60
- 多头/空头排列判断

**3. MACD指标:**
- DIF/DEA/MACD柱
- 金叉/死叉判断

**4. RSI指标:**
- RSI6/12/24
- 超买/超卖判断

**5. KDJ指标:**
- K/D/J值
- 金叉/死叉判断

**6. 其他指标:**
- OBV、威廉%R、ATR、CCI

**7. 形态识别:**
- 识别到的形态及信号

**8. 支撑压力位:**
- 关键支撑位
- 关键压力位

### 二、风险分析

**1. 风险量化指标:**
- VaR(95%):XX%
- 最大回撤:XX%
- 夏普比率:XX
- 波动率排名:XX%

**2. 风险等级:**
- 低风险/中风险/高风险

### 三、综合评分

| 维度 | 得分 | 满分 |
|-----|------|-----|
| 趋势 | XX | 40 |
| 动能 | XX | 35 |
| 量能 | XX | 15 |
| 风险 | XX | 50 |
| **总计** | **XX** | **140** |

**评分解读:**
- 100分以上:优秀
- 70-100分:良好
- 50-70分:一般
- 50分以下:较差

### 四、最终决策

**操作建议:**
- 激进型策略
- 稳健型策略
- 保守型策略

**买入价格:**
- 激进型:XX元
- 稳健型:XX元
- 保守型:XX元

**目标位:**
- 第一目标:XX元
- 第二目标:XX元

### 五、风控措施

**止损设置:**
- 止损价格:XX元
- 止损幅度:XX%

**仓位控制:**
- 建议仓位:XX%
- 最大仓位:XX%

**持仓时间:**
- 建议持仓:XX天
- 最长持仓:XX天

评分体系详解

趋势得分(40分)

条件 得分
股价站上MA5 +10
股价站上MA20 +10
股价站上MA60 +10
MA5>MA20>MA60多头排列 +10

动能得分(35分)

条件 得分
KDJ金叉(K>D) +10
KDJ在20-80区间 +10
RSI在30-70区间 +10
RSI>50 +5

量能得分(15分)

条件 得分
量比0.8-1.5 +15
量比>1.5 +10
量比<0.8 +5

风险得分(50分)

条件 得分
基础分 +50
最大回撤<5% +20
最大回撤5-10% +10
最大回撤>20% -20

注意事项

数据要求

  1. K线数据:至少60个交易日
  2. 数据完整性:OHLCV数据完整
  3. 数据准确性:使用正规数据源

使用限制

  1. 仅供参考:分析结果不构成投资建议
  2. 风险自担:投资决策需自行判断
  3. 市场风险:股市有风险,投资需谨慎

常见问题

Q: 为什么有些指标显示"数据不足"? A: 部分指标需要较长的历史数据,建议使用60天以上的K线数据。

Q: 综合评分多少分可以买入? A: 建议100分以上积极关注,70分以上适当参与,50分以下谨慎。

Q: 如何判断形态识别的可靠性? A: 形态识别需要结合成交量确认,放量突破更可靠。

更新日志

v2.0 (2026-06-26)

  • 新增KDJ、OBV、DMI、ATR、威廉%R、CCI指标
  • 新增形态识别功能(6种形态)
  • 新增VaR、最大回撤、夏普比率等风险量化指标
  • 新增量化回测引擎(MA/RSI策略)
  • 新增情绪分析模块
  • 新增宏观分析模块
  • 新增行业分析模块
  • 新增综合评分系统(140分制)

v1.0 (初始版本)

  • 基础技术分析(MA/MACD/RSI/布林带)
  • 基本面分析
  • 资金流向分析

联系方式

如有问题或建议,请通过Hermes Agent反馈。

许可证

本框架仅供学习研究使用,不构成投资建议。股市有风险,投资需谨慎。

Current listing version

1.0.0

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value95/100

Highlights

  • 提供多维量化股票分析框架,集成技术分析、风险量化、策略回测、情绪分析、宏观分析、行业分析等完整模块
  • 适用于A股、港股、美股等市场的个股分析,功能丰富且实用
  • 新增10个技术指标、6种形态识别、4项风险量化指标,显著提升分析能力
Trigger Precision95/100

Highlights

  • description明确描述Skill功能为'多维量化股票分析框架',触发词精准完整
  • 适用范围清晰界定为'A股、港股、美股等市场的个股分析',边界清晰
Structure and Standards95/100

Highlights

  • 文档结构清晰完整,包含概述、功能特性、安装配置、使用方法、分析流程等章节
  • 提供详细的端到端代码示例和使用方法,frontmatter信息完整
Execution Reliability90/100

Highlights

  • 详细说明文件结构和安装步骤,提供Python环境要求
  • 覆盖多种使用场景的代码示例,包含异常处理说明(如数据不足提示)
Evidence Verifiability (mean of the first four)94/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.