English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

AlphaGPT Deep Dive: A 15-Year-Old Developer's 'Automatic Factor Factory' and the Quant Worldview Behind It

Forum topic · 小凯 · 2026-05-21

Summary

AlphaGPT, an open-source project by GitHub user imbue-bit (a 15-year-old developer managing a ~5M CNY quant fund), is not a 'predict coin prices with AI' tool but an automatic factor factory built on deep reinforcement learning. A Transformer generates interpretable mathematical formulas (alphas) as token sequences, a stack-based virtual machine (StackVM) executes them over 18 market factors and 12 operators, and a backtest engine scores candidates by Sharpe ratio and drawdown to train the generator via policy gradient. The pipeline covers the full path from data to execution: Birdeye/DexScreener data into Postgres/TimescaleDB, strategy scoring, risk filtering, and on-chain trading via Solana RPC and the Jupiter DEX aggregator, with a Streamlit dashboard. The project embodies a clear quant worldview: rather than predicting the future, it discovers historically statistically valid patterns and assumes they persist briefly. The same author also released no_JIT, a Uniswap V4 Hook defending against JIT liquidity attacks using differential game theory and the Hamilton-Jacobi-Isaacs framework. Once a closed-source 'money-making machine', the system is now public as a research framework, with caveats: incomplete risk management, missing strategy files, and the inherent risk that any widely known alpha decays quickly.

Key points

AlphaGPT (https://github.com/imbue-bit/AlphaGPT) is an open-source crypto quant system by imbue-bit (栀染), a 15-year-old developer who claims to manage a ~5M CNY quant fund. The forum post argues it is not an "AI price prediction" tool but an automatic factor factory: a Transformer generates interpretable math formulas, backtests score them, and reinforcement learning improves the generator.

Architecture

  • data_pipeline/: pulls token metadata and OHLCV from Birdeye/DexScreener into Postgres/TimescaleDB
  • model_core/: feature engineering, operator language, Transformer formula generation
  • strategy_manager/: periodic data loading, signal generation, risk, orders, position management
  • execution/: Solana RPC + Jupiter aggregator quoting/signing
  • dashboard/: Streamlit UI for positions, snapshots, and logs
  • Core idea: discover formulas, don't predict prices

  • Formulas are token sequences of features + operators, executed by a StackVM (stack virtual machine)
  • Example: [RSI, CONST_30, LT] instead of hand-written def signal(data): return data['rsi'] < 30
  • This borrows from AutoML / symbolic regression — searching the space of math expressions automatically
  • Factors and operators

  • 18 factors in two groups: core (ret, liq_score, pressure, fomo, dev, log_vol) and extended (vol_cluster, momentum_rev, rel_strength, hl_range, close_pos, vol_trend, etc.) — covering trend, momentum, volatility, volume, mean reversion
  • 12 operators forming a micro-language: ADD/SUB/MUL/DIV, NEG/ABS/SIGN, GATE (conditional selection), JUMP (zscore>3 anomaly), DECAY (weighted lags), DELAY1, MAX3
  • Every token sequence can be translated back into a human-readable expression — full interpretability
  • Training loop

    1. Transformer generates candidate formulas (token sequences) 2. StackVM executes them into signals 3. Backtest engine simulates trades and computes return curves 4. Policy-gradient RL uses backtest metrics (Sharpe, max drawdown, win rate) as reward 5. Repeat until the generator favors profitable formulas

    The post compares this to DeepMind's AlphaTensor: framing "discovering mathematical expressions" as sequence generation.

    Execution and risk

  • Top-N tokens scored by the best formula (best_meme_strategy.json, must be trained by the user)
  • Risk filtering: low liquidity, excessive slippage, existing positions
  • Three-layer risk design: signal-level (e.g., GATE(liq_score>0.5, signal, 0)), strategy-level filters, execution-level limits (partially left to the user)
  • README warning: modifying code before live trading "may produce unexpected performance" — default parameters are not guaranteed
  • no_JIT: Uniswap V4 defense

    The same author published no_JIT, a Uniswap V4 Hook defending against JIT (Just-In-Time) liquidity attacks, based on differential game theory and the Hamilton-Jacobi-Isaacs (HJI) framework:
  • Models JIT attacker vs. LP as a predator-prey differential game
  • Solves for Nash equilibrium strategies and implements them in the Hook
  • Features atomic in-block deterrence, no oracle dependency, gas-efficient swaps
  • Paper: *Defense in Predatory Markets: A Differential Game Framework for AMM Liquidity via Uniswap V4 Hooks* — the README notes the author "can't be bothered to submit to conferences"
  • Controversy and open-sourcing

  • The README cryptically states "the two parties have reached a settlement" and warns against spam "check-in" issues
  • A near-identical copy repo exists (yuz0101/AlphaGPTCopy)
  • SourcePulse describes it as a former "money-making machine" now released as a "public library" — possibly because strategies decay once known
  • Strengths and limitations

  • Strengths: clean layered architecture, interpretability-first design, elegant StackVM language, Solana/meme-coin focus, rigorous math behind it
  • Limitations: no dependency/env templates, no pre-trained strategy file, incomplete risk module, placeholder docs, sustainability questions
  • Deeper significance

    AlphaGPT represents the automation of hypothesis generation in quant research: humans define the search space (factors + operators); the algorithm explores it, with backtest results closing the feedback loop in hours instead of weeks. The post's caveat: any discovered and publicized pattern decays via arbitrage — a likely reason the system was open-sourced. Its real value is as a research framework and teaching case for developers entering quant trading/DeFi.

    References

  • AlphaGPT: https://github.com/imbue-bit/AlphaGPT
  • Technical details: https://github.com/imbue-bit/AlphaGPT/blob/main/CATREADME.md
  • no_JIT: https://github.com/imbue-bit/no_JIT
  • Author: https://github.com/imbue-bit
  • Zhihu analysis: https://zhuanlan.zhihu.com/p/1999928514674202460
  • SourcePulse: https://www.sourcepulse.org/projects/22459563

Tags

#quantitative-trading#alphagpt#symbolic-regression#reinforcement-learning#factor-mining#solana#defi#uniswap-v4

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/177620527