slice_qty = baseline * urgency_factor * aggression_boost return min(slice_qty, max_slice_size)
# Pseudo-code of core DWAP logic def compute_slice_size(total_qty, elapsed, total_time, volume_profile, price_signal): expected_participation = 0.10 # 10% of market volume remaining_time = total_time - elapsed remaining_qty = total_qty - filled_qty # Baseline slice from volume forecast baseline = volume_profile.get_expected_volume(next_interval) * expected_participation codedwap
| Metric | CodeDWAP | TWAP (static) | |--------|----------|----------------| | Avg. slippage (bps) | 6.2 | 8.9 | | 95th percentile slippage | 15.3 | 22.7 | | Market impact (bps) | 4.1 | 5.8 | | Completion rate | 99.7% | 99.2% | data-driven algorithm that:
A rule-based, data-driven algorithm that: codedwap