Sentiment Pipeline
News Intelligence Layer
News headlines are scraped from curated RSS feeds and financial APIs. Each headline is processed through VADER (Valence Aware Dictionary and Sentiment Reasoner) to generate compound sentiment scores.
Source trust weights are applied—Reuters scores higher than unknown blogs. Clickbait patterns are detected and penalized. Headlines decay in relevance over time with configurable half-lives.
The pipeline runs continuously, building a real-time view of market narrative that feeds directly into signal generation.
Signal Generation
Multi-Factor Composite Scoring
Composite scores combine sentiment velocity, price momentum (ROC across 5/10/20 periods), trend confirmation (EMA 9/21 crossovers, VWAP position), and volume analysis (RVOL vs 20-day average).
Signals only fire when multiple factors align above configurable thresholds. Each factor contributes a weighted component to the final score, creating a robust multi-dimensional view of opportunity.
Soft gates act as boosters or speedbumps rather than hard blocks—context matters, and the system adapts accordingly.
Universe Engineering
Dynamic Watchlist Construction
Daily universe refresh enforces strict quality gates: minimum 30-day average dollar volume exceeding $10M, sector caps to prevent overconcentration, and exclusion of recent losers via feedback loops.
Macro bias filtering adjusts the universe based on current regime detection. When market conditions shift, the watchlist adapts—leaning into sectors showing strength and reducing exposure to those under pressure.
Symbols are promoted and demoted based on liquidity, momentum, and recent trade performance, creating a self-optimizing pool of candidates.
Position Sizing
Risk-Calibrated Capital Deployment
Kelly-lite fractional sizing based on signal strength and ATR (Average True Range). Volatility parity ensures positions in high-vol stocks are proportionally smaller, maintaining consistent risk per trade.
Cash buffers are maintained for drawdown protection. Maximum position size is capped at a configurable percentage of equity, preventing any single trade from threatening the portfolio.
The system scales position sizes dynamically based on conviction, market conditions, and available capital—deploying aggressively when signals are strong and conditions favorable.
Exit Strategy
Four-Layer Position Management
Four exit types run concurrently, each serving a distinct purpose:
Stop-loss at ATR multiple below entry protects against adverse moves. Take-profit at risk-reward target locks in gains when targets are hit. Trailing stop follows price action, securing profits while allowing winners to run.
Time-based exit closes positions that stagnate after a configurable holding period. Circuit breakers halt all trading when daily loss thresholds are breached, preserving capital for the next session.
Order Execution
Precision Trade Routing
Orders route through Alpaca's REST API with limit orders at favorable prices. Fill confirmation is required before position tracking updates, ensuring the system's view of positions matches reality.
Cooldown periods prevent re-entry to recently exited symbols, avoiding whipsaw behavior. Conflict cancellation handles partial fills and order amendments cleanly.
Every order is logged with full context: signal strength, sizing rationale, and market conditions at the time of execution. Complete audit trail for every trade.