Skip to content

Repository files navigation

Open Alpha — Quantitative Atelier

Enterprise-grade quantitative factor research terminal. Atelier-grade design, production-grade engineering.

CI Tests Coverage License Showcase

🎨 Live showcase: genius-apple.github.io/open-alpha — interactive Atelier tour with animations.


What is this?

Open Alpha is a full-stack quantitative research platform — from market data ingestion to factor synthesis, backtesting, live risk control, and portfolio research. It pairs production-grade engineering (microservices, TimescaleDB, Redis Streams, Numba JIT factor compiler) with atelier-grade design (editorial typography, amber-on-charcoal palette, monospace data precision).

Built for quants who care about both signal quality and the experience of working with the tools.


Showcase

Data Explorer
Market Cartography — multi-frequency OHLC browser with Atelier sidebar
Chart loaded
Loaded chart — real OHLC candles rendered
Factor Lab
Factor Synthesis — DSL editor + quantile backtest workspace
Factor Results
Layered returns — quantile equity, cumulative IC, factor radar
Research Suite
Research Suite — Bayesian IC decay, posterior P(positive), rolling Sharpe / MaxDD
📐 More screenshots (risk panel, loaded charts)
Risk Panel (graceful degradation) Chart loaded
Risk Panel Chart

Atelier Design Language

The frontend follows a deliberate aesthetic direction — not generic AI dashboard.

Element Choice Why
Display font Fraunces (serif) Editorial gravitas, FT-headline feel
Data font JetBrains Mono Precision; tabular nums for aligned metrics
Body font Manrope Modern, neutral, highly legible
Palette Charcoal #0a0a0c + Amber #d4a55c + Rust #c4513a Financial classicism (gold/value) over cliché emerald-on-black
Backgrounds Radial amber glow + noise grain + data grid Atmosphere & depth, not flat slabs
Cards atelier-card with 1px amber gradient top-line Detail = taste

Architecture

┌─────────────────────────────────────────────────────────────┐
│                    Frontend (React + Vite)                  │
│   Data Explorer · Factor Lab · Research Suite · Risk Panel  │
└────────────────────────────┬────────────────────────────────┘
                             │ HTTP / WebSocket
┌────────────────────────────▼────────────────────────────────┐
│                   API Gateway (port 8000)                   │
└──┬──────────────┬───────────────┬───────────────┬───────────┘
   │              │               │               │
   ▼              ▼               ▼               ▼
┌──────┐    ┌─────────┐    ┌───────────┐   ┌───────────┐
│Signal│    │  Risk   │    │ Execution │   │  Research │
│:8001 │    │  :8002  │    │   :8003   │   │  (shared) │
└──┬───┘    └────┬────┘    └─────┬─────┘   └───────────┘
   │             │               │
   └──────┬──────┴───────┬──────┘
          │  Redis Streams│
          ▼              ▼
   ┌────────────┐  ┌──────────────┐
   │ TimescaleDB│  │    Redis     │
   │  (hypertable)│ │ (streams+cache)│
   └────────────┘  └──────────────┘

Backend services

  • Gateway — request routing, aggregation, graceful degradation
  • Signal — factor signal generation (Numba-compiled DSL)
  • Risk — volatility targeting, drawdown circuit breaker, liquidity guard
  • Execution — DES backtester, order book, PnL tracking

Shared libraries (services/shared/)

  • factor/ — DSL parser + Numba JIT compiler (no eval())
  • marketdata/ — CCXT/FIX/ITCH collectors, lookahead guard, freq alignment
  • backtest/ — DES high-fidelity simulator, LOB, impact model
  • risk/ — risk manager, drawdown breaker, audit log
  • research/ — Bayesian IC decay, cointegration, portfolio optimization
  • db/ — TimescaleStore (hypertable partitioning)
  • messagebus/ — Redis Streams + consumer groups

Test Pyramid (87% coverage)

Layer What it catches Tests
L1 Unit Algorithm correctness (LOB matching, impact nonlinearity) 42
L2 Benchmark Performance regression (<1s factor compute) 3
L3 BDD Acceptance Spec semantic violations (lookahead leak, eval removal) 10
L4 API Contract Frontend/backend field drift 9
L5 Fault Injection Resilience (single-service-down isolation) 8
L6 DB E2E Hypertable partitioning, query pruning 7 (skip if no Docker)
L7 User Journey Real user task completion 13
✅ 82 passed / 7 skipped / 0 failed

Run locally:

python scripts/run_test_pyramid.py            # full pyramid
python -m pytest tests/test_user_journeys.py  # real user flows (needs stack up)

Quick Start

Prerequisites

  • Python 3.11+
  • Node 20+
  • Docker (optional, for TimescaleDB/Redis)

Backend

pip install -r requirements.txt
python -m uvicorn backend.main:app --port 8010     # legacy API
python -m uvicorn services.gateway.app:app --port 8000  # gateway

Frontend

cd frontend
npm install
npm run dev    # http://localhost:5173

Full stack (Docker)

docker compose up -d timescaledb redis
./start_platform.bat   # Windows

Key Engineering Decisions

  • No eval() — Factor DSL uses AST + Numba JIT. __import__/os.system are statically rejected.
  • Lookahead guardLookaheadGuard filters future data; freq_align shifts low-freq before ffill to prevent leakage.
  • Graceful degradation — Every service degrades (not crashes) when dependencies fail. Gateway returns 503 with clear detail.
  • DES over vectorized — High-fidelity discrete-event simulator replaces naive vectorized backtest.

Documentation


License

MIT — see LICENSE.

About

Enterprise-grade quantitative factor research terminal - Atelier-grade design - Numba DSL - DES backtester - 87% test coverage

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages