Skip to content

Kcstring/worldquant-agent

Repository files navigation

WorldQuant Agent

AI-assisted quantitative research pipeline for WorldQuant Brain.

License: MIT

This repository is a sanitized release prepared for portfolio and project review. It keeps the engineering workflow and core code structure, but removes personal credentials, private logs, private research assets, cached performance data, and long-memory snapshots from the original working repository.

Status

  • Public-facing repository snapshot
  • Sanitized for open-source sharing
  • Not intended as a production deployment package

What This Project Does

The system uses multiple AI-assisted stages to turn a research direction into candidate expressions:

  1. Stage-1 builds a hypothesis from a direction, theme, and available fields.
  2. Stage-2 generates candidate expressions under hard runtime constraints.
  3. Program-side preflight checks reject invalid expressions before backtest.
  4. The WorldQuant simulation layer submits and polls backtests.
  5. Evaluation and feedback route the next iteration based on metrics, checks, turnover, and correlation risk.

The goal is not "LLM writes random formulas", but "LLM operates inside a controlled research pipeline with explicit constraints, verification, and iteration feedback."

Repository Scope

Included:

  • Core pipeline code under discover/, agents/, wq/, models/, config/
  • Prompt and orchestration logic
  • Helper scripts for running and packaging the project
  • Public documentation and configuration examples

Excluded from this public release:

  • Real .env secrets
  • credential.txt
  • Runtime logs
  • Local sqlite caches
  • Private research libraries and cached performance data
  • Private long-memory data
  • Internal handoff notes and local tooling metadata

Quick Start

1. Install dependencies

uv sync --extra dev

Or:

pip install -e ".[dev]"

2. Prepare local config

Copy the example files and fill in your own local credentials:

cp config/env/active.env.example config/env/active.env
cp .env.example .env
cp credential.example.txt credential.txt

credential.txt format:

["your_email@example.com", "your_password"]

3. Run

Interactive mode:

python3 main.py

Non-interactive mode:

python3 scripts/run_discover.py --direction auto --profile PPAC --max-iter 6 --mode test

Project Docs

  • Setup and runtime notes: docs/
  • Environment profiles: config/env/
  • Sanitization summary: SANITIZATION_NOTES.md
  • Contribution guide: CONTRIBUTING.md

Why This Counts As "AI Solving a Real Problem"

This project addresses a real operational problem: turning noisy research ideas into a repeatable alpha-discovery workflow with:

  • hypothesis generation
  • field selection under coverage constraints
  • structured expression generation
  • programmatic validation before costly backtests
  • iterative improvement from measured results

Instead of using AI as a chatbot wrapper, the system uses AI as one component in a controlled decision pipeline.

Project Structure

main.py                interactive entrypoint
discover/              orchestration, filtering, evaluation, feedback
agents/                Stage-1 and Stage-2 agent logic
wq/                    WQ session, field loading, simulation client
models/                LLM provider and structured-output adapters
config/                runtime thresholds and environment loading
scripts/               launch helpers
docs/                  project documentation

Notes

  • This repo is intended as a public-facing project snapshot, not a drop-in production deployment.
  • Some workflows depend on external credentials and WorldQuant platform access.
  • The original private workspace contains additional local datasets and runtime artifacts that are intentionally not included here.

License

Released under the MIT License. See LICENSE.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors