Skip to content
CAI
Software that uses CAICheck a score

virattt/ai-hedge-fund

55.7

Weak · 14 November 2026

10.9k

lines of production code

Python

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Introduce v2 hedge-fund engine with paper trading and backtesting

The \hedge\_fund\ package is rebuilt as a persistent, point-in-time-honest system supporting both backtesting and paper trading modes. Users can now run historical simulations via \aihf backtest\ or deploy live mandates via \aihf paper\, with execution logic unified through the \advance\ function. The system enforces a strict T-decide, T+1-execute cadence, charges half-spread and commission on every fill, and maintains an append-only, hash-chained ledger for paper funds to ensure state integrity and replayability.

_hedge\fund · high confidence

Behavioural changes

Complete v2 rewrite: new architecture, CLI, and documentation

The project has been rewritten from the ground up as version 2, replacing the previous monolithic script-based structure (agents.py, backtester.py, tools.py) with a modular, pluggable engine. The new system features a persistent 'fund' object, a unified \run\_cycle\ pipeline supporting backtest, paper, and live modes, and a new CLI (\aihf\) for interactive and non-interactive usage. Key architectural changes include the introduction of an \AlphaModel\ interface for analysts (both LLM-based and quantitative), a strategy/allocator system, and a persistent ledger for tracking decisions and NAV. The old Docker setup and single-file entry points have been removed in favor of a new project structure, with comprehensive documentation (VISION.md, ROADMAP.md) and an MIT license added.

(repo-wide) · high confidence

Dependencies

Dependency upgrade and Python 3.11 requirement

The project now requires Python 3.11 or higher and has upgraded its core dependencies, including bumping aiohttp from 3.11.8 to 3.14.3 and updating the Poetry lock file generator to 1.8.5. The pyproject.toml has been updated to reflect these changes, ensuring compatibility with the new dependency versions and the stricter Python version constraint.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 52 → 56 (+4.0)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 95 → 93 (-2.2)
  • Architecture 83 → 92 (+9.4)
  • Maturity 57 → 65 (+8.1)
  • Readiness 29 → 29 (-0.1)
  • Security 88 → 100 (+11.9)

Resolved (6)

  • Duplicated block (5 lines × 2) (hedge_fund/tui/scorecard_view.py)
  • Duplicated block (7 lines × 3) (hedge_fund/tui/funds.py)
  • Edited copy of a member (17 corresponding lines) (hedge_fund/tui/report.py)
  • Hotspot: hedge_fund/tui/shared.py (hedge_fund/tui/shared.py)
  • Projects may be oversized for their cohesion
  • report.session_overview (cognitive 23) (hedge_fund/tui/report.py)

New (22)

  • Duplicated block (5 lines × 2) (hedge_fund/tui/report.py)
  • Duplicated block (7–8 lines × 2) (hedge_fund/tui/scorecard_view.py)
  • Edited copies of one member (3 members, 8+ corresponding lines) (hedge_fund/data/cached.py)
  • Edited copy of a member (11 corresponding lines) (hedge_fund/signals/init.py)
  • Edited copy of a member (17 corresponding lines) (hedge_fund/tui/report.py)
  • Edited copy of a member (5 corresponding lines) (hedge_fund/tui/paper.py)
  • Edited copy of a member (6 corresponding lines) (hedge_fund/data/client.py)
  • Edited copy of a member (60 corresponding lines) (hedge_fund/tui/shared.py)
  • Edited copy of a member (7 corresponding lines) (hedge_fund/data/cached.py)
  • Edited copy of a member (7 corresponding lines) (hedge_fund/tui/funds.py)
  • Edited copy of a member (8 corresponding lines) (hedge_fund/brokers/models.py)
  • FDClient._request (cognitive 19) (hedge_fund/data/client.py)
  • FileTooLong: tui/report.py (hedge_fund/tui/report.py)
  • High CVE: [GHSA redacted] (poetry.lock)
  • Hotspot: hedge_fund/portfolio/construction.py (hedge_fund/portfolio/construction.py)
  • Hotspot: hedge_fund/risk/limits.py (hedge_fund/risk/limits.py)
  • Scattered collaborators
  • allocation.allocate (cognitive 16) (hedge_fund/scorecard/allocation.py)
  • execution.build_orders (cognitive 22) (hedge_fund/pipeline/execution.py)
  • limits._scale_book (cognitive 17) (hedge_fund/risk/limits.py)
  • …and 2 more

Changes since last survey

  • 18 commits — 18 feature/other, 0 fixes

By area

  • (root) — 6 commits
  • hedge_fund/tui — 5 commits
  • hedge_fund/pipeline — 2 commits
  • hedge_fund/brokers — 1 commit
  • hedge_fund/data — 1 commit
  • hedge_fund/llm — 1 commit
  • hedge_fund/scorecard — 1 commit
  • hedge_fund/signals — 1 commit

Notable commits

  • change: Add Fable 5.2
  • change: Add a net cap, a drawdown stop-out, and a volume cap
  • change: Add the point-in-time screener to the data client, with a call meter
  • change: Add x402 support
  • change: Browse a backtest's decisions and open each one's report
  • change: Browse a backtest's decisions and open each one's report
  • change: Bump version to 2.6.2
  • change: Bump version to 2.6.3
  • change: Bump version to 2.6.4
  • change: Bump version to 2.7.0
  • change: Bump version to 2.7.1
  • change: Bump version to 2.7.2
  • change: Charge square-root market impact and skip dust trades
  • change: Give every view a horizon and grade it there
  • change: Let the scorecard move pod slices and analyst weights
  • change: Reopen a saved backtest from the mandate picker
  • change: Reopen a saved backtest from the mandate picker
  • change: alve the book in a drawdown and cap beta, sector, and vol

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

virattt/ai-hedge-fund was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 5c553b5222044f6a5527bd377b4104c50ee0ad28 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-36d4cd83012f.