execution-model

Models transaction costs and market impact for financial backtesting simulations.

Updated Jun 30, 2026
One-click install
npx skills add https://github.com/0xZKnw/vibe-trading-tap --skill execution-model-0xzknw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: execution-model
Source: https://github.com/0xZKnw/vibe-trading-tap/tree/main/agent/src/skills/execution-model
Command: npx skills add https://github.com/0xZKnw/vibe-trading-tap --skill execution-model-0xzknw

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, pandas.

What problem does it solve?

This Skill addresses the gap between idealized backtests and real-world trading by providing accurate models for slippage, market impact, and transaction costs.

Core Features & Use Cases

  • Slippage Modeling: Apply fixed, linear, or square-root impact models to simulate price degradation for large orders.
  • Execution Logic: Simulate VWAP and TWAP execution algorithms to better reflect intraday trading behavior.
  • Cost Analysis: Calculate the total drag on returns from commissions, stamp duties, and market impact to ensure strategy viability.

Quick Start

Use the execution-model skill to calculate the expected slippage for a trade size of 50000 units given the current market average daily volume.

Frequently Asked Questions about execution-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I simulate slippage and market impact in a backtest?

To simulate slippage and market impact in a backtest, apply fixed, linear, or square-root impact models to calculate price degradation for large orders. This quantifies transaction cost drag to evaluate real-world strategy profitability.

What is the difference between VWAP and TWAP execution logic for trading simulations?

VWAP and TWAP execution logic simulate different intraday trading behaviors. VWAP targets the volume-weighted average price, while TWAP spreads orders evenly over time, both helping reflect realistic execution costs in backtests.

Can I use numpy and pandas to calculate transaction cost drag for large orders?

Yes, you can use numpy and pandas to calculate transaction cost drag. The skill leverages these dependencies to model commissions, stamp duties, and market impact, ensuring strategy viability under realistic constraints.

When do I need a square-root slippage model instead of a fixed slippage calculation?

A square-root slippage model is needed instead of fixed slippage when simulating large orders relative to average daily volume. It better captures escalating price degradation and market impact as order size increases.

Does simulating realistic trading costs improve backtest accuracy?

Simulating realistic trading costs improves backtest accuracy by bridging the gap between idealized returns and real-world results. Modeling slippage and market impact prevents overstating strategy profitability during quantitative evaluations.

How do I calculate expected slippage for a 50000 unit trade given average daily volume?

Calculate expected slippage for a 50000 unit trade by passing the order size and current market average daily volume to the execution-model skill. It applies the selected impact model to output the expected price degradation.