Skip to content

[Research][Testing] Transaction Cost Sensitivity Analysis #541

@iAmGiG

Description

@iAmGiG

Summary

Analyze how varying transaction costs affect strategy rankings and optimal exit parameters.

Background

Transaction costs (0.1%) were recently added to performance_clarification.py, but the sensitivity to different cost levels was not analyzed:

Transaction Costs: Now includes a default 0.1% cost, but does not model variable slippage based on liquidity or volatility.

Different brokers and execution methods have different cost profiles. High-frequency strategies are more sensitive to costs.

Objective

Create transaction_cost_sensitivity.py to:

  1. Test strategy performance across cost levels
  2. Find the cost breakeven point for each strategy
  3. Determine if strategy ranking changes at different cost levels

Cost Levels to Test

Scenario Round-Trip Cost Example
Commission-Free 0.00% Robinhood, Alpaca
Low Cost 0.05% Interactive Brokers
Standard 0.10% Current default
High Slippage 0.20% Volatile markets, large orders
Worst Case 0.50% Low liquidity, market orders

Strategies to Compare

  • Conservative (6% TP / 8% SL)
  • Balanced (8% TP / 5% SL)
  • Aggressive (10% TP / 3% SL)

Key Questions

  1. At what cost level does Balanced lose its edge over Conservative?
  2. Does Aggressive ever beat Balanced at any cost level?
  3. What is the maximum cost each strategy can tolerate before negative EV?

Metrics to Capture

  • EV per trade at each cost level
  • Cost breakeven point
  • Sharpe ratio degradation curve
  • Optimal trade frequency vs costs

Acceptance Criteria

  • Script created at scripts/research/exit_strategy_analysis/transaction_cost_sensitivity.py
  • Test 5+ cost levels (0%, 0.05%, 0.1%, 0.2%, 0.5%)
  • Generate sensitivity chart (cost vs EV for each strategy)
  • Document cost breakeven for each strategy
  • Recommendation for Alpaca paper vs live trading cost assumptions

Related

  • scripts/research/exit_strategy_analysis/performance_clarification.py (has 0.1% cost)
  • scripts/research/exit_strategy_analysis/README.md (Tool Limitations section)

Metadata

Metadata

Assignees

Labels

performancePerformance optimization and speed improvementsresearchResearch, experiments, and exploration taskstestingTesting infrastructure and test casesvalidationValidation testing and verification

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions