Skip to content

Repository files navigation

Wadquant

Multi-tenant SaaS for WorldQuant BRAIN consultants.

Architecture

Wadquant separates interactive research from automated, scaled generation:

┌──────────────────────────────────────┐     ┌─────────────────────────────────────┐
│       Automated Production           │     │       Interactive Research          │
│                                      │     │                                     │
│  ┌───────────┐        ┌───────────┐  │     │  ┌───────────────────────────────┐  │
│  │  Next.js  │ <----> │  Python   │  │     │  │ Jupyter Notebook (ACE API)    │  │
│  │  Web App  │        │  Worker   │  │     │  │ - how_to_use.ipynb            │  │
│  └───────────┘        └─────┬─────┘  │     │  │ - ace_lib.py                  │  │
│                             │        │     │  └───────────────┬───────────────┘  │
└─────────────────────────────┼────────┘     └──────────────────┼──────────────────┘
                              │                                 │
                              └──────────────┬──────────────────┘
                                             ▼
                             ┌──────────────────────────────┐
                             │    WorldQuant BRAIN API      │
                             │ (https://api.worldquantbrain.com)
                             └──────────────────────────────┘
  1. Production Pipeline (Next.js + Python Worker):
    • apps/web/: Next.js UI + API (Auth.js, Prisma, job queue).
    • apps/worker/: Background worker running on-demand jobs, leasing tasks from Redis, querying LLMs, and checking simulations via a custom BrainClient.
    • packages/shared/: Shared Zod schemas defining job contracts between Next.js and the Python worker.
  2. Interactive Research Sandbox (Jupyter Notebook):
    • how_to_use.ipynb: A Jupyter notebook utilizing the official ace_lib.py (Alpha Creation Engine) library to perform local quantitative analysis, load datasets, backtest expressions, and plot PnL results.

Quick Start (Web App)

See apps/web/SETUP.md for full instructions.

# Start Postgres & Redis
docker compose up -d

# Install dependencies and build shared Zod package
pnpm install
pnpm --filter @wadquant/shared build

# Migrate database and start Next.js
pnpm db:push
pnpm dev

Quick Start (Jupyter Research Sandbox)

To run the interactive Jupyter Notebook and research alphas using ace_lib.py:

# Launch Jupyter Notebook server
make notebook

About

Wadquant

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages