- Home
- Skills
- Trading & Investing
- Implementation Shortfall Cost Breakdown
Implementation Shortfall Cost Breakdown
Find where your trades lose money by breaking down costs into delay, impact, fees, and missed opportunities.
$19
What it does
- Calculates the total cost gap between trade decisions and actual execution results
- Breaks down costs into delay, market impact, timing, fees, and opportunity cost pieces
- Groups performance by client, algorithm, or symbol to identify high cost areas
- Provides confidence intervals to show if cost differences are real or just luck
- Flags results as inconclusive when there are not enough orders to be sure
Who it's for
Trading desk managers monitoring performance
See exactly why certain orders are costing more than they should.
Try asking: “Analyze implementation shortfall for my desk to see which clients pay the most in fees.”
Quantitative analysts studying market impact
Break down trading costs into timing, impact, and opportunity costs with statistical confidence.
Try asking: “Run a shortfall analysis grouped by algorithm and show me the confidence intervals.”
Institutional traders reviewing execution quality
Find out if your orders are slow to reach the desk or if you are paying too much to cross the spread.
Try asking: “Compare my execution cost against the rest of the desk for symbol AAPL.”
Implementation Shortfall Cost Breakdown
Example session with this skill installed
Which clients cost the most to execute? Break implementation shortfall down by client, with confidence intervals against the rest of the desk.
- Read your context and instructions
- Compiled the implementation shortfall cost
Real output on a synthetic test desk (2,000 parent orders, 6 clients), bps of notional:
| client | n | delay | impact | timing | total_bps | rest_bps | diff CI |
|---|---|---|---|---|---|---|---|
| C4 | 338 | 4.70 | 9.48 | 36.63 | 56.30 | 35.96 | 1.81 to 38.96 |
| C5 | 334 | -0.80 | 9.42 | 40.08 | 52.44 | 35.88 | 1.47 to 32.06 |
| C1 | 337 | 2.68 | 8.38 | 24.11 | 42.02 | 39.79 | -17.85 to 21.56 |
| C6 | 337 | -5.03 | 7.62 | 11.46 | 14.71 | 46.37 | -47.10 to -15.95 |
- C4 and C5 cost significantly more than the rest of the desk (their group-minus-rest CIs exclude zero), and most of the excess sits in timing.
- C6 is significantly cheaper. C1, C2 and C3 are not distinguishable from the desk.
- Before calling C4 or C5 expensive, check whether they send larger or more urgent orders (tca-pretrade-impact).
Connects securely to your tools. The creator never sees your data.
About this skill
If you are losing money on trades but do not know why, this skill helps you find the leak. It measures the gap between your decision to trade and the final result, known as implementation shortfall. Instead of just giving you one number, it breaks the cost down into five specific pieces: delay, market impact, timing, fees, and the cost of orders that never filled.
How it works
- You provide your trading data, including parent orders, child fills, and market quotes.
- The skill calculates the shortfall for every order, comparing your fill prices to the market mid price when you made the decision.
- It groups these costs by client, trading algorithm, or symbol to find patterns.
- You receive a report showing where costs are highest and whether those differences are statistically significant.
Frameworks & tools
This skill uses Python scripts to process data stored in DuckDB database files. It generates reports in plain text or tables showing basis point costs and confidence intervals.
Why this beats prompting it yourself
A standard AI agent cannot perform complex financial math like Perold implementation shortfall or bootstrap confidence intervals on its own. This skill adds specific financial logic that correctly handles buys, sells, and unfilled orders while ensuring the math sums up perfectly across different cost categories.
Use cases
- Identify which trading algorithms are causing the most market impact.
- Determine if slow order receipt is creating a delay cost for specific clients.
- Check if your venue routing is resulting in high exchange fees compared to peers.
- Measure the true cost of unexecuted orders when the market moves away from you.
Known limitations
Results for groups with fewer than 100 parent orders are marked as inconclusive to avoid making decisions based on too little data.
Built using a Python library (tcakit) that interfaces with DuckDB for high-performance financial data processing. It requires a specific schema including tables for parent_orders, child_fills, nbbo_1s, market_trades, and venue_fees. The skill performs notional-weighted aggregation and uses bootstrapping to generate 95% confidence intervals for cost differences. It follows the Perold implementation shortfall methodology, measuring performance against a decision-time mid price.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed today
- Software
Python 3.10+numpy, pandas, duckdbOrder and fill data in DuckDB
Permissions
File Scopes
What's inside
Frequently Asked Questions
New in Trading & Investing
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Trading & Investing.