Skip to content
~/amoghshendre
← back to projects

gapwatch

Premarket gap scanner and strategy backtester with Signal notifications.

private sourcepythonalpaca apifinnhub api

the problem

Premarket gaps are worth knowing about before the open, and any strategy that acts on them is worth testing against history before trusting it with attention. I wanted both in one tool: a scanner and the backtester that validates what it flags.

architecture

  1. Alpaca + Finnhubmarket data
  2. premarket scanner
  3. strategy backtesterhistorical validation
  4. Signalnotification

A Python system pulls market data from the Alpaca and Finnhub APIs, scans for premarket gaps, and runs a backtester over historical data to validate strategies. When a live scan matches, it delivers a notification over Signal.

engineering decisions

  • Two data sources, not one

    Alpaca and Finnhub cover for each other's gaps in coverage and rate limits, so the scan doesn't hinge on a single provider being available.

  • A backtester in the loop, not just a scanner

    A scanner tells you what's happening; a backtester tells you whether acting on it ever made sense. Pairing them keeps signals honest against history.

  • Signal for delivery

    Notifications land on a private, end-to-end encrypted channel I already use, rather than another inbox or dashboard to check.

constraints

Bounded by third-party API rate limits and coverage; built for premarket timing where being early matters more than being fast.