# screener/trade

A new, standalone intraday bot, built piece by piece alongside
`screener/premarket`'s sip_bot — not a replacement, a parallel project.
Full design: `docs/breakout_bot_design_conversation.pdf`.

**No code or runtime dependency on screener/premarket.** Separate
`config.json`, separate `.env` (currently the same paper Alpaca
account, but nothing here imports the other project's files).

## Status

Only the **scanner** piece exists so far:

- `universe.py` — tradable-asset pull + cheap snapshot prefilter
  (price band, liquidity floor, ETF/leveraged/name-complexity
  exclusion).
- `scanner.py` — the breakout candidate-scoring model (Part II of the
  design doc): 30% relative volume, 20% premarket volume, 20%
  gap/price movement, 15% premarket price strength, 15% distance to
  resistance. Pure continuous score, no hard reject gates beyond
  universe membership — deliberately, so a thin market-wide day can't
  produce zero candidates the way sip_bot's hard-gated scanner has.
- `run_scanner.py` — standalone entry point: `python run_scanner.py`.

Not yet built: the 1-min-bar state machine (WATCH → BUILDING →
PRE_BREAKOUT → BREAKOUT → CONFIRMED), streaming, entry, exit. Each
piece gets added and checked against real output before the next one
starts.

## Running

```
python run_scanner.py
```

Writes the ranked candidate list to `data/candidates/{date}_scanner.json`
and prints a summary table. Best run during/after the premarket window
(before 09:30 ET) so gap/premarket-volume/price-strength reflect real
premarket activity rather than after-hours noise.
