← Back to home
Jan 2026 - Present

Polaris

An event-driven trading platform. Real-time market data over Alpaca WebSockets, pluggable strategies (moving-average crossovers, RSI, implied volatility), Discord alerting on signal events, and historical backtesting through a Streamlit web UI.

Architecture

Data sources Alpaca WebSocket trades · quotes · bars Alpaca options implied volatility CBOE VIX Strategy engine Composable algorithms SMA · EMA · RSI SMA / EMA crossovers VIX · IV indicators YAML-defined strategies multi-timeframe bar windows event-driven signal output Backtest path Backtest manager Streamlit UI algorithm builder · equity curve trade log · results · Plotly charts Live path Signal handler routes live signals Discord webhook alerts

Strategies as YAML

Defining a new strategy doesn't require touching Python, just a YAML file in strategies/. The backtest manager parses it, instantiates the requested algorithms, wires them up, and runs.

# strategies/sma_rsi_confirmation.yaml
name: sma_rsi_confirmation
algorithms:
  - type: sma_crossover
    bar_window: 5Min
    fast: 9
    slow: 21
  - type: rsi
    bar_window: 15Min
    period: 14
    oversold: 30
    overbought: 70
entry: all_signals_align
exit: trailing_stop

The interesting design choice here is the per-algorithm bar window. A coarser-window signal (15-minute RSI) persists between its bar updates while a faster-window algorithm (5-minute SMA crossover) keeps emitting. The backtester reconciles both into a single trading decision.

View the source on GitHub →