← 返回 Skills 市场
hmaya

A Share Trader

作者 hmaya · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
224
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install a-share-trader
功能描述
A股核心交易框架,整合12种选股策略的自适应量化交易系统
使用说明 (SKILL.md)

A股核心交易框架

概述

基于用户提供的12种选股策略,结合自适应交易引擎,构建的A股量化交易系统。系统具备市场状态识别、策略动态切换、风险自适应控制等高级功能。

整合策略列表

  1. 基本面选股策略 - 质量+增长双因子
  2. 防御选股策略 - 高股息价值投资
  3. 震荡选股策略 - KDJ技术指标
  4. 小市值策略 - 月度切换的小市值轮动
  5. 基本面加小市值 - 质量小市值混合
  6. 小市值成长 - 小市值成长股精选
  7. 营收利润双增 - 增长质量策略
  8. 价值成长 - 价值成长平衡
  9. 控盘策略 - 筹码集中度选股
  10. 社保重仓 - 机构跟随策略
  11. 超跌反弹 - 均值回归策略
  12. 时空共振策略 - 四维度综合模型

核心特性

  • 自适应市场感知:识别牛熊市、震荡市等不同市场状态
  • 策略动态权重:根据不同市场环境自动调整策略权重
  • 智能参数调整:基于市场状态动态调整策略阈值
  • 多维度风控:个股、行业、组合多层风控
  • 学习优化机制:从交易绩效中持续学习优化

系统架构

A股核心交易框架/
├── core/                  # 核心引擎
│   ├── a_share_trader.py  # 主交易引擎
│   ├── adaptive_engine.py # 自适应引擎
│   └── data_interface.py  # A股数据接口
├── strategies/            # 策略模块
│   ├── __init__.py
│   ├── base_strategy.py   # 策略基类
│   ├── fundamental.py     # 基本面策略
│   ├── defensive.py       # 防御策略
│   ├── swing_trading.py   # 震荡策略
│   ├── small_cap.py       # 小市值策略
│   ├── quality_small_cap.py # 质量小市值
│   ├── small_cap_growth.py # 小市值成长
│   ├── revenue_profit.py  # 营收利润双增
│   ├── value_growth.py    # 价值成长
│   ├── chip_concentration.py # 控盘策略
│   ├── social_security.py # 社保重仓
│   ├── oversold_rebound.py # 超跌反弹
│   └── resonance.py       # 时空共振策略
├── risk_management/       # 风险管理
│   ├── core.py            # 风控核心
│   ├── position.py        # 仓位控制
│   └── stop_loss.py       # 止损策略
├── config/                # 配置
│   └── trading_config.py  # 交易配置
├── utils/                 # 工具函数
├── tests/                 # 测试
└── examples/              # 使用示例

调用方式

在智能体提示中直接请求执行此技能,例如:

"请运行A股交易框架进行模拟交易" "使用A股框架分析当前市场状态" "执行A股策略回测"

数据需求

  • A股实时行情数据
  • 基本面数据(财务指标)
  • 技术指标数据
  • 市场情绪数据(可选)

输出示例

{
  "status": "running",
  "market_state": "weak_bull",
  "state_confidence": 0.72,
  "active_strategies": 8,
  "portfolio_value": 10000000000,
  "total_return": 0.15,
  "max_drawdown": 0.08,
  "active_positions": 12
}

注意事项

  1. 系统为量化交易框架,实盘交易需谨慎
  2. 需要可靠的数据源支持
  3. 建议先进行充分的回测和模拟交易
  4. 注意市场风险,控制仓位和回撤
