# Qmt Bridge Portfolio Risk

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-atorber-qmt-trading-skill-qmt-bridge-portfolio-risk`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [atorber](https://agentstack.voostack.com/s/atorber)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [atorber](https://github.com/atorber)
- **Source:** https://github.com/atorber/qmt-trading-skill/tree/main/skills/qmt-bridge-portfolio-risk
- **Website:** https://atorber.github.io/qmt-trading-skill/

## Install

```sh
agentstack add skill-atorber-qmt-trading-skill-qmt-bridge-portfolio-risk
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# QMT Trading Skill · 组合风险

> **实现状态**：✅ `portfolio_snapshot.py` 可用

## 目标

**下单前**快速回答：钱够不够、仓是否过重、哪些票今天不能卖。

## 规划脚本

| 脚本 | 作用 |
|------|------|
| `scripts/portfolio_snapshot.py` | positions + asset + 批量 tick 算权重与浮盈（可选） |

## 主要 API

| 方法 | 路径 | 说明 |
|------|------|------|
| GET | `/api/trading/positions` | 持仓 |
| GET | `/api/trading/asset` | 资产 |
| GET | `/api/market/full_tick` | 现价（批量） |
| GET | `/api/trading/position/{stock_code}` | 单票核查 |

## 规程（规划）

1. 拉 `asset`：`cash`、`market_value`、`total_asset`
2. 拉 `positions`，计算单票 `market_value / total_asset`
3. **阈值提示**（可在脚本参数配置）：单票权重 >30% 警告；现金占比过低警告
4. `can_use_volume < volume` → 标注 T+1 可卖不足
5. 通过 `batch_stock_name` 显示中文名称
6. 只读，不自动下单

## 安全

- 只读；交易查询需 API Key
- 阈值规则由用户配置，Skill 不做投资建议

## 参考

- [qmt-bridge-trading](../qmt-bridge-trading/SKILL.md) · `docs/rest-api.md`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [atorber](https://github.com/atorber)
- **Source:** [atorber/qmt-trading-skill](https://github.com/atorber/qmt-trading-skill)
- **License:** MIT
- **Homepage:** https://atorber.github.io/qmt-trading-skill/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-atorber-qmt-trading-skill-qmt-bridge-portfolio-risk
- Seller: https://agentstack.voostack.com/s/atorber
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
