Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

market-microstructure

Skill by HKUDS

Market microstructure is a skill for analyzing bid-ask spreads, order-flow toxicity, liquidity, price impact and order books. It covers China A-share call auctions and block trades. It is aimed at quantitative strategy work and execution planning.

  • Score 91
  • 40k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install market-microstructure

Built from the published package, never by AI.

git clone --depth 1 https://github.com/HKUDS/Vibe-Trading /tmp/Vibe-Trading && mkdir -p ~/.claude/skills && cp -r /tmp/Vibe-Trading/agent/src/skills/market-microstructure ~/.claude/skills/market-microstructure

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install market-microstructure in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill gives an AI assistant a reference framework for studying how prices form at the micro level. It covers spread measures (quoted, effective and realized), order-flow toxicity with VPIN, Kyle's lambda for price impact, and liquidity measures such as Amihud and Roll. It also describes a power-law impact model, limit-order-book analysis and flash-crash prevention ideas.

The source ties these methods to China A-share mechanics, including the call auction, closing auction and block-trade discount signal. It also gives a sample liquidity and trading-cost report layout. The stated audience is quantitative strategy designers who need better transaction-cost estimates and execution planning. The source notes that full analysis needs tick-level or Level-2 data.

Written from the project's SKILL.md and checked against it.

What it can do

  • Bid-ask spread analysisMeasures quoted, effective and realized spreads and explains their drivers.
  • VPIN order-flow toxicityEstimates the probability of informed trading using volume-time buckets.
  • Kyle's lambdaEstimates price change per unit of order flow in 5-minute windows.
  • Liquidity measuresCovers Amihud illiquidity, Roll implied spread, turnover and traded value.
  • Price-impact modelsUses a power-law impact formula and a square-root model for large trades.
  • Limit-order-book analysisCovers depth, depth asymmetry, resilience and order-book imbalance signals.
  • China A-share auction mechanicsDescribes call-auction and closing-auction order rules and timing signals.
  • Block-trade discount signalReads the block-trade price against the closing price for bearish or bullish hints.
  • Execution splitting guidanceCompares TWAP, VWAP and implementation shortfall approaches.

What you need

  • Tick-level or Level-2 market data for full analysis
  • Paid SSE or SZSE Level-2 subscription, roughly 50k-200k RMB per year, for ten-level depth

Try asking

  • Estimate the effective spread and Amihud illiquidity for 000858.SZ
  • Check the VPIN level for this stock and flag any informed-trading risk
  • Estimate the price impact of selling 100,000 shares of a small-cap stock

Good to know

  • Full analysis needs tick-level or Level-2 data, while daily data only supports rough measures
  • VPIN results depend heavily on bucket size and must be calibrated per instrument
  • Order-book imbalance signals need filtering because large orders are often added and canceled
  • Signals are for analysis only and are not meant for high-frequency or spoofing strategies

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: agent/src/skills/market-microstructure/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md12 KB

Alternatives to market-microstructure

All alternatives →

Compare with meme-rush, okx-market or saas-metrics-coach

market-microstructure: common questions

What is VPIN and how does this skill use it?

VPIN is a volume-synchronized estimate of the probability of informed trading. The skill uses it to flag order-flow toxicity, with values above 0.5 treated as dangerous.

Does this skill cover China A-share call auctions?

Yes. It describes the 9:15 to 9:25 opening call auction rules and the 14:57 to 15:00 closing auction, with timing and execution notes.

What data does market microstructure analysis require?

The source says microstructure analysis requires tick-level or Level-2 data. Ordinary daily data only supports rough measures such as Amihud and Roll.

How do I install market-microstructure?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is market-microstructure free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is market-microstructure safe to use?

It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to market-microstructure?

Similar skills: meme-rush, okx-market, saas-metrics-coach, sec-edgar.

market-microstructure Install

Add to stack

Loading.