market-microstructure

Diagnose liquidity and toxicity using bid-ask spreads, VPIN, and Kyle lambda.

30.4k|4.9k|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/HKUDS/Vibe-Trading --skill market-microstructure-hkuds
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: market-microstructure
Source: https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/market-microstructure
Command: npx skills add https://github.com/HKUDS/Vibe-Trading --skill market-microstructure-hkuds

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Traders and analysts preparing large equity executions often lack precise insight into liquidity costs, order-flow toxicity, and short-term price impact, which leads to avoidable slippage and missed signals in China A-share and other tight-limit markets.

Core Features & Use Cases

  • Multi-metric liquidity diagnosis: compare quoted, effective, and realized spreads along with Amihud and Roll measures to gauge how much market makers are charging and how information asymmetry drives spreads.
  • Order-flow toxicity monitoring: interpret VPIN, Kyle lambda, and imbalance ratios to spot windows dominated by informed trading, detecting flash-crash precursors or institutional positioning.
  • Execution guidance for China A-shares: incorporate call auction behavior, closing-auction signals, and block-trade discounts to choose TWAP/VWAP/IS slices, avoid spread spikes, and respect daily price limits.

Quick Start

Ask the skill to analyze a stock's microstructure for liquidity, spread, and toxicity signals before executing a large China A-share order.

Frequently Asked Questions about market-microstructure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I measure order-flow toxicity and liquidity before executing a large block trade?

You measure order-flow toxicity by calculating VPIN, Kyle lambda, and imbalance ratios from tick-level data to identify informed trading windows and anticipate price impact. This diagnoses liquidity concerns before executing large equity orders.

What is the best way to estimate execution costs in China A-share markets?

The best way to estimate China A-share execution costs is analyzing quoted, effective, and realized spreads alongside Amihud and Roll measures. Incorporating call auction behavior and daily price limits helps choose optimal TWAP or VWAP slices.

Why does bid-ask spread widen during periods of high information asymmetry?

Bid-ask spreads widen during high information asymmetry because market makers increase premiums to compensate for adverse selection risk from informed traders. Analyzing spread components and VPIN reveals these toxicity concerns.

Do I need Level-2 or tick-level data to calculate VPIN and Kyle lambda?

Yes, calculating VPIN, Kyle lambda, and limit-order-book depth requires tick-level or Level-2 data. This granular order-flow data is essential for statistically measuring liquidity ratios and short-term price impact.

How can I detect flash-crash precursors using limit-order-book depth?

You detect flash-crash precursors by monitoring limit-order-book depth and order-flow imbalance ratios. Sudden drops in liquidity or spikes in toxicity signal windows dominated by informed trading, revealing institutional positioning risks.

When should I use TWAP versus VWAP execution algorithms in tight-limit markets?

Use TWAP or VWAP execution algorithms based on intraday liquidity patterns and spread volatility. Analyzing microstructure metrics helps avoid spread spikes and respect daily price limits during China A-share execution planning.