# Venue Markouts and Adverse Selection

> Identify which trading venues and algorithms cost you the most by analyzing price moves around your fills.

Venue Markouts and Adverse Selection is a paid AI agent skill on Agensi by Theodosios Dimitrasopoulos (Theo), in Trading & Investing. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $15 (one-time purchase)
- Creator: [Theodosios Dimitrasopoulos (Theo)](https://www.agensi.io/creators/theodim)
- Category: [Trading & Investing](https://www.agensi.io/skills/trading-investing)
- Version: 1.0
- Last updated: 2026-12-04
- Security: scan passed (2026-12-04); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/venue-markouts-and-adverse-selection
- Tags: trading, python, finance, research

## What it does

- Calculates price moves before and after trades to find hidden execution costs
- Compares specific venues or algos against your desk average to spot outliers
- Uses statistical confidence checks to ignore random noise in small data samples
- Breaks down costs by liquidity type like maker, taker, or mid fills
- Estimates the total money lost in basis points for each underperforming venue

## Who it's for

- **Trading desk managers overseeing multiple venues:** See which venues cost you money through adverse selection on your fills. Try: "Analyze our venue performance using the desk data."
- **Quantitative traders optimizing execution algos:** Find out whether the market moves against your orders before they fill. Try: "Check if our high urgency orders are causing price leakage."
- **Compliance officers monitoring execution quality:** Get clear evidence of adverse selection across different liquidity types. Try: "Run a markout report to check for adverse selection on our taker fills."

## About this skill

When you trade, the price moves. This skill helps you understand if those moves happen because you are being "picked off" or because your orders are leaking information to the market. It looks at the market price seconds before and minutes after your trades to see if you are getting a raw deal from specific venues or brokers.

### How it works
1. You provide your trading data, including parent orders and individual fills.
2. Your AI agent loads the data and checks the market prices around every single fill.
3. It calculates "markouts," which show how much the price moved against you at different time steps.
4. You receive a report showing which venues or algorithms have high costs compared to the rest of your trading desk.

### Frameworks & tools
The skill uses Python and a DuckDB database to process trade and market quote data efficiently.

### Why this beats prompting it yourself
Standard AI prompts cannot perform the complex math required to "sign" price moves based on whether you bought or sold, nor can they handle thousands of rows of market data. This skill uses a specific statistical method called bootstrapping to make sure a bad result isn't just a random fluke, ensuring you only act on real problems.

### Use cases
- Identify which stock exchange is giving you the worst "toxic" fills.
- See if your "buy" orders are making the price jump before you even get filled.
- Compare the true cost of different trading algorithms including fees and rebates.
- Detect if a specific client's flow is causing unusual market impact.

### Known limitations
The skill requires at least 100 distinct parent orders to give a reliable result. It is currently set up for US equity market hours.

## Requires

- Python 3.10+
- numpy, pandas, duckdb
- Order and fill data in DuckDB

## Technical details

Built with a custom tcakit Python library. It requires a DuckDB file (data/desk.duckdb) containing parent_orders, child_fills, nbbo_1s, market_trades, and venue_fees tables. It performs signed markout calculations with bootstrap confidence intervals to ensure statistical significance. Default horizons are a log grid from -60s to +600s.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Venue Markouts and Adverse Selection skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What does Venue Markouts and Adverse Selection do?

Identify which trading venues and algorithms cost you the most by analyzing price moves around your fills.

### Which AI agents support Venue Markouts and Adverse Selection?

This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

### How do I use Venue Markouts and Adverse Selection?

Connect your AI agent to Agensi through MCP, then ask it to use Venue Markouts and Adverse Selection on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
