Cffex Trader — Development skill for Claude Code
cffex-trader 是一个构建在「东方财富期货·中金所杯模拟交易 skill」(dfcfqh-zjsbsimrace)之上的交易编排增强框架,为 Claude Code skill 生态设计.
How to install Cffex Trader
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open chemiclu/cffex_trader and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Cffex Trader does
cffex-trader 是一个构建在「东方财富期货·中金所杯模拟交易 skill」(dfcfqh-zjsbsimrace)之上的交易编排增强框架,为 Claude Code skill 生态设计。它在东方财富官方 skill 的「账户查询 + 模拟下单」能力之上,补齐了从数据 → 信号 → 执行 → 风控 → 复盘的完整量化交易闭环,覆盖中金所全部 8 个期货品种
Alternatives in Development
- Crypto Market Rank — Query crypto market rankings including trending tokens, smart money inflows, meme rankings, and top trader PnL 483 ★
- Trading Analysis — Multi-agent trading analysis for a stock ticker 14 ★
- Mt Last — Show any trader's most recent trade and total trade count (free, no auth required) 3 ★
README
cffex-trader · CFFEX 多品种期货多因子轮动(开源分享版)
中金所 8 品种(IF/IH/IC/IM 股指 + TS/TF/T/TL 国债)的**多因子截面轮动**交易编排框架, 整合「数据更新 → 信号生成 → 委托执行 → 风控止损 → 换月检测」完整闭环,为 Claude Code skill 生态设计,也可独立作为 Python CLI 使用。 详细介绍可阅读INTRO.md
**仅供模拟交易 / 学习研究使用,不构成投资建议。** 期货交易风险极高,请勿接入真实资金。
**⚠️ 策略引擎不随本仓库分发**:`futures_multifactor_engine.py` 需用户手动放入本目录 (见下方「策略引擎获取」)。缺省时查询/风控命令可用,策略类命令会明确报错。
架构
┌─────────────┐ OHLC ┌──────────────────┐ signal.json ┌─────────────────┐
│ futures- │ ───────▶ │ │ ────────────▶ │ │
│ trader (DB) │ │ orchestrator.py │ │ 模拟交易 API │
└─────────────┘ │ (本仓库) │ ◀──────────── │ (账户/下单) │
┌─────────────┐ basis/ │ │ 确认后下单 └─────────────────┘
│ Wind/akshare│ YTM │ │
└─────────────┘ ───────▶ └──────────────────┘
┌─────────────┐ 新闻 ┌──────────────────┐
│ mx-search │ ───────▶ │ 消息面情绪 overlay│
│ (可选) │ └──────────────────┘
- 策略引擎(用户自备)
futures_multifactor_engine.py:vol/mom/carry 三因子截面排名加权, 做多前 2、做空后 2;Carry 按股债分组排名(股指 basis / 国债 YTM)。 - 编排器
orchestrator.py:CLI 入口 + 下单执行 + 增量调仓 + 风控(本仓库核心)。
功能特性
| 模块 | 说明 |
|---|---|
| 增量调仓 | 对照当前持仓只下差异单;先平后开;同向跨月自动滚动 |
| 实时对手价 | TqSdk 免费行情:买报卖一、卖报买一;失败回退收盘参考价 |
| 消息面因子 | mx-search 新闻情绪按组打分,W_NEWS 权重并入综合得分(可关) |
| 自动换月检测 | 合约到期预警 / 映射失效报警(下单前硬阻断)/ 持仓跨月提示 |
| 软件侧止损 | 浮亏 ≤ −8 万 或 使用率 ≥ 95% 自动平仓(盯盘任务在线时) |
| 信号反馈闭环 | signal_log.jsonl 归档 + report 回放多空方向命中率 |
| 交易记录同步 | 下单后自动把账户快照/委托/持仓写进 Markdown 日志(幂等) |
| 部署自检 | doctor 命令逐项检查依赖/凭据/数据/映射,自动生成上手教程 |
快速开始
请先前往东方财富APP中金所杯界面,获取AI下单skill(请注意不要泄露个人APIKEY)
# ⓪ 放入策略引擎(不随仓库分发,见「策略引擎获取」)
# 放置路径:本目录,文件名 futures_multifactor_engine.py
# ① 安装依赖
pip install pandas requests akshare tqsdk
# ② 配置环境变量(CFAPIKEY 必需,其余可选)
export CFAPIKEY="<你的模拟交易用户ID>"
# ③ 部署自检(首次运行会生成 GETTING_STARTED.md 个性化教程)
python orchestrator.py doctor
# ④ 日常使用
python orchestrator.py update # 更新 OHLC 数据
python orchestrator.py signal
Related Skills
Mt Search
Search for a trader by handle or name (x402 paid, $0.02 USDC on Base)
Mt Stats
Look up a trader's stats -- score, rank, trade count, and open positions (free)
Trader Skill
11 Claude skills that copy the investors you trust, watch the news and Congress, size every trade to your budg
Nse Trader Skills
13 Claude skills for NSE (India) trading and long-term investing: Nifty 500 scanner, fundamentals scorecard, m
Auto Update
Pull the latest ECC repo changes and reinstall the current managed targets.
Ecc Guide
Navigate ECC's current agents, skills, commands, hooks, install profiles, and docs from the live repository su
Related Agents
Nautilus Trader Architect
Execution Trader
The only Bot on the desk that places, modifies or cancels Hyperliquid orders. Executes one approved ticket at
Volatility Trader
Volatility trading specialist for vol surface analysis, variance swaps, dispersion trading, and VIX strategies