{"repo":"gaaiyun/joinquant-skill","free":true,"listed":false,"github":"https://github.com/gaaiyun/joinquant-skill","clone":"git clone https://github.com/gaaiyun/joinquant-skill.git","description":"AI agent skill for generating quantitative strategy code on JoinQuant platform - Cursor / Claude Code compatible","language":"Python","stars":70,"topics":["agent-skill","ai","backtesting","claude-code","cursor","etf","joinquant","lint","python","quant"],"license":null,"category":"trading","readme_excerpt":"JoinQuant Skill 让 AI agent（Cursor / Claude Code / Codex / OpenCode 等）能正确生成符合 聚宽（JoinQuant）平台 的量化策略代码。 项目本身不教 AI 做策略，而是给 AI 一份结构化的 API 知识库、可粘贴运行的策略模板、静态检查工具、因子库与单因子分析工具，以及一条把券商研报变成聚宽策略代码的流水线。所有产物都被组织成一个可 install 的 skill，被 Cursor / Claude Code / MCP 客户端按需检索。 一、它解决什么具体问题 用 Claude / Cursor 写聚宽策略时反复遇到的几个坑： 1. 模型乱编 API ：让它写 DiD 它返回 pandas.DataFrame.diff in diff() ；让它写聚宽策略它返回 jqdata.get stock data() ——这些函数都不存在。 2. 数据 API 与回测 API 混淆 ：聚宽的 get price() 在回测里和研究里行为不一样，模型常不分场景乱用。 3. 未来函数防不胜防 ：回测里能跑、实盘崩盘的常见原因。 4. 复权模式搞错 ：传统前复权 vs 真实价格（动态复权），细节一错全盘皆错。 5. API 文档塞不进 prompt ：294KB 的官方文档不可能整段塞，但只塞一部分模型又用不全。 这些问题不是写更长的 prompt 能解决的，所以我们把它们封装成一个 可 install 的 skill ——按需检索、按场景路由、本地 lint。 二、能力地图（五大模块 + MCP 暴露层） 模块 是什么 怎么用 能粘到聚宽编辑器跑吗 --- --- --- --- references/ 把官方 294KB API 文档按主题拆成 14 份 markdown，让 AI 按场景关键词加载（progressive disclosure），不再一次塞整本。 Cursor / Claude Code 读 SKILL.md 路由表自动选；人类直接 notepad references/02-data-getters.md — 知识库本身不入聚宽 templates/ + scripts/strategy scaffold.py 5 个生产可用的策略骨架（基础单股 / 多因子 / ETF 轮动 / 动量 / 均值回归），每行关键 API 旁注 # RATIONALE 。 python scripts/strategy scaffold.py --type rotation --security 510300.XSHG --hold-num 5 是 — 直接复制 scripts/strategy lint.py 静态检查 25+ 条常见错误：编造 API、未来函数、缺 use real price / order cost / slippage、在非交易时段下单等。 --strict 模式开启 JQ005 白名单严格校验。 python scripts/strategy lint.py my strategy.py --strict — 检查工具，不入聚宽 factors/ 9 个示例因子的注册表（value / momentum / quality / growth / size / volatility / reversal 七类）。每个因子带文献引用、聚宽官方 factor id 映射、推荐中性化协变量、已知陷阱。底层调聚宽官方 get factor values ，不重写计算。","default_branch":null,"files":null,"tree":[],"storefront":"/r/gaaiyun","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/gaaiyun/joinquant-skill/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}