market-microstructure

Compute VPIN, Kyle lambda, Amihud, and Roll metrics from tick-level market data.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ebrahim-sani/trading-automation --skill market-microstructure-ebrahim-sani
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: market-microstructure
Source: https://github.com/ebrahim-sani/trading-automation/tree/main/vibe-trading/agent/src/skills/market-microstructure
Command: npx skills add https://github.com/ebrahim-sani/trading-automation --skill market-microstructure-ebrahim-sani

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps quantify liquidity costs and price impact by analyzing market microstructure data, enabling more accurate execution strategies.

Core Features & Use Cases

  • Compute key microstructure metrics (VPIN, Kyle's lambda, Amihud, Roll) and liquidity depth signals from tick-level data.
  • Assess bid-ask spreads, order-flow toxicity, and depth resilience to inform execution strategies (TWAP, VWAP, IS).
  • Apply to China A-shares and other liquid markets to tailor liquidity-aware trading models.

Quick Start

Load the tick-level market data and run the microstructure analytics module to generate liquidity, spread, and price-impact reports.

Frequently Asked Questions about market-microstructure

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

FAQPage Schema
How do I quantify price impact and order-flow toxicity from tick-level market data?

You calculate microstructure metrics like Kyle's lambda and VPIN by processing tick-level market data. This analysis outputs precise liquidity depth signals and order-flow toxicity assessments to inform execution strategies.

What is the best way to estimate execution costs for VWAP and TWAP strategies in liquid markets?

The best way to estimate execution costs is by assessing bid-ask spreads and depth resilience using market microstructure analytics. This generates liquidity-aware trading models tailored for liquid markets like Chinese A-shares.

Can I compute VPIN and Amihud illiquidity metrics for Chinese A-shares?

Yes, you can compute VPIN and Amihud metrics for Chinese A-shares. The analytics module processes high-resolution tick and Level-2 data to output precise liquidity depth and price-impact signals for this specific market.

Does this market microstructure analysis require Level-2 tick data to calculate the Roll spread?

Yes, calculating the Roll spread and other microstructure metrics relies on high-resolution data handling. The analysis uses tick or Level-2 data when available to accurately quantify spreads and price impact.

What limitations exist when applying microstructure metrics to execution strategy rules?

A key limitation is data resolution; without available tick or Level-2 data, precise microstructure metric calculation is constrained. Execution rules should be documented in SKILL.md to handle varying liquidity depth accurately.