Algo Wheel Broker Execution Quality Comparison logo

Algo Wheel Broker Execution Quality Comparison

Community
HimanshuJ16
algo-wheel-broker-execution-quality-comparison

Use when comparing brokers on an algo wheel from captured arrival prices and fills, ranking them by notional-weighted implementation shortfall and producing canary-preserving flow allocations that keep sampling alive.

Overview

PublisherHimanshuJ16
RepositoryAlgo-Trading-Skills
Skill namealgo-wheel-broker-execution-quality-comparison
Stars
50
Forks
7
Bundled files
5
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by HimanshuJ16 on GitHub. Read the source before you install it.

Installation

Install the Algo Wheel Broker Execution Quality Comparison AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/algo-wheel-broker-execution-quality-comparison
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/HimanshuJ16/Algo-Trading-Skills.git /tmp/Algo-Trading-Skills
mkdir -p .claude/skills
cp -r /tmp/Algo-Trading-Skills/skills/algo-wheel-broker-execution-quality-comparison .claude/skills/algo-wheel-broker-execution-quality-comparison
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Algo Wheel Broker Execution Quality Comparison in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Algo Wheel Broker Execution Quality Comparison on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Algo Wheel Broker Execution Quality Comparison is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Purpose and Scope

Use this skill to compare broker execution quality after fills and convert the comparison into a controlled target allocation for a broker wheel. The reference implementation calculates signed Implementation Shortfall (IS) in basis points, includes explicit fees, ranks brokers using decision-notional weights, preserves a minimum canary allocation for non-leading brokers, and returns the sample count and notional coverage behind each rank.

It measures the executed quantity only. Perold's implementation shortfall is the difference between a paper portfolio filled instantly at the decision price and the real portfolio, and it includes the opportunity cost of quantity that was never executed. BrokerExecution carries no unfilled residual, so the score here is the execution-cost component alone. A broker that fills the easy part of an order and cancels the rest scores better on this metric than one that completed the order. Pair the score with a fill-rate or completion measure before it drives allocations — see Common Pitfalls.

This is a TCA and allocation component, not a complete best-execution program. It does not select the arrival-price methodology, prove statistical significance, replace venue selection controls, or route live orders itself.

When to Use

Use it when:

  • the trading system captures an arrival or decision price before routing;
  • fills, quantities, broker identity, and explicit fees are available in a consistent currency and time window;
  • order assignment to brokers within a comparable segment is randomised, so the resulting scores are not confounded by which orders each broker received;
  • fill rate and unfilled residual are measured separately alongside this score;
  • broker performance should influence future flow without fully starving underperformers;
  • the desk can review allocation changes and retain the supporting TCA data.

Use the same benchmark definition across brokers and compare like-for-like orders by side, instrument, venue, urgency, size, and market regime whenever possible. A single unsegmented average can hide systematic routing bias.

When NOT to Use

Do not use this skill when decision prices are missing, stale, or generated after routing, or when fees are not comparable across brokers. Do not use it as the sole evidence for regulatory best execution, a live risk limit, a broker credit check, or a market-impact model.

Do not use it as a full implementation-shortfall measure, or as the only input to a FINRA Rule 5310 regular and rigorous review: that review must also weigh likelihood of execution, speed, and size of execution, none of which this score contains.

Do not rank brokers from a single fill or from an unbounded historical window, and do not rank brokers whose orders were chosen by a trader rather than by the wheel — discretionary assignment reintroduces exactly the selection bias the wheel exists to remove. Choose a review window and minimum observation policy appropriate to the desk and configure it through min_observations and min_notional.

Prerequisites

  • Python 3.10+.
  • A validated execution record containing broker, side, decision price, fill price, quantity, and explicit fees.
  • Decision price and fee currency aligned with the notional calculation, or a documented FX conversion before evaluation.
  • A randomised assignment mechanism that allocates comparable orders to brokers according to the published target weights.
  • A defined measurement window, order universe, and handling policy for partial fills, cancels, rejects, and venue differences.
  • A documented data-sufficiency policy (minimum executions and notional per broker) before any allocation change.
  • An approval process for changing wheel allocations and a route-level rollback or kill-switch mechanism.
  • Monitoring for sample count, notional coverage, fill rate, IS distribution, and allocation drift.

Inputs and Outputs

BrokerExecution is immutable and represents one completed execution. Prices and quantity must be finite and strictly positive; fees may be positive or negative when rebates are real and documented. rank_brokers returns an ordered list of BrokerScore records — score, execution count, decision notional, and promotion eligibility — for the audit trail. evaluate_brokers returns a mapping from broker ID to target flow share; shares sum to 1.0 within ALLOCATION_TOLERANCE for a non-empty broker set.

The reference evaluator uses:

  • Buy slippage: (fill_price - decision_price) / decision_price * 10000;
  • Sell slippage: (decision_price - fill_price) / decision_price * 10000;
  • Fee bps: fees_usd / (decision_price * quantity) * 10000;
  • IS: slippage bps plus fee bps.

Positive IS is a cost; negative IS is price improvement. Broker averages are weighted by decision notional rather than by execution count.