安全使用建议
This package is a full trading framework and appears to run both simulated and (optionally) real-data workflows. Before installing or running: - Treat it as potentially network‑enabled: run only in 'paper' or isolated environment until you audit the code that executes trades. The quick_start and quick_start_optimized scripts initialize data connectors and may trigger network calls. - Do not provide real brokerage or data-provider credentials until you have reviewed the parts of core/a_share_trader.py and any execution/ordering modules (files truncated in the listing) to confirm where and how credentials are used. - Expect to need tokens such as tushare/xtquant or broker API keys; the skill currently does not declare these env vars — ask the author to document required env vars (e.g., TUSHARE_TOKEN, XTQUANT credentials, broker API keys) and why each is needed. - Run the system locally in paper/backtest mode first, inspect log file (a_share_trader.log), and run the provided tests before any live trading. - If you plan to use live trading, review all code paths that place orders or call external libs to ensure credentials are not accidentally exfiltrated and to confirm the skill only calls expected broker/data APIs. Confidence is limited by truncated/omitted files in the package listing; if the remaining files show explicit broker SDK calls or remote endpoints and a lack of explicit credential handling, that would raise the concern level. If instead the full code clearly confines itself to simulation and mocks external calls (and documents required credentials for optional connectors), the assessment could shift toward benign.
功能分析
Type: OpenClaw Skill Name: a-share-trader Version: 1.0.0 The 'a-share-trader' bundle is a comprehensive quantitative trading framework for the Chinese A-share market. It features a modular architecture including a main trading engine (a_share_trader.py), a market-adaptive engine (adaptive_engine.py) for dynamic strategy weighting, and multiple specific strategy implementations (e.g., fundamental.py, small_cap.py). The code follows standard financial engineering patterns, utilizing legitimate data interfaces like Tushare and XTQuant, and includes robust mock data generators for safe testing. No evidence of data exfiltration, unauthorized execution, or malicious prompt injection was found; the dynamic module loading is restricted to hardcoded internal strategy paths.
能力评估
Purpose & Capability
Name/description match the included code: core engine, 12 strategies, data interfaces and quick-starts are present. Requiring stock data and trading permissions is consistent with a trading framework. However, the SKILL.md lists '需要股票数据访问和交易权限' but the registry metadata declares no required env vars or primary credential — that is disproportionate for a real trading skill which normally needs broker/API tokens and data-provider keys.
Instruction Scope
SKILL.md instructs an agent to 'run the trading framework' for simulation/backtest/real trading and lists data needs (real-time quotes, fundamentals, optional market sentiment). The instructions do not enumerate what secrets or endpoints will be used, or constrain the agent to paper mode. The included code contains a RealAShareDataInterface that tries to import xtquant/tushare (real data sources) and quick_start/optimized scripts that can initialize real-data connectors; running the skill in live mode could attempt network access and (potentially) order placement. The SKILL.md gives the agent broad permission to 'execute' without explicitly requiring or declaring the precise credentials it will use.
Install Mechanism
No install spec; code files are bundled in the skill. That means nothing is downloaded at install time beyond the shipped files (lower install-time risk). The code will import third‑party Python packages (numpy, pandas, xtquant, tushare, etc.) at runtime, but the skill does not perform external downloads during install.
Credentials
Registry shows no required env vars or primary credential, but the code uses real-data interfaces that typically require provider tokens (tushare token is explicitly mentioned in a comment) and may require brokerage API credentials for live trading. The omission of declared credential requirements is a coherence gap — a trading skill should list the exact credentials it will use and request only those.
Persistence & Privilege
always:false and disable-model-invocation:false (defaults). The skill does not request forced/always-on presence. The code writes local logs (a_share_trader.log) and persists runtime state to in‑memory structures; there is no evidence in the visible files that it modifies other skills or system-wide agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install a-share-trader
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /a-share-trader 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of the A-share Trader quantitative trading framework. - Integrates 12 distinct stock selection strategies for the China A-share market. - Features adaptive market state recognition and dynamic strategy weighting. - Includes multi-layer risk management and continuous learning optimization. - Supports real-time market data, fundamental data, and technical indicators. - Provides modular architecture for extensibility and clear separation of trading, strategy, and risk components.
元数据
Slug a-share-trader
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

A Share Trader 是什么?

A股核心交易框架,整合12种选股策略的自适应量化交易系统. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 224 次。

如何安装 A Share Trader?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install a-share-trader」即可一键安装,无需额外配置。

A Share Trader 是免费的吗?

是的,A Share Trader 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

A Share Trader 支持哪些平台?

A Share Trader 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 A Share Trader?

由 hmaya(@hmaya)开发并维护,当前版本 v1.0.0。

💬 留言讨论