transaction-cost-modeling

Validate transaction-cost and short-side assumptions in small-cap backtest configurations.

Updated Apr 29, 2026
One-click install
npx skills add https://github.com/jefrnc/quant-llm-skills --skill transaction-cost-modeling
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: transaction-cost-modeling
Source: https://github.com/jefrnc/quant-llm-skills/tree/main/skills/transaction-cost-modeling
Command: npx skills add https://github.com/jefrnc/quant-llm-skills --skill transaction-cost-modeling

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill prevents unrealistic transaction-cost assumptions from fabricating small-cap backtest profits, especially when slippage, commission, borrow APR, locate failures, bid-ask spread, or fees are set near zero.

Core Features & Use Cases

  • Realistic friction floors by universe: Enforces minimum credible slippage per side and spread-driven round-trip costs for mega-, mid-, small-, and micro/penny caps.
  • Short-side realism checks: Flags borrow APR defaults that ignore hard-to-borrow risk and treats locate failure as a binary “trade doesn’t happen” event instead of slippage.
  • Backtest bug detection for common modeling errors: Catches constant-fraction slippage, constant borrow rates, PFOF/“free commission” treated as zero, and market-impact models applied to retail-size orders.

Quick Start

Ask the AI to review your backtest configuration and flag any transaction-cost parameters below the credible floors for your universe and side, including borrow and locate modeling assumptions.

Frequently Asked Questions about transaction-cost-modeling

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

FAQPage Schema
How do I prevent unrealistic transaction costs from inflating small-cap backtest profits?

To prevent unrealistic transaction costs from inflating small-cap backtest profits, you must enforce credible friction floors for slippage, commission, and bid-ask spreads based on market cap. Validating borrow APR and locating failure assumptions stops near-zero costs from fabricating returns.

Why does setting a constant slippage fraction cause backtest bugs in small-cap trading?

Setting a constant slippage fraction causes backtest bugs because it fails to account for market impact and bid-ask spread volatility in small-cap universes. Applying realistic, spread-driven round-trip costs and side-specific friction floors prevents these modeling errors from misleading results.

How do I model short-side risk and locate failures in a backtest configuration?

To model short-side risk and locate failures in a backtest configuration, treat locate failure as a binary event where the trade does not happen, rather than standard slippage. Flagging borrow APR defaults that ignore hard-to-borrow risk ensures accurate short-side financing assumptions.

What are realistic borrow APR and slippage floors for micro-cap backtesting?

Realistic borrow APR and slippage floors for micro-cap backtesting depend on enforcing minimum credible friction per side, including spread-driven round-trip costs. Validating these parameters against hard-to-borrow risk and retail-size market impact prevents misleading small-cap backtest performance.

Can I use zero commission and PFOF assumptions when designing a backtest?

Using zero commission and PFOF assumptions when designing a backtest is flagged as a common modeling error. Treating payment for order flow as completely free creates unrealistic transaction-cost defaults, so enforcing explicit, auditable fee assumptions prevents inflated profits.

Does market impact modeling work for retail-size orders in mid-cap strategies?

Market impact modeling for retail-size orders in mid-cap strategies is often flagged as a common backtest bug. Applying market-impact models to retail-size orders distorts results, so validating parameterization against the target universe ensures credible transaction-cost assumptions.