qmt-bridge-daily-pnl

qmt-bridge-daily-pnl is a skill for Claude Code, Codex from atorber/qmt-trading-skill. It costs 67 tokens per session (720 once invoked), scanned A, original, MIT.

A read-only QMT Bridge report of an account’s profit or loss for the current trading day, using holdings, trades and market prices. It also includes positions that were fully sold today.

In plain words
What is it for?
Use it to answer how much the account made or lost today and to break the result into gains on earlier holdings, today’s purchases and completed sales.
Why use it?
It avoids mistaking current holdings and price changes for the whole day’s result, especially when shares were bought or sold during the day.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **实现状态**:✅ `daily_pnl_snapshot.py` 可用(见 [ROADMAP.md](../ROADMAP.md)).

Good fit Use it to answer how much the account made or lost today and to break the result into gains on earlier holdings, today’s purchases and completed sales.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/atorber/qmt-trading-skill
agentmods
npx agentmods add skills/atorber/qmt-trading-skill/qmt-bridge-daily-pnl

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for qmt-bridge-daily-pnl

README.md
[![agentmods](https://agentmods.dev/badge/skills/atorber/qmt-trading-skill/qmt-bridge-daily-pnl/github.svg)](https://agentmods.dev/skills/atorber/qmt-trading-skill/qmt-bridge-daily-pnl)
Your own site
<a href="https://agentmods.dev/skills/atorber/qmt-trading-skill/qmt-bridge-daily-pnl"><img src="https://agentmods.dev/badge/skills/atorber/qmt-trading-skill/qmt-bridge-daily-pnl/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for qmt-bridge-daily-pnl

Your own site · 80×15
<a href="https://agentmods.dev/skills/atorber/qmt-trading-skill/qmt-bridge-daily-pnl"><img src="https://agentmods.dev/badge/skills/atorber/qmt-trading-skill/qmt-bridge-daily-pnl.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 720 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00067 $0.00720
Opus 5 $0.00034 $0.00360
Sonnet 5 $0.00013 $0.00144
Haiku 4.5 $0.00007 $0.00072

Measured 12d ago against content hash ca748005e80b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

qmt-bridge-daily-pnl scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/daily_pnl_snapshot.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/qmt-bridge-daily-pnl/SKILL.md · 60 lines

What it actually says

QMT Trading Skill · 当日盈亏

实现状态:✅ daily_pnl_snapshot.py 可用(见 ROADMAP.md

目标

快速回答「今天账户盈亏多少」:优先 QMT today_profit_loss;否则用持仓 + 当日成交 + 行情计算(非仅当前持仓量 × 涨跌幅)。

估算公式(单标的):

当日盈亏 = 现市值 − 昨收×昨仓 − 今日买入金额 + 今日卖出金额

拆解:昨仓浮动、今买浮动、今卖已实现;已清仓但当日有卖出的标的单独列出。

脚本

脚本 作用
scripts/daily_pnl_snapshot.py asset + positions + trades,汇总当日盈亏(含已清仓)
python skills/qmt-bridge-daily-pnl/scripts/daily_pnl_snapshot.py --host 127.0.0.1 --port 8080 --api-key KEY
python skills/qmt-bridge-daily-pnl/scripts/daily_pnl_snapshot.py --json

主要 API

方法 路径 说明
GET /api/trading/positions 持仓(含昨仓、QMT 当日盈亏等)
GET /api/trading/trades 当日成交(买卖金额)
GET /api/trading/asset 资产
GET /api/market/full_tick 现价/昨收
GET /api/utility/batch_stock_name 中文名称

操作规程

  1. positionstradesasset
  2. 按标的汇总当日买入/卖出量与金额;昨仓优先 yesterday_volume,否则 现仓 − 今买 + 今卖
  3. 有 QMT today_profit_loss 则直接采用;否则用上述公式 + full_tick 现价/昨收
  4. 输出持仓标的与当日已清仓标的;可选 --no-detail 隐藏拆解
  5. 只读;与柜台可能有手续费/分红等细微差异

安全

  • 只读;交易查询需 X-API-Key
  • 不提供投资建议式结论

参考

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 60 lines · 67 tokens per session scan A ca748005e80b

Subscribe to this mod's changes

qmt-bridge-daily-pnl is a skill published in the GitHub repository atorber/qmt-trading-skill (22 stars, last pushed 29d ago), licensed MIT. It adds 67 tokens to every session and 720 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

sector-rotation

An analysis framework for comparing industries in the Chinese A-share stock market, using business conditions, price momentum, valuation, and money flows. It produces rankings and higher- or lower-allocation suggestions.

HKUDS/Vibe-Trading · 39 tokens

strategy-pivot-designer

Detect backtest iteration stagnation and generate structurally different strategy pivot proposals when parameter tuning reaches a local optimum.

tradermonty/claude-trading-skills · 28 tokens

twitter-reader

Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my…

himself65/finance-skills · 161 tokens

chenhao-limit-up

A framework for judging Chinese A-share stocks that have reached the daily price-rise limit, using market mood, sector leadership, and trading momentum.

questflowai/investorskills · 44 tokens

furusato

A Japanese hometown-tax donation manager for furusato nozei, a system where donations to municipalities can qualify for an income-tax or local-tax deduction. It reads donation receipts, stores donation records, and calculates deduction limits.

kazukinagata/shinkoku · 102 tokens

reading-receipt

An image-reading workflow for extracting structured information from receipts, invoices, and hometown-tax donation certificates. It can first extract text from PDFs and otherwise read their images.

kazukinagata/shinkoku · 64 tokens