Modeling transaction cost analysis

From CaseMark/skills · View interactive version

Modeling transaction cost analysis is an AI agent skill from the GitHub repository CaseMark/skills. Builds TCA frameworks with implementation shortfall, VWAP comparison, and market impact estimation across asset classes. Use when conducting TCA, measuring execution quality, or analyzing trading costs.

How to use this skill

Skill file

Modeling Transaction Cost Analysis

Builds TCA frameworks with implementation shortfall, VWAP comparison, and market impact estimation across asset classes.

When To Use

Inputs To Gather

Workflow

  1. Normalize execution records — align timestamps to a common clock, reconcile partial fills, and tag each execution with venue and algo identifiers. Remove or flag cancels, amendments, and erroneous prints.
  1. Calculate explicit costs — sum commissions, SEC fees, stamp duties [VERIFY applicable fee schedules], clearing charges, and any exchange rebates/credits per order.
  1. Compute implementation shortfall (IS) — decompose total IS into:
  1. Run VWAP/TWAP comparison — calculate the interval VWAP (or TWAP) over the execution window using consolidated market data; report slippage as fill price minus benchmark in bps. Flag orders where participation rate exceeded a threshold (e.g., >15% of interval volume) since benchmark validity erodes at high participation.
  1. Estimate market impact — apply a square-root market impact model (e.g., σ × √(Q/ADV) × coefficient) calibrated to the asset class. Compare predicted impact to realized impact. If the desk has historical TCA data, fit coefficients empirically; otherwise use published coefficients [VERIFY source — common references: Almgren-Chriss, Kissell-Glantz, ITG/Virtu models].
  1. Segment and aggregate — group results by the dimensions specified (broker, algo, trader, volatility regime, market-cap tier). Compute mean, median, and standard deviation of slippage within each group. Highlight statistically significant differences across groups.
  1. Sensitivity and regime analysis — test how results shift under different benchmark windows, volatility bands, and participation-rate thresholds. Identify whether poor execution clusters in specific market conditions (e.g., high-vol opens, illiquid close auctions).
  1. Compile TCA report — structure the output with an executive summary, per-benchmark scorecards, broker/algo league tables, outlier trade detail, and methodology notes.

Output

Quality Checks

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.