Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By quantskillsGPL-3.0In 1 marketplace
Converts JoinQuant strategy code into PandaAI JSON configurations runnable in backtests.
Claude loads one when your task matches it, or you run it by name.
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
简体中文 | English
将聚宽(JoinQuant)平台的量化策略代码转换为PandaAI(盘达)平台的策略代码。理解策略思想,而非逐行翻译,输出可直接运行回测的PandaAI JSON策略配置文件。
本 Skill 用于将 JoinQuant(聚宽)平台上的 Python 量化策略迁移到 PandaAI(盘达)平台。
核心原则:这不是一个简单的代码逐行翻译器。JoinQuant 和 PandaAI 的策略架构有本质不同(函数驱动 vs JSON 配置驱动)。本 Skill 在理解原始策略的交易逻辑、信号构造、执行规则和选股范围的基础上,重新用 PandaAI 的格式生成策略。
输入:聚宽策略 Python 文件
输出:PandaAI JSON 策略配置 + 转换报告
cp -r skill-jq-to-panda-converter ~/.claude/skills/jq-to-panda-converter
将这个聚宽均线策略转换成PandaAI可运行的策略配置
把这个多因子选股策略从聚宽迁移到PandaAI,输出JSON和转换报告
skill-jq-to-panda-converter/
├── SKILL.md # 主入口
├── README.md
├── README.en.md
├── LICENSE
├── .gitignore
├── references/
│ ├── jq_patterns.md # 聚宽 API 模式大全(含 PandaAI 等价映射表)
│ ├── panda_format.md # PandaAI JSON 策略配置格式详解
│ ├── step_by_step_guide.md # 逐步骤转换指南(含完整示例)
│ └── source_boundary.md # 数据源边界约束
├── examples/
│ ├── ma_crossover_jq.py # 聚宽 MA5/MA20 均线交叉策略(原始代码)
│ ├── ma_crossover_panda.json # 转换后的 PandaAI 配置
│ └── conversion_report.md # 转换报告
└── agents/
└── openai.yaml
| 聚宽 API | PandaAI 等价 | 映射方式 |
|---|---|---|
attribute_history(s, c, u, f) | get_price(pro_code, u, count=c)[f] | strategy_content 代码 |
order(s, amt) | trade_template[].amount | JSON 配置字段 |
order_value(s, val) | amount: 0.xx (百分比) | JSON 配置字段 |
order_target(s, 0) | type: "close" | JSON 配置字段 |
run_daily(f, 'every_bar') | freq_type: 'every_bar' | JSON 配置字段 |
g.variable | Python 变量 / keep | strategy_content 代码 |
context.portfolio.available_cash | amount: 0.95 公式 | JSON 配置字段 |
log.info(...) | print(...) | strategy_content 代码 |
get_index_stocks(idx) | stockpool_type: "index" | JSON 配置字段 |
完整映射表见 references/jq_patterns.md。
| 约束 | 说明 |
|---|---|
| 🌐 聚宽专有API限制 | get_fundamentals(query(...))、get_extra_info()等API无直接等价,需转换策略逻辑 |
| 🚫 不翻译框架函数 | run_daily/run_weekly/run_monthly不译为Python代码,映射为JSON配置字段 |
| ⚠️ 信号语义优先 | 确保交易信号条件等效,而非API语法精确匹配 |
| 📋 回测参数一致 | 显式指定start_date、end_date、init_cash等参数 |
| 🔄 状态变量迁移 | 聚宽g.对象和context.portfolio映射到keep字段或Python变量 |
本仓库仅作研究方法层面的整理,不保证两个平台的回测结果完全一致(填充算法、滑点模型、数据源差异会导致差异)。
GPL-3.0.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground
jq-to-panda-converter@quantskills is listed by quantskills/registry — review the source before installing
npx claudepluginhub quantskills/registry --plugin jq-to-panda-converter