explaingit

shjavokhir/quant-alpha

Analysis updated 2026-05-18

1PythonAudience · researcherComplexity · 4/5Setup · hard

TLDR

An AI research agent that invents quantitative trading signals, prunes the weak ones, and accumulates memory to propose better signals over time, graded by a deterministic backtest that cannot be fooled.

Mindmap

mindmap
  root((DARWIN))
    What it does
      Invents trading signals
      Backtests each signal
      Prunes weak alphas
      Improves with memory
    Research loop
      Evaluate live alphas
      Prune weak signals
      Propose new signals
      Validate in sandbox
    Memory layer
      MongoDB Atlas
      Voyage AI embeddings
      Similarity search
    AI providers
      Google Gemini Flash
      Antigravity agent
      MiniMax M2.5
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Run the demo dashboard to replay 21 walk-forward research generations and watch trading signals get born, thrive, and pruned across 11 years of data.

USE CASE 2

Use the live Propose button to have an AI author and backtest a brand-new trading signal in real time against historical stock data.

USE CASE 3

Study how to build a self-improving AI research loop where improvement is measured by a market-graded backtest, not by an LLM self-scoring.

USE CASE 4

Experiment with memory ablation to understand how vector-search memory affects the quality of AI-proposed quantitative signals.

What is it built with?

PythonGoogle GeminiMongoDB AtlasVoyage AIFastAPIViteDigitalOcean

How does it compare?

shjavokhir/quant-alphaa-bissell/unleash-liteabhiinnovates/whatsapp-hr-assistant
Stars111
LanguagePythonPythonPython
Setup difficultyhardhardhard
Complexity4/54/53/5
Audienceresearcherresearcherdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires API keys for Google Gemini, MongoDB Atlas, Voyage AI, and DigitalOcean Gradient, the offline demo dashboard works without these.

In plain English

DARWIN is a Python-based research system that automatically invents quantitative trading signals (called alphas), tests each one against historical stock market data, keeps the ones that work, and uses memory of past results to get progressively better at proposing new signals. The core claim is that the improvement is measured by a deterministic backtest, not by an AI judging itself. The system runs in generations. Each generation, it evaluates every signal currently in its library against a trailing window of data using metrics like information coefficient, turnover, and transaction costs. Weak or redundant signals get pruned. A language model then proposes new candidate signals based on a memory store of every past success and failure. These candidates are tested in a sandboxed backtest on data the proposer has not seen, and only the ones that pass get added to the library. The whole fleet is then scored on the next out-of-sample block. The memory layer is the key piece. In a controlled experiment across 600 US stocks from 2013 to 2024, the system with memory enabled discovered 68 keeper signals with positive out-of-sample quality, compared to 31 without memory and 21 from random formula search, which averaged negative quality. Memory more than doubled the number of useful signals found. The tech stack combines Google Gemini 2.5 Flash as the primary alpha proposer, MongoDB Atlas with Voyage AI embeddings for the memory and similarity search layer, a managed agent called Antigravity that spins up an isolated cloud environment to browse research literature and write code for new signals, and MiniMax M2.5 served on DigitalOcean Gradient as an alternative reasoning model. The demo dashboard runs locally with one shell script and replays a committed research run offline. A live mode is also available for proposing or researching new signals in real time. The README is upfront about limitations: net of realistic trading costs the book does not make money, and the 2024 holdout was not exceptional. The contribution is the improving research loop itself, not a profitable trading strategy.

Copy-paste prompts

Prompt 1
I want to add a new evaluation metric to DARWIN's alpha pruning step. Where in the codebase is the per-alpha evaluation logic, and what metrics does it currently compute?
Prompt 2
How does DARWIN's memory layer work? Walk me through how past alpha results get stored in MongoDB Atlas and how Voyage AI embeddings find similar alphas during proposal.
Prompt 3
I want to swap Gemini for a different LLM as the alpha proposer in DARWIN. Which file controls the proposer model and what interface does a replacement need to match?

Frequently asked questions

What is quant-alpha?

An AI research agent that invents quantitative trading signals, prunes the weak ones, and accumulates memory to propose better signals over time, graded by a deterministic backtest that cannot be fooled.

What language is quant-alpha written in?

Mainly Python. The stack also includes Python, Google Gemini, MongoDB Atlas.

How hard is quant-alpha to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is quant-alpha for?

Mainly researcher.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub shjavokhir on gitmyhub

Verify against the repo before relying on details.