market-microstructure

Calculate bid-ask spreads, order-flow toxicity, and price-impact models for equity markets.

Updated Jun 30, 2026
One-click install
npx skills add https://github.com/20YN04/vibe-trading-macos --skill market-microstructure-20yn04
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: market-microstructure
Source: https://github.com/20YN04/vibe-trading-macos/tree/main/agent/src/skills/market-microstructure
Command: npx skills add https://github.com/20YN04/vibe-trading-macos --skill market-microstructure-20yn04

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, numpy, scipy.

What problem does it solve?

This skill addresses the challenge of quantifying transaction costs and liquidity risks in financial markets, specifically tailored for the complexities of China A-shares.

Core Features & Use Cases

  • Liquidity Diagnosis: Calculate metrics like Amihud illiquidity and Roll spread to assess market depth and tradeability.
  • Order-Flow Analysis: Monitor VPIN and Kyle's Lambda to detect informed trading and potential liquidity evaporation.
  • Execution Strategy: Optimize large-order execution using TWAP/VWAP models to minimize market impact.

Quick Start

Use the market-microstructure skill to analyze the liquidity and execution impact for the stock 600519.SH based on the latest market data.

Frequently Asked Questions about market-microstructure

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

FAQPage Schema
How do I calculate bid-ask spreads and order-flow toxicity for market microstructure analysis?

To analyze market microstructure, you can calculate bid-ask spreads and order-flow toxicity metrics like VPIN using statistical methods on tick-level or daily market data. This process quantifies transaction costs and detects informed trading activity.

What is the best way to estimate transaction costs and liquidity risks for China A-shares?

Estimating transaction costs and liquidity risks for China A-shares involves calculating metrics such as Amihud illiquidity and Roll spread. These metrics assess market depth and tradeability to inform execution decision-making.

How do I optimize large-order execution using TWAP and VWAP models to minimize market impact?

Optimizing large-order execution with TWAP and VWAP models minimizes market impact by strategically timing trades. This execution strategy relies on price-impact models to reduce transaction costs in equity markets.

Does this market microstructure analysis support processing tick-level data with pandas and numpy?

Yes, market microstructure analysis supports processing tick-level or daily market data using pandas, numpy, and scipy. These dependencies enable the statistical methods required for liquidity diagnosis and order-flow analysis.

When do I need Kyle's Lambda and Amihud illiquidity metrics for liquidity risk monitoring?

You need Kyle's Lambda and Amihud illiquidity metrics for liquidity risk monitoring when detecting potential liquidity evaporation and informed trading. These metrics evaluate market depth and price impact for quantitative strategy development.