INALPHA ◆ OPEN-SOURCE QUANT AGENT FRAMEWORK ◆ D-9 ◆ REV 0.9 ◆ 2026.05.28 ◆ AUDIT-GRADE EVOLUTION ◆ FACTOR LAB · RISK ENGINE ◆ PLAN · APPROVE · EXECUTE ◆ AGENTS · FIRST-CLASS ◆ AGPL-3.0 ◆ ALPHA QUALITY ◆ 12 MARKETS
Inalpha/open-source quant framework

Quant agents
that evolve under audit.

Factor lab · Risk engine · Strategy evolution · Plan/Exec — every factor proposed, every strategy mutated, every order routed is logged, versioned, and reviewable. The LLM writes the code; the engineering harness signs every decision.

$git clone https://github.com/mirror29/inalpha
View on GitHub
01 / 01 / Problem

LLM-written strategies are easy.
Signing every decision is engineering.

Most "LLM + quant" stacks today: prompt in, "long BTC, conf 0.62" out, broker SDK next door. Lost money — no way to find which prompt or which slice of data broke. Made money — no way to tell alpha from overfit. Inalpha brings the Claude Code engineering harness (hooks / permissions / plan-exec) to LLM quant — the LLM only writes code; every decision is signed, every backtest is replayable, and the order path is never reachable by the LLM directly.

01lineage
black boxvsinalpha
01

Black box LLM

"long BTC, conf 0.62" — source data, prompt, model version: nowhere on record. Nothing to attribute when it loses

01

Inalpha

research_id → backtest_run_id → plan_id, every decision traceable back through its full UUID chain

02replay
black boxvsinalpha
02

Black box LLM

How was last week's sharpe 2.14 computed? Params forgotten, data slice forgotten — recompute from memory

02

Inalpha

strategy_id + params_hash + as_of as a fingerprint. Same numbers any day, any week

03guardrail
black boxvsinalpha
03

Black box LLM

The LLM holds the broker SDK directly. One jailbreak prompt, one hallucination = real money out

03

Inalpha

permissions.yaml deny + plan/exec one-shot TTL token. The order path is unreachable by the LLM, ever

02 / 02 / Why Inalpha

Two non-negotiables.
Both must hold.

A.

A. Agents are first-class

  • Factor / risk / evolution agents, each with its own toolset
  • Opposing stances in research debate by design
  • Traceable decisions, not vibes
  • Replay-able from any timestamp
── Not just an LLM call wrapped in a UI.

B.

B. Engineering discipline is the floor

  • Hooks on every tool call
  • Permissions scoped per role
  • Plan → approve → execute with one-shot token
  • Decision records on disk, declarative configs in repo
── Not vibes. Auditable.

─── A alone is just a chat wrapper. B alone is just another backtest framework. Both — that's Inalpha.

03 / Architecture · system schematic

Hub → spokes → convergence.

Strategy code is written once. Swap the Clock for backtest vs live; swap the Gateway for paper vs broker. Business logic stays put — divergence can only come from physical reality (slippage, latency, data precision).

INALPHA · SYSTEM SCHEMATICREV 0.9-D92026.05.289 NODES · 12 LINKS100300500700promptdispatchfeedexecuteappendaudit01YouINPUT · ENTRYConversational entry02OrchestratorMASTRA · ROUTERDispatches, logs, sandboxes toolshookspermsplan-execMCP03BullAGENT · LONGLong thesis · evidence-anchored04BearAGENT · SHORTShort thesis · opposing stance05DataFEED · MULTI-VENUE12 venues · freshness-anchored06Risk gateGATE · SIZINGPermission · sizing check07ThesisDEBATE · CONSENSUSOpposing arguments converge · sized08KernelB = P = LBacktest = paper = live, single codebase09decision_recordJSONL · AUDITAppend-only · replay any timestampLINK · KEYPROMPTDATADECISIONFEEDBACKCONTROL◯ SCHEMATIC · NOT TO SCALE↳ FOR REFERENCE ONLY
04 / Unified kernel · same code, three modes

One codebase.
Three modes.

Strategy code is written once. Swap the Clock for backtest vs live; swap the Gateway for paper vs broker. Business logic stays put — divergence can only come from physical reality (slippage, latency, data precision).

-backtest
from inalpha_paper import BacktestEngine
engine = BacktestEngine(bars=bars_2024)
strategy.run(engine)
+live
from inalpha_paper import LiveEngine
engine = LiveEngine(broker=ibkr)
strategy.run(engine)
01 / kernelv0.x

data

Multi-venue feeds. Freshness-anchored. Same client across markets.

from inalpha_data import get_bars
02 / kernelv0.x

paper

In-memory matching, backtest engine, persistent paper trading. State is replay-able.

from inalpha_paper import run_backtest
03 / kernelv0.x

research

Multi-analyst LLM debate. Opposing stances. No stale numbers passed as insight.

from inalpha_research import debate
05 / Engineering harness · claude code, adapted

Inspired by Claude Code.
Adapted for trading.

Declarative configs decide what each agent can call. Plan → approve → execute is enforced by a one-shot, TTL-bound token — the LLM never reaches the order path unsupervised. Subagents isolate risk. MCP plugs in tools without hand-rolled glue.

config/permissions.default.yamlexec
 

── Click a mechanism on the right to inspect real source

07 / FAQSEO.md §FAQ

What you're probably wondering.

Honest answers to the questions we get asked most.

06 / Coverage · twelve markets, one kernel

Same kernel. Same prompts. Same agents.

All markets route through one orchestrator. Add a venue, every agent gets it for free.

── Crypto / 1

  • Crypto

── Equities / 9

  • US
  • A-share
  • Hong Kong
  • Japan
  • Korea
  • Australia
  • India
  • UK
  • Germany

── Macro / 2

  • Global Indices
  • FRED Macro
0── stars
0── contributors
0── commits
0── markets
not for live capital

── Where we are honest with you

  • 01D-9 in flight: LLM-authored strategies (E1 MVP) with sandbox gates + multi-objective fitness
  • 02RiskEngine rules enforced at the paper HTTP boundary (notional cap / price deviation / drawdown veto)
  • 03No real-money deployment yet — every change passes plan/exec approval and lands on disk
08 / 07 / Get startedagpl-3.0 · audited · open

Star it. Read it. Tear it apart.

Inalpha is alpha-stage and AGPL-3.0. No real money yet — every line is on GitHub.

$git clone https://github.com/mirror29/inalpha