regulatory-knowledge

regulatory-knowledge is a skill for Claude Code, Codex from HKUDS/Vibe-Trading. It costs 52 tokens per session (3,580 once invoked), scanned A, original, MIT.

A reference guide to trading rules and regulatory constraints across markets including mainland China, Hong Kong, the United States, and crypto markets.

In plain words
What is it for?
Use it when designing backtests, comparing market mechanics, setting risk controls, or checking basic regulatory and tax considerations.
Why use it?
Ignoring rules such as price limits, settlement delays, short-selling restrictions, or day-trading limits can make a backtest unrealistic or create compliance problems. The guide helps account for those constraints.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it when designing backtests, comparing market mechanics, setting risk controls, or checking basic regulatory and tax considerations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hkuds/vibe-trading/regulatory-knowledge
About the project

Vibe-Trading is a personal trading agent that gives an AI system tools for market analysis, algorithmic trading, backtesting, and related workflows. It is for users who want an agent to research and evaluate trading strategies or manage simulated and other trading activities. The catalogue contains skills that expose these trading capabilities to compatible agents.

HKUDS/Vibe-Trading · 33,085 stars · on GitHub · vibetrading.wiki

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add HKUDS/Vibe-Trading --skill regulatory-knowledge
Clone the repo
git clone --depth 1 https://github.com/HKUDS/Vibe-Trading

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 regulatory-knowledge

README.md
[![agentmods](https://agentmods.dev/badge/skills/hkuds/vibe-trading/regulatory-knowledge/github.svg)](https://agentmods.dev/skills/hkuds/vibe-trading/regulatory-knowledge)
Your own site
<a href="https://agentmods.dev/skills/hkuds/vibe-trading/regulatory-knowledge"><img src="https://agentmods.dev/badge/skills/hkuds/vibe-trading/regulatory-knowledge/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 regulatory-knowledge

Your own site · 80×15
<a href="https://agentmods.dev/skills/hkuds/vibe-trading/regulatory-knowledge"><img src="https://agentmods.dev/badge/skills/hkuds/vibe-trading/regulatory-knowledge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,580 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. ✓ AI security review Fable 5.1 · 6 Sept 2026 📄 Read the review Third-party audits
  • Snyk pass 7 Sept 2026
  • 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.00052 $0.03580
Opus 5 $0.00026 $0.01790
Sonnet 5 $0.00010 $0.00716
Haiku 4.5 $0.00005 $0.00358

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

Security

Grade A, and why

regulatory-knowledge 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 6d ago.

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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

agent/src/skills/regulatory-knowledge/SKILL.md · 301 lines

How it starts

The opening of the file, as written. The whole thing — 301 lines — stays where its author put it; the contents beside it link to each section on GitHub.

金融监管知识库

概述

量化交易必须理解的各市场监管规则。错误的交易规则假设会导致回测失真(如A股回测不考虑涨跌停限制)、实盘违规(如美股PDT限制)或税务损失。

适用场景:

  • 回测引擎中正确实现交易规则约束
  • 跨市场策略的规则差异处理
  • 合规风控参数设置
  • 税务影响纳入策略收益计算

核心概念

A股交易规则

涨跌停制度

板块 涨跌停 新股首日 ST涨跌停
主板(沪深) ±10% +44%/-36% ±5%
创业板 ±20% 前5日无限制 ±20%
科创板 ±20% 前5日无限制 ±20%
北交所 ±30% 前5日无限制 ±30%
回测影响:
  涨停时买入可能无法成交(封板)→ 信号延迟
  跌停时卖出可能无法成交(封板)→ 止损失效

回测实现:
  if daily_return >= limit_up:
      buy_signal无法执行, 推迟到次日
  if daily_return <= limit_down:
      sell_signal可能无法执行, 用跌停价模拟成交

T+1制度

A股: T日买入 → T+1日才能卖出
回测影响: 信号在T日产生 → T+1日开盘执行买入 → T+2日最早可卖出
常见错误: 回测中T日信号T日就平仓 → 虚增收益

例外:
  - 融券做空: 可T+0(融券卖出当日买券还券)
  - ETF套利: 一级市场申赎可实现T+0变相交易
  - 可转债: 实行T+0交易

融资融券/转融通

融资(杠杆做多):
  保证金比例: ≥100% (即最大杠杆2倍)
  维持担保比例: ≥130% (低于则追保; <110%强平)
  标的范围: 约1600只(流动性好的主板/创业板股票)

融券(做空):
  券源: 证券公司自有+转融通借入
  费率: 年化8-10%(远高于美股的1-2%)
  限制: 2023年后限制融券T+0, 券源大幅收紧

回测影响:
  做空策略在A股成本极高, 需扣除8-10%/年的融券费用
  实际可融券标的 < 理论标的 (券源有限)

集合竞价与连续竞价

早盘集合竞价: 9:15-9:25 (9:15-9:20可撤单, 9:20-9:25不可撤单)
  9:25 产生开盘价
连续竞价: 9:30-11:30, 13:00-14:57
尾盘集合竞价: 14:57-15:00 (不可撤单)

回测影响:
  - 日线回测默认用T+1开盘价成交
  - 尾盘3分钟集合竞价: 大单集中, VWAP策略需注意
  - 集合竞价期间的限价单可能影响开盘价

大宗交易

时间: 15:00-15:30 (收盘后)
折价: 通常折价3-8% (相对收盘价)
限制: 买入后6个月内不能在二级市场卖出(大股东减持用)

信号意义:
  大宗交易频繁 + 折价大 → 可能有减持需求(利空)
  大宗交易后6个月解禁 → 关注解禁日卖压

港股交易规则

交易时间:
  早盘竞价: 9:00-9:30
  连续交易: 9:30-12:00, 13:00-16:00
  收市竞价: 16:00-16:10

核心差异(vs A股):
  ✓ T+0交易 (当日买当日可卖)
  ✓ 无涨跌停限制 (个股单日可涨跌50%+)
  ✓ 做空机制完善 (融券成本低, 约1-3%/年)
  ✓ 暗盘交易 (IPO上市前一晚的灰市交易)
  ✗ 流动性差 (日成交额仅A股的1/10-1/5)
  ✗ 仙股多 (大量股价<0.1港元的小票)

做空规则:
  - 只能以不低于最佳卖盘价做空 (uptick rule变体)
  - 需先借入股份才能做空 (naked short prohibited)
  - 做空头寸需每日报告 (达到0.02%阈值时)

交收制度:
  T+2交收 (买入T+2日才能提取股份)
  但交易可T+0 (预付制度下)

回测影响:
  - 无涨跌停 → 极端波动大, 止损更重要
  - T+0 → 日内策略可行
  - 流动性低 → 小盘股滑点大, 冲击成本需纳入

美股交易规则

交易时间(北京时间):
  夏令时: 21:30-04:00
  冬令时: 22:30-05:00
  盘前: 16:00-21:30 / 17:00-22:30
  盘后: 04:00-08:00 / 05:00-09:00

PDT规则(Pattern Day Trader):
  条件: 5个交易日内日内交易(当日开平) ≥ 4次
  触发后: 账户需维持 ≥ $25,000 余额
  低于$25,000: 账户被限制90天只能平仓

  规避方法:
  - 使用现金账户(Cash Account, T+2交收, 无PDT限制但资金效率低)
  - 账户维持 > $25,000
  - 控制日内交易频率 < 4次/5日

熔断机制:
  Level 1: S&P 500下跌 7% → 暂停15分钟 (15:25后不触发)
  Level 2: S&P 500下跌13% → 暂停15分钟 (15:25后不触发)
  Level 3: S&P 500下跌20% → 当日停止交易

  个股LULD(Limit Up-Limit Down):
  涨跌幅超过参考价±5%(大盘股)/±10%(小盘股) → 暂停5分钟

RegSHO(做空规则):
  - Locate requirement: 做空前必须确认可借到股份
  - Close-out: 连续13天无法交割 → 强制平仓
  - Short Sale Circuit Breaker: 个股跌>10% → 当日+次日只能uptick做空

回测影响:
  - 美股无日常涨跌停 → 但有LULD暂停
  - T+0交易(保证金账户) → 日内策略可行
  - 盘前盘后交易量低, 滑点大

Read the full file on GitHub · 301 lines

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. 6d ago First seen · 301 lines · 52 tokens per session scan A f202414dfb07

Subscribe to this mod's changes

regulatory-knowledge is a skill published in the GitHub repository HKUDS/Vibe-Trading (33,085 stars, last pushed today), licensed MIT. It adds 52 tokens to every session and 3,580 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-09-03.

Related

Other skills, from other repositories

hyperliquid

Use when backtesting, deploying, checking funding readiness, or debugging a Hyperliquid strategy through Superior Trade Unified API — writing Freqtrade configs and strategy code, running sweeps, checking managed-wallet balances, trading HIP-3 perps, or diagnosing a deployment that will not start or trade.

Superior-Trade/superior-skills · 64 tokens

polymarket

Use when the user wants to trade, research, or backtest Polymarket prediction markets through Superior Trade — finding markets by slug or event URL, placing a single immediate market order, writing NautilusTrader strategies, running filled-data backtests, funding pUSD, or deploying and monitoring a live Polymarket…

Superior-Trade/superior-skills · 68 tokens

backtesting

Use when running, interpreting, or designing backtests on Superior Trade — anything about backtest windows, trade-count thresholds, exit-reason mix, parameter sweeps, walk-forward validation, zero-trade diagnosis, compute-cost estimation, or "is this backtest result trustworthy?". Pair with the relevant strategy…

Superior-Trade/superior-skills · 73 tokens

fees-optimizations

Use when the user asks about fees, fee optimization, slippage, maker vs taker, post-only or ALO orders, fee tiers, builder code fees, effective spread, order pricing, lowering trading costs, or why a live Hyperliquid Freqtrade strategy underperforms its backtest. Also use proactively for high-turnover designs (5m or…

Superior-Trade/superior-skills · 94 tokens

aerodrome

Use when creating, validating, backtesting, deploying, sizing, or troubleshooting Aerodrome/Base spot trading strategies through the Superior Trade API, especially Freqtrade configs using exchange.name "aerodrome", AERO/USDC or CHECK/USDC pairs, AMM market swaps, wallet/gas balance checks, no-orderbook pricing, or…

Superior-Trade/superior-skills · 83 tokens

basis-arb

Use when the user asks for spot-perp basis trade, basis arbitrage, cash-and-carry, perp discount, or any setup that reads the spot–perp basis as a positioning signal. Long-perp leg only — pure two-leg basis arb requires a paired spot short (or long) which Freqtrade can't run cleanly. The strategy below captures the…

Superior-Trade/superior-skills · 87 tokens