Skip to content
Back to skills

Qmt Bridge Rebalance

ASecurity

通过 QMT Bridge 根据目标权重生成组合再平衡买卖清单,预览后批量下单。 在用户提到调仓、再平衡、目标仓位、权重对齐时使用。提交须用户确认。

  • 19 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 2, 2026
ai-agentsgitapi

Works with

  • api

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 2, 2026

npx -y skills add Serennity007/awesome-stock-quant-skills --skill qmt-bridge-rebalance --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Qmt Bridge Rebalance?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Qmt Bridge Rebalance
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/serennity007-qmt-bridge-rebalance/badge)](https://www.skillsdirectory.com/skills/serennity007-qmt-bridge-rebalance)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: qmt-bridge-rebalance
description: >-
  通过 QMT Bridge 根据目标权重生成组合再平衡买卖清单,预览后批量下单。
  在用户提到调仓、再平衡、目标仓位、权重对齐时使用。提交须用户确认。
---

# QMT Trading Skill · 组合再平衡

> **实现状态**:✅ `rebalance_plan.py` 可用

## 目标

将**目标权重表**转为买卖差额清单,减少手工算股数错误。

## 规划脚本

| 脚本 | 作用 |
|------|------|
| `scripts/rebalance_plan.py` | `--targets` JSON/CSV;输出买卖预览 |
| (提交) | 预览确认后调用 `batch_order`(`--execute --confirm`) |

## 主要 API

| 方法 | 路径 | 说明 |
|------|------|------|
| GET | `/api/trading/positions` | 当前持仓 |
| GET | `/api/trading/asset` | 总资产 |
| GET | `/api/market/full_tick` | 现价估市值 |
| POST | `/api/trading/batch_order` | 批量下单 |

## 规程(规划)

1. 读入目标权重(总和应≈1,允许现金权重)
2. 当前市值 vs 目标 → 差额股数(整手取整规则:A 股 100 股)
3. 输出买卖列表 + 预估成交金额
4. **用户确认**后执行 `batch_order`
5. 执行后建议 [execution-review](../qmt-bridge-execution-review/SKILL.md) 核对

## 安全

- 批量下单影响大;必须双重确认
- 先 [portfolio-risk](../qmt-bridge-portfolio-risk/SKILL.md) 可选

## 参考

- [qmt-bridge-trading](../qmt-bridge-trading/SKILL.md) · `[REST API](https://atorber.github.io/qmt-bridge/rest-api/)`

Files in this skill

  • SKILL.md1.5 KB
  • scripts/README.md162 B
  • scripts/rebalance_plan.py6.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…