Microstructure

Overview

Market microstructure analysis examines the mechanics of how prices are formed at the order book level. VECTRA's microstructure module provides spread analysis, market depth scoring, and liquidity regime classification to optimize entry timing and position sizing.

What It Analyzes

Spread Analysis

  • Bid-Ask Spread — The cost of immediacy (tighter = cheaper to enter)

  • Spread Percentile — Current spread vs. recent history (0-100)

  • Spread Regime — TIGHT / NORMAL / WIDE / EXTREME

Market Depth

  • Bid Depth — Total buy orders within 0.5% of mid price (in USD)

  • Ask Depth — Total sell orders within 0.5% of mid price

  • Depth Asymmetry — Bid vs. ask imbalance → directional signal

  • Depth Bias — BID_HEAVY / ASK_HEAVY / BALANCED

Liquidity Regime

  • DEEP — Tight spreads, deep orderbook → Confidence boost

  • NORMAL — Average conditions → No adjustment

  • THIN — Wide spreads, shallow book → Confidence penalty

  • ILLIQUID — Very wide spreads → Significant penalty + size reduction

Output Modifiers

Output
Range
Applied To

confidence_modifier

0.7 - 1.15

Signal confidence

size_modifier

0.5 - 1.0

Position size

sl_buffer_mult

1.0 - 1.3

SL ATR multiplier

estimated_slippage_bps

Variable

Execution cost estimate

Design Principles

circle-info
  • Lightweight — No heavy dependencies, works with existing order book data

  • Defensive — Graceful degradation when data is unavailable

  • Composable — Any strategy can call it with zero changes to existing flow

  • Non-Blocking — Never prevents signal generation, only adjusts parameters