Allocation rules:

  • the best-ranked broker that satisfies min_observations and min_notional leads and receives the residual flow;
  • every other observed broker receives min_allocation, including a better-scoring broker that failed the sufficiency policy;
  • the leader must receive at least min_allocation, otherwise the configuration is rejected rather than inverting the ranking;
  • if no broker satisfies the sufficiency policy, the wheel promotes nobody and returns equal weights with a warning.

Workflow

  1. Define the benchmark: document the decision-price timestamp, price source, side convention, fee definition, currency conversion, and review window before collecting results.
  2. Randomise assignment: route comparable orders to brokers by the published weights using a randomising engine, not trader discretion, and record the assignment. Without this the next window's comparison measures order selection rather than broker skill.
  3. Validate execution records: reject missing broker IDs, unsupported sides, non-finite values, non-positive prices, and non-positive quantities. Do not turn invalid records into zero-cost executions.
  4. Segment the universe: compare orders with similar instrument, size, urgency, venue, and market conditions; record exclusions and partial-fill treatment.
  5. Calculate IS: calculate signed slippage and explicit fee bps using the same decision-notional denominator for buys and sells.
  6. Measure what the score omits: compute fill rate, cancelled residual, and reject rate per broker over the same window. A broker whose IS improved while its fill rate fell has not improved.
  7. Aggregate and rank: call rank_brokers for the notional-weighted average IS, execution count, and notional coverage per broker; ties break deterministically by broker ID.
  8. Apply the sufficiency policy: set min_observations and min_notional so a broker cannot lead the wheel on a thin sample. If nothing qualifies, accept the equal-weight no-promotion result and keep gathering data.
  9. Assign target flow: give the leading eligible broker the residual allocation and each other observed broker the configured minimum canary share. Reject a configuration whose canary floors leave the leader with less than the floor itself.
  10. Approve and deploy: review the proposed change, version the allocation snapshot together with the BrokerScore evidence, deploy it atomically, and monitor post-deployment performance.
  11. Re-evaluate: repeat on a bounded schedule and after material changes to broker algo, fee schedule, venue mix, or market regime. FINRA members conducting a regular and rigorous review under Rule 5310 must do so at least quarterly.

Common Pitfalls

  • Ranking on executed-fill cost alone, which rewards a broker for cancelling the hard residual. Two brokers with identical IS and 95% versus 60% fill rates are not equivalent, and this score cannot tell them apart.
  • Letting traders choose which orders go to which broker and then comparing the results. The wheel's comparison is only valid over randomised assignment.
  • Promoting a broker to the leading share on one lucky small fill. Configure min_observations and min_notional instead of trusting the point estimate.
  • Using decision_price / fill_price for sell slippage, which changes the denominator and overstates a 100-to-99 sell shortfall as 101.01 bps instead of 100 bps before fees.
  • Averaging rounded per-trade bps or weighting every fill equally when order sizes differ materially.
  • Returning zero for a zero or invalid decision price and allowing bad data to win the ranking.
  • Comparing brokers with different fee currencies, venue mix, order urgency, or client flow without segmentation or adjustment.
  • Letting the canary floor exceed the available flow, or setting a floor so high that the leading broker is routed less flow than the brokers it beat.
  • Allowing input order to decide ties and therefore change allocations nondeterministically.
  • Assuming allocation shares are exactly representable in binary floating point. Four brokers at a 10% floor sum to 0.9999999999999999 unless the leader absorbs the residual; compare against ALLOCATION_TOLERANCE.
  • Changing allocations without retaining the TCA window, data snapshot, ranking, approval, and rollback reference.
  • Building RTS 27 or RTS 28 reports from this output. Both MiFID II reporting obligations have been deleted — see references/standards.md.

Verification

Run:

text
python -m unittest discover -s skills/algo-wheel-broker-execution-quality-comparison/scripts

The tests cover buy and sell IS, price improvement, notional weighting, canary allocation, deterministic ties, single-broker behavior, empty input, invalid data, notional overflow, allocation configuration errors, the leader-floor invariant, float-exact allocation sums, BrokerScore evidence, and the data-sufficiency gate including the equal-weight fallback. Add production integration tests for the execution ledger, fee/FX normalization, fill-rate measurement, allocation publication, and rollback before connecting the result to live routing.

Related Skills

  • implementation-shortfall-minimization
  • post-trade-execution-quality-scorecard
  • best-execution-record-keeping-global
  • broker-failover-secondary-account-routing

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Algo Wheel Broker Execution Quality Comparison AI skill do?

Use when comparing brokers on an algo wheel from captured arrival prices and fills, ranking them by notional-weighted implementation shortfall and producing canary-preserving flow allocations that keep sampling alive.

Why use Algo Wheel Broker Execution Quality Comparison on TypingMind?

Because you install it once and use it with any model. Algo Wheel Broker Execution Quality Comparison is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Algo Wheel Broker Execution Quality Comparison in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/algo-wheel-broker-execution-quality-comparison. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Algo Wheel Broker Execution Quality Comparison?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Algo Wheel Broker Execution Quality Comparison?

As many as you like. As long as a model supports skills, you can use Algo Wheel Broker Execution Quality Comparison with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Algo Wheel Broker Execution Quality Comparison AI skill free?

Yes. It is published on GitHub by HimanshuJ16 under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