Systematic Equity Screening & Signal Generation
Spyglass is a .NET 10 stock screener that runs as a background service, scanning a 96-symbol equity universe twice daily at 10:30 AM and 2:00 PM ET. It classifies the current market regime into one of five tiers (MOMENTUM, STRONG_BULL, BULL, NEUTRAL, and RISK_OFF) using SPY’s moving average stack and VIX from Yahoo Finance, which drives dynamic scanner parameters and the Market sub-score. Qualifying signals are forwarded to Vela via authenticated HTTP POST, where they enter the execution pipeline for risk evaluation and broker execution.
Runs as a hosted .NET background service, scanning 96 equity symbols at 10:30 AM and 2:00 PM ET daily. Each cycle fetches 120 days of OHLCV bars from Alpaca Markets and computes seven technical indicators (EMA8, EMA21, SMA50, RSI2, RSI14, ADX14, and ATR14), then runs each symbol through three scanners: EMA8 pullback, RSI2 pullback, and breakout.
Each candidate is scored across five dimensions: Trend, Momentum, Volume, Market (regime), and Relative Strength vs SPY, producing a weighted composite. A cross-sectional pass computes RS over 21-day, 63-day, and 10-bar windows, ranks sectors by constituent RS, and blocks candidates in weak sectors or those lagging SPY by more than 5%. Survivors pass an intraday price validation (within 3% of prior close), a minimum score floor, and a top-N cap.
Core contains pure domain logic and port interfaces with zero external dependencies. Host contains adapters, DI wiring, and the scheduler. Data.Alpaca and Data.Postgres are separate assemblies. Surviving alerts are forwarded to Vela via authenticated HTTP POST. All candidates are persisted to PostgreSQL for audit and analysis.
Get in touch to discuss how Spyglass was built and how similar screening systems are designed.