fix probability over-confidence: model target-before-stop, not just touch
Deploy / lint (push) Successful in 5s
Deploy / test (push) Successful in 35s
Deploy / deploy (push) Successful in 24s

Backtest (32k setups) showed the touch-only probability model was ~2x
over-confident — predicted 70% hit 39%, predicted 88% hit 46% — because it
ignored the competing stop. estimate_probability now multiplies the reach
probability (touch within horizon) by the two-barrier gambler's-ruin ratio
1/(R:R+1) = P(target before stop). A 3:1 setup now reads ~25% base, not ~70%,
which lines up with realized rates. Strength/alignment modulation unchanged.

Recalibrates every probability and the EV ranking; the min_target_probability
gate threshold now means roughly what it says. Re-run the backtest to confirm
the calibration table flattens toward the diagonal.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 20:52:09 +02:00
parent b00e482258
commit 9d2e1e74bf
2 changed files with 23 additions and 12 deletions
+4 -3
View File
@@ -205,9 +205,10 @@ def test_probability_decreases_with_distance():
# Monotonic decay with distance
assert near > mid > far
# Near target is genuinely likely; a 10-ATR target is a long shot
assert near > 60
assert far < 25
# Backtest-calibrated: even a near target with no R:R context (even race) is
# only a moderate probability, and a 10-ATR target is a long shot.
assert near > 30
assert far < 15
def test_far_target_not_high_probability_even_with_strong_level():