market-microstructure

Computes spread metrics, VPIN/Kyle lambda, liquidity measures, and execution-impact estimates from tick or level-2 inputs.

Updated May 5, 2026
One-click install
npx skills add https://github.com/wudye/traderAssistHK --skill market-microstructure-wudye
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: market-microstructure
Source: https://github.com/wudye/traderAssistHK/tree/main/backend/src/skills/market-microstructure
Command: npx skills add https://github.com/wudye/traderAssistHK --skill market-microstructure-wudye

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Market microstructure analysis turns raw trading and order-book behavior into actionable signals for transaction-cost estimation, liquidity risk detection, and order-flow toxicity measurement.

Core Features & Use Cases

  • Spread, realized/effective costs, and liquidity diagnosis: Quantify quoted vs effective vs realized spread to estimate trading frictions realistically rather than using a flat fee assumption.
  • Order-flow toxicity metrics: Compute VPIN and Kyle’s lambda to assess informed trading risk and price impact sensitivity.
  • Execution and China A-share microstructure mechanics: Model price impact (linear/nonlinear), analyze limit-order-book imbalance/resilience, and incorporate China-specific call auction and block-trade effects for better execution timing and risk controls.

Quick Start

Use the market-microstructure skill to analyze a stock’s liquidity and order-flow toxicity using bid-ask spread, VPIN/Kyle lambda, and order-book imbalance to produce an execution-cost estimate and execution-window recommendation.

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 informed trading risk using VPIN and Kyle lambda?

To measure order flow toxicity, you can calculate VPIN and Kyle lambda from tick or level-2 data to assess informed trading probability and price impact sensitivity. These metrics help screen for informed trading risk before execution.

How do I estimate transaction costs using bid-ask spread and limit order book imbalance?

Estimating transaction costs requires computing quoted, effective, and realized spreads alongside limit order book imbalance. This captures realistic trading frictions rather than flat fee assumptions, producing accurate execution-cost estimates from micro-data.

What is the best way to analyze China A-share microstructure mechanics like call auction and block trades?

Analyzing China A-share microstructure involves incorporating call auction and block trade effects into your execution planning. This approach models price impact specifically for A-share market mechanics to optimize execution timing and risk controls.

Can I use market microstructure diagnostics for liquidity risk monitoring with Amihud and Roll metrics?

Yes, you can monitor liquidity risk by computing Amihud and Roll liquidity measures within rolling windows. These diagnostics output interpretable metrics aligned with risk thresholds like spread and liquidity limits for continuous monitoring.

Do I need tick or level-2 data inputs for accurate microstructure fidelity and price impact estimation?

Yes, tick or level-2 data inputs are required for microstructure fidelity when computing spread metrics, VPIN, and price impact estimates. Lower-frequency data cannot capture the order-book dynamics needed for accurate execution-impact analysis.

Why does my liquidity analysis produce unrealistic execution estimates when using flat fee assumptions?

Flat fee assumptions produce unrealistic estimates because they ignore spread metrics, order-book imbalance, and price impact. Computing quoted versus effective versus realized spreads from tick data captures actual trading frictions for accurate transaction-cost estimation.