Finishes what d54a2a9's message claimed: schwab/ was never actually removed. Also: comprehensive_backtest.py (crashed on import — research/connection.py does not exist), strategy/universe.py, strategy/backtest/outcomes.py, detect_momentum_ignition (kept _last_higher_low — imported by runner/ premarket_setup/liquid_breakout), milestone3_verify.py, tests/unit/schwab/, SCHWAB_* keys from .env.example. All grep-gated: zero live references. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
13 lines
544 B
Python
13 lines
544 B
Python
"""_last_higher_low: the shared stop-placement helper (live via runner /
|
|
premarket_setup / liquid_breakout). The detect_momentum_ignition tests died
|
|
with the detector in plan 002."""
|
|
|
|
from strategy.evaluation.ignition import _last_higher_low
|
|
|
|
|
|
def test_last_higher_low_helper():
|
|
# rising lows -> last established higher low beneath the final bar
|
|
assert _last_higher_low([3.9, 4.05, 4.3, 4.6]) == 4.3 # excludes final bar (4.6)
|
|
# no higher low -> fallback to the window min
|
|
assert _last_higher_low([5.0, 4.0, 3.0, 2.0]) == 2.0
|