market-microstructure

Calculate bid-ask spreads, order-flow toxicity, and price-impact coefficients from market data.

Updated Jul 29, 2026
One-click install
npx skills add https://github.com/santoosaraujo/vibe-trading-claude --skill market-microstructure-santoosaraujo
Or copy as Structured Prompt for Agentâ–¼
Please help me install this Agent Skill.
Skill: market-microstructure
Source: https://github.com/santoosaraujo/vibe-trading-claude/tree/main/.claude/skills/market-microstructure
Command: npx skills add https://github.com/santoosaraujo/vibe-trading-claude --skill market-microstructure-santoosaraujo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, numpy, scipy.

What problem does it solve?

This skill addresses the complexity of understanding how trades affect market prices, helping users estimate transaction costs and identify informed trading patterns.

Core Features & Use Cases

  • Liquidity Diagnosis: Calculate metrics like Amihud and Roll to assess market depth and ease of execution.
  • Order-Flow Analysis: Monitor VPIN and order-book imbalance to detect potential flash-crash risks or institutional activity.
  • Execution Strategy: Model price impact using linear or non-linear frameworks to optimize large-order execution.

Quick Start

Use the market-microstructure skill to analyze the liquidity and price impact for the asset 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 order-flow toxicity and bid-ask spreads for market microstructure analysis?â–¼

To analyze market microstructure, calculate bid-ask spreads, order-flow toxicity via VPIN, and price-impact coefficients. This process supports liquidity risk assessment and quantitative execution strategy design by processing tick-level or daily market data.

What is the best way to measure liquidity and price impact for large-order execution?â–¼

The best way to measure liquidity and price impact for large-order execution is by applying linear or non-linear frameworks. This skill models price impact and calculates metrics like Amihud and Roll to assess market depth and optimize execution.

Can I use pandas and numpy to detect flash-crash risks from order-book imbalance?â–¼

Yes, you can use pandas and numpy to detect flash-crash risks. The skill processes market data using these dependencies to monitor order-book imbalance and VPIN, identifying potential flash-crash risks and institutional activity.

Does this market microstructure analysis support both tick-level and daily market data?â–¼

Yes, market microstructure analysis supports both tick-level and daily market data. It requires pandas, numpy, and scipy to process the data, calculating metrics like Amihud and Roll to assess market depth and ease of execution.

Why do I need scipy to assess market depth and ease of execution?â–¼

You need scipy to assess market depth and ease of execution because it provides the advanced mathematical functions required to calculate price-impact coefficients and order-flow toxicity metrics from complex tick-level or daily market data.

When should I use linear versus non-linear frameworks to model price impact?â–¼

You should use linear or non-linear frameworks to model price impact when optimizing large-order execution. Linear frameworks suit simpler estimates, while non-linear frameworks capture complex price dynamics and informed trading patterns for precise execution strategy design.