-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
performancePerformance optimization and speed improvementsPerformance optimization and speed improvementsresearchResearch, experiments, and exploration tasksResearch, experiments, and exploration taskstestingTesting infrastructure and test casesTesting infrastructure and test casesvalidationValidation testing and verificationValidation testing and verification
Description
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:
- Test strategy performance across cost levels
- Find the cost breakeven point for each strategy
- 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
- At what cost level does Balanced lose its edge over Conservative?
- Does Aggressive ever beat Balanced at any cost level?
- 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 improvementsPerformance optimization and speed improvementsresearchResearch, experiments, and exploration tasksResearch, experiments, and exploration taskstestingTesting infrastructure and test casesTesting infrastructure and test casesvalidationValidation testing and verificationValidation testing and verification