Systematic Equity Screener · .NET 10

Spyglass

Systematic Equity Screening & Signal Generation

C# .NET 10 PostgreSQL Alpaca Markets API Hexagonal Architecture GitHub Actions

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.

Dual-Schedule Screening Engine

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.

Five-Dimension Scoring & Cross-Sectional Filtering

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.

Hexagonal Architecture & Vela Integration

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.

96
Equity Universe
Symbols scanned on each cycle across three scanning strategies, twice daily at 10:30 AM and 2:00 PM ET.
5
Score Dimensions
Each of the five dimensions (Trend, Momentum, Volume, Market regime, and Relative Strength vs SPY) is weighted into a single composite score.
3
Scanners
EMA8 pullback, RSI2 pullback, and breakout, each with dynamic parameters tuned to the current five-tier market regime.

Interested in the Architecture?

Get in touch to discuss how Spyglass was built and how similar screening systems are designed.