execution-algo-trading

execution-algo-trading is a skill for Claude Code from mahmoud20138/Tradecraft. It costs 73 tokens per session (2,236 once invoked), scanned A, original, MIT.

A collection of methods for splitting large trades into smaller orders, including TWAP, VWAP, implementation shortfall, POV, and iceberg orders. These are trading methods designed to manage execution timing, price impact, and trading costs.

In plain words
What is it for?
Use it to create execution schedules, simulate fills against historical prices, analyze slippage, and perform transaction-cost analysis.
Why use it?
It helps analyze how a large order could affect the market and how much execution may cost through slippage or market impact.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the tradecraft plugin — 58 skills shipped together

Good fit Use it to create execution schedules, simulate fills against historical prices, analyze slippage, and perform transaction-cost analysis.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mahmoud20138/tradecraft/execution-algo-trading
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mahmoud20138/Tradecraft --skill execution-algo-trading
Clone the repo
git clone --depth 1 https://github.com/mahmoud20138/Tradecraft

Made for: Claude Code.

Or install tradecraft, the plugin that ships this one along with the rest of its 58 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for execution-algo-trading

README.md
[![agentmods](https://agentmods.dev/badge/skills/mahmoud20138/tradecraft/execution-algo-trading/github.svg)](https://agentmods.dev/skills/mahmoud20138/tradecraft/execution-algo-trading)
Your own site
<a href="https://agentmods.dev/skills/mahmoud20138/tradecraft/execution-algo-trading"><img src="https://agentmods.dev/badge/skills/mahmoud20138/tradecraft/execution-algo-trading/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for execution-algo-trading

Your own site · 80×15
<a href="https://agentmods.dev/skills/mahmoud20138/tradecraft/execution-algo-trading"><img src="https://agentmods.dev/badge/skills/mahmoud20138/tradecraft/execution-algo-trading.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,236 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00073 $0.02236
Opus 5.5 $0.00029 $0.00894
Sonnet 5.5 $0.00015 $0.00447
Haiku 4.5 $0.00007 $0.00224

Measured 1mo ago against content hash 694864bbce13, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

execution-algo-trading scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/tradecraft/skills/execution-algo-trading/SKILL.md · 277 lines

How it starts

The opening of the file, as written. The whole thing — 277 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill: Execution Algo Trading | Domain: trading | Category: execution | Level: advanced Tags: trading, execution, twap, vwap, iceberg, algo


Execution Algorithm Trading Skill

Overview

Implements institutional-grade execution algorithms used by buy-side desks to minimise market impact and transaction costs when executing large orders.

Python Module

xtrading/skills/execution_algo.py

Stack

  • numpy — Numerical computations, binomial tree, random generation
  • pandas — VWAP calculation, fill data management
  • scipy — Statistical computations

1. TWAP Executor

from datetime import datetime, timedelta
from xtrading.skills.execution_algo import TWAPExecutor

now = datetime.now()
twap = TWAPExecutor(
    symbol="EURUSD",
    total_qty=100_000,
    side="buy",
    start_time=now,
    end_time=now + timedelta(hours=4),
    n_slices=20,
    randomise_size=True,    # add ±15% size variation
    randomise_time=True,    # add ±10% timing jitter
)

schedule = twap.build_schedule()
# schedule.n_slices = 20
# schedule.estimated_cost_bps ≈ 3.0
# schedule.slices[i].target_time, .quantity, .order_type

# Simulate against historical prices
import pandas as pd
prices = pd.Series(...)  # mid prices with DatetimeIndex
result = twap.simulate_execution(prices, spread_bps=2.0)
# {"avg_fill_price": 1.1005, "twap_benchmark": 1.1003,
#  "vs_benchmark_bps": 1.8, "total_cost_bps": 3.8}

2. VWAP Executor

from xtrading.skills.execution_algo import VWAPExecutor
import numpy as np

# Custom intraday volume profile
profile = np.array([0.10, 0.08, 0.06, 0.05, 0.04, 0.04,
                    0.04, 0.04, 0.05, 0.06, 0.07, 0.08,
                    0.09, 0.10, 0.10, 0.10])

vwap = VWAPExecutor(
    symbol="XAUUSD",
    total_qty=50_000,
    side="sell",
    start_time=now,
    end_time=now + timedelta(hours=8),
    volume_profile=profile,
    participation_cap=0.15,   # max 15% of any interval
)

schedule = vwap.build_schedule(avg_interval_volume=10_000)
# schedule.participation_rate ≈ 0.031 (3.1% of daily volume)

# Calculate realised VWAP
import pandas as pd
vwap_price = vwap.calculate_volume_weighted_price(prices, volumes)

Read the full file on GitHub · 277 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 277 lines · 73 tokens per session scan A 694864bbce13

Subscribe to this mod's changes

execution-algo-trading is a skill published in the GitHub repository mahmoud20138/Tradecraft (17 stars, last pushed 6mo ago), licensed MIT. It adds 73 tokens to every session and 2,236 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

etf-premium

Calculate an ETF's premium or discount to NAV from Yahoo Finance data (yfinance), compare or screen ETFs by premium, explain why a gap exists, and decompose a sudden ETF move into NAV-driven vs structural components (dealer gamma exposure, blocked AP arbitrage, sentiment). Use this skill whenever the user asks whether…

himself65/finance-skills · 159 tokens

stock-liquidity

Analyze how liquid a stock is using Yahoo Finance data (yfinance): bid-ask spreads, volume and dollar volume (ADTV), top-of-book and options depth, square-root market impact and slippage estimates, turnover ratio, and Amihud illiquidity, rolled into a liquidity grade. Use this skill whenever the user asks about…

himself65/finance-skills · 129 tokens

tradingview-reader

Read the user's local TradingView desktop app through opencli: quotes, options chains with greeks and per-strike IV, options expiries, screener results across stocks, crypto, forex, futures, and bonds, gainers and losers, news headlines and full stories, alerts (active, fired, offline fires), watchlists including…

himself65/finance-skills · 181 tokens

company-valuation

Estimate a public company's intrinsic value with DCF, relative (peer multiple), and sum-of-the-parts (SOTP) methods, then blend them into an implied share price with upside/downside vs the market price, a WACC and terminal-growth sensitivity grid, and bull/base/bear scenarios. Use this skill whenever the user asks…

himself65/finance-skills · 155 tokens

sepa-strategy

Analyze stocks with Mark Minervini's SEPA (Specific Entry Point Analysis) methodology: stage analysis, the 8-condition trend template, fundamentals, VCP and other base patterns, pivot-point entries, market environment, and risk-based position sizing. Use this skill whenever the user mentions SEPA, Minervini…

himself65/finance-skills · 186 tokens

stock-correlation

Analyze how stocks move together using Yahoo Finance price history (yfinance): find correlated peers for a ticker, measure correlation, beta, and spread between specific tickers, cluster a group into a correlation matrix, and track rolling or regime-dependent correlation. Use this skill whenever the user asks what…

himself65/finance-skills · 149 tokens