Conflict resolution within a trade
j
john g
The backtester currently has a flaw: it allows trades with conflicting strikes when a short position and long position coincide on the same strike price. In real trading, brokers would reject these trades.
The automation system attempts to execute these invalid trades, only to have them rejected by the broker. This creates two problems:
The backtester records trades that cannot actually exist
The automation wastes time on rejected orders
Proposed solutions:
Prevent the backtester from recording impossible trades
Add logic for the automation to handle conflicts by either:
Skipping the conflicting portion of the trade
Selecting a different strike price for the conflicting leg