
Market Microstructure Analysis
Estimates trading costs, price impact, liquidity and order-flow toxicity for quant strategies
- Repository
- HKUDS/Vibe-Trading
- Stars
- 37,433
- Licence
- MIT
- Files
- 1 file
What it does
This skill teaches an AI agent the detailed mechanics of how prices form in financial markets: how wide bid-ask spreads are, how much a large order will move the price, how liquid a stock is, and whether informed traders may be active. Once installed, the agent can use these formulas and rules of thumb (including China A-share specifics such as call auctions and block trades) to give more realistic trading-cost estimates and execution plans, instead of assuming a flat fee. The file is reference knowledge and formulas; it does not itself pull live market data.
Great for
- Quantitative researchers who backtest trading strategies and want realistic transaction-cost assumptions
- Traders planning how to split a large order over time (TWAP, VWAP, implementation shortfall)
- Students learning market microstructure concepts such as VPIN, Kyle's lambda and the Amihud illiquidity measure
Skip it if
- Investment advice or deciding real trades on the basis of the thresholds given: the cutoffs (e.g. VPIN above 0.5 means major news is coming) are simplified heuristics, not validated predictions, and the skill itself gives no evidence they are reliable
- Anyone without market data: the calculations need trade, quote or daily volume data that this skill does not supply
- High-frequency or intraday execution systems that need verified production code, since the file describes formulas and says the impact function is implemented elsewhere in the repository
Try asking
- “Estimate the realistic round-trip trading cost for a mid-cap A-share stock in my backtest instead of a flat 0.1% fee”
- “Plan how to sell 200,000 shares of a small-cap stock with minimal price impact, and suggest a slicing schedule”
- “Compute the Amihud illiquidity ratio for a list of stocks and flag the low-liquidity names”
- “Explain what VPIN and Kyle's lambda measure and how I would estimate them from my tick data”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 1 original files, the MIT licence and an attribution note.
market-microstructure.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip market-microstructure.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip market-microstructure.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Provide your own clean trade, quote or daily price and volume data; the skill's formulas are only as good as the inputs.
- Treat the numeric thresholds (VPIN bands, ILLIQ bands, impact coefficients) as starting points and calibrate them on your own market history.
- Ask the agent to show its assumptions and units (shares versus RMB, daily versus 5-minute windows) so results can be checked.
What's inside
- SKILL.md
Redistributed unmodified from HKUDS/Vibe-Trading under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.