经 AI Skill Hub 精选评估,stock-selection-strategy-skill Agent工作流 获评「推荐使用」。这款Agent工作流在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。
stock-selection-strategy-skill Agent工作流 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
stock-selection-strategy-skill Agent工作流 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:pip 安装(推荐)
pip install stock-selection-strategy-skill
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install stock-selection-strategy-skill
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/MisonL/stock-selection-strategy-skill
cd stock-selection-strategy-skill
pip install -e .
# 验证安装
python -c "import stock_selection_strategy_skill; print('安装成功')"
# 命令行使用
stock-selection-strategy-skill --help
# 基本用法
stock-selection-strategy-skill input_file -o output_file
# Python 代码中调用
import stock_selection_strategy_skill
# 示例
result = stock_selection_strategy_skill.process("input")
print(result)
# stock-selection-strategy-skill 配置文件示例(config.yml) app: name: "stock-selection-strategy-skill" debug: false log_level: "INFO" # 运行时指定配置文件 stock-selection-strategy-skill --config config.yml # 或通过环境变量配置 export STOCK_SELECTION_STRATEGY_SKILL_API_KEY="your-key" export STOCK_SELECTION_STRATEGY_SKILL_OUTPUT_DIR="./output"
一套给 AI Agent 使用的通用选股策略 Skill。它把股票候选筛选拆成可解释、可验证、可复用的流程:先定义数据契约,再计算因子,之后评分、过滤、排序和解释结果。
本 Skill 不绑定任何行情源、券商接口或项目仓库。默认优先处理本地 CSV 或 Parquet 数据,适合用于 A 股、港股、美股等股票数据集的规则化选股、多因子评分、短线异动识别和策略审查。
| 能力 | 说明 |
|---|---|
| 通用选股流程 | 覆盖输入数据契约、股票池过滤、技术因子、短线异动、风险控制和输出解释。 |
| QSSS-derived 剖面 | 保留从 QSSS 原实现提炼出的 A 股默认口径,但不依赖 QSSS 仓库或运行环境。 |
| 本地可复现脚本 | 提供 OHLCV 校验、候选股评分、通用配置和 QSSS-derived 配置。 |
| 显式失败边界 | 字段缺失、预测缺失、配置错误、脚本环境问题都会显式暴露,不伪造成功结果。 |
| Agent 友好 | SKILL.md 可直接作为 Skill 入口,evals/ 可用于验证 Agent 是否正确触发和使用。 |
以下命令假设 uv 已安装并在 PATH 中。若当前环境没有 uv,可先创建临时虚拟环境:
python3 -m venv /tmp/stock-selection-skill-venv
/tmp/stock-selection-skill-venv/bin/python -m pip install -r requirements.txt
使用备用虚拟环境时,将下文 uv run --with ... python 替换为 /tmp/stock-selection-skill-venv/bin/python。 读取 Parquet 输入还需要安装 pyarrow 或 fastparquet;只处理 CSV 时不需要额外 Parquet 引擎。无 uv 且需要 Parquet 时,使用 /tmp/stock-selection-skill-venv/bin/python -m pip install -r requirements-parquet.txt。运行真实 LightGBM 预测生成器时,还需要安装 requirements-ml.txt。
本仓库以 CLI 脚本为稳定入口。若在 Python 代码中复用脚本,请将 scripts/ 加入 PYTHONPATH 或 sys.path;仓库当前不提供可安装 Python package。
python3 scripts/create_demo_data.py --output /tmp/stock-selection-demo
生成文件:
/tmp/stock-selection-demo/prices.csv/tmp/stock-selection-demo/prices_with_prediction.csvuv run --with pandas --with numpy python scripts/score_candidates.py \
--input /tmp/stock-selection-demo/prices.csv \
--config scripts/example_config.json \
--output /tmp/stock-selection-demo/candidates.csv
uv run --with pandas --with numpy python scripts/score_candidates.py \
--input /tmp/stock-selection-demo/prices_with_prediction.csv \
--config scripts/qsss_profile_config.json \
--output /tmp/stock-selection-demo/qsss_candidates.csv
/tmp/stock-selection-skill-venv/bin/python "$QUICK_VALIDATE" "$(pwd)" python3 -m json.tool evals/evals.json >/tmp/stock-selection-evals.json python3 -m json.tool scripts/example_config.json >/tmp/stock-selection-example-config.json python3 -m json.tool scripts/qsss_profile_config.json >/tmp/stock-selection-qsss-config.json uv run --with pyyaml python - <<'PY' import yaml from pathlib import Path assert yaml.safe_load(Path("agents/openai.yaml").read_text())["interface"]["display_name"] PY PYTHONPYCACHEPREFIX=/tmp/stock-selection-pycache python3 -m py_compile scripts/*.py PYTHONDONTWRITEBYTECODE=1 uv run --with pandas --with numpy --with pyarrow python -m unittest discover -s tests -v
如需 smoke test,可使用 demo 数据运行;该 smoke 只验证本地文件读取、评分和输出流程,不代表真实行情接入、真实 LightGBM prediction 生成链路或真实回测已经通过。
bash python3 scripts/create_demo_data.py --output /tmp/stock-selection-demo uv run --with pandas --with numpy python scripts/score_candidates.py \ --input /tmp/stock-selection-demo/prices.csv \ --config scripts/example_config.json \ --output /tmp/stock-selection-demo/candidates.csv
/tmp/stock-selection-skill-venv/bin/python scripts/score_candidates.py \ --input /tmp/stock-selection-demo/prices.csv \ --config scripts/example_config.json \ --output /tmp/stock-selection-demo/candidates.csv ```
用于设计可解释选股流程、审查数据泄漏或不可验证结论,并基于本地行情文件生成候选股 CSV。
高质量的选股策略工作流
该工具未明确声明开源协议,商业使用前请联系原作者确认授权范围,避免侵权风险。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
AI Skill Hub 点评:stock-selection-strategy-skill Agent工作流 的核心功能完整,质量良好。对于自动化工程师和运维人员来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | stock-selection-strategy-skill |
| 原始描述 | 开源AI工作流:通用选股策略 Skill,面向 AI Agent 的可解释多因子选股工作流。⭐6 · Python |
| Topics | AI选股工作流 |
| GitHub | https://github.com/MisonL/stock-selection-strategy-skill |
| 语言 | Python |
收录时间:2026-05-30 · 更新时间:2026-05-31 · License:未公布 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端