Skip to main content

TradingCodex: An Evolving Multi-Agent Investment Team for Codex

TradingCodex brings market context into a Codex-native investment workflow

PyPI License Python Django

Dynamics · Statics · Install · User Guide

TradingCodex brings an evolving investment team into native Codex. Ask a question in ordinary language; the right agents collaborate, challenge the evidence, and leave behind reusable context for the next decision.

It is research-first, local-first, and paper-first. A research answer never becomes a broker action on its own.

Dynamics

The team changes with the question

TradingCodex does not send every ticker through the same checklist. Head Manager reads the mandate, chooses the smallest useful group of agents, runs independent work in parallel when useful, and revises the team when accepted evidence exposes a new gap or conflict.

Head Manager dynamically coordinates nine investment specialist agents in a research loop

The agents

Agent What it brings to the team
Fundamental Analyst Business model, financials, filings, and economics.
Technical Analyst Price, trend, momentum, volume, volatility, and liquidity.
News Analyst Disclosures, news, chronology, and narrative change.
Macro Analyst Rates, FX, commodities, policy, and macro transmission.
Instrument Analyst ETF, index, options, crypto, and market-structure mechanics.
Valuation Analyst Ranges, scenarios, sensitivities, and valuation gaps.
Portfolio Manager Portfolio fit, sizing, concentration, and readiness.
Risk Manager Downside, restrictions, risk checks, and approval readiness.
Judgment Reviewer Independent challenge of evidence, conflicts, and confidence.

The workflow is a loop

question
  -> Head Manager
  -> smallest useful specialist wave
  -> accepted evidence and artifacts
  -> follow up / add a role / request review / synthesize / stop
  -> next question or decision

The next agent is chosen by the next useful question, not by a preset research DAG. A narrow question can stay direct. A high-consequence recommendation can expand to independent portfolio, risk, and judgment review. There is no execution agent.

Statics

The context that stays with you

The current workflow is dynamic. The useful work it produces is static, readable, and reusable: files and memory that make the next analysis better without hiding the evidence inside a chat or silently changing system rules.

TradingCodex stores research memory, Wiki, Brain, and Decision Memory as reusable workspace context

Static layer What remains after the run
Research Memory Source Snapshots, Datasets, reports, forecasts, decisions, calculations, provenance, and evidence gaps.
Knowledge Wiki Reusable company, product, technology, industry, and value-chain background. Wiki content is context, not current evidence.
Investment Brain Inquiry principles, causal frames, falsifiers, limits, and abstention rules for a selected analysis.
Decision Memory Prior judgments, outcomes, postmortems, lessons, and explicit improvement records for future review.
Strategy Reusable user-owned decision rules that can shape later research without granting execution authority.

The workspace stays inspectable and versionable:

trading/
  research/       # snapshots, datasets, artifacts, calculations
  reports/        # research reports and handoffs
  forecasts/      # forward-looking judgments
  decisions/      # decision context and review history
wikis/            # local and active Wiki knowledge
investment-brains/  # user-owned inquiry frameworks

Knowledge, Brain, Strategy, and Decision Memory remain distinct. A Wiki does not become proof, a Brain does not choose agents, and an improvement record does not silently rewrite prompts, skills, policy, or execution gates.

Install

For normal use, attach TradingCodex to the folder where you want research to live. Do not clone this source repository into that workspace.

You need Git, uvx, and an installed, authenticated codex CLI.

On macOS/Linux:

cd /path/to/an/empty-workspace
uvx --refresh --from tradingcodex tcx attach . && ./tcx doctor
./tcx service ensure

On native Windows PowerShell:

cd C:\path\to\an\empty-workspace
uvx --refresh --from tradingcodex tcx attach .
.\tcx.cmd doctor
.\tcx.cmd service ensure

After installation, fully restart Codex, reopen and trust the workspace, and trust every TradingCodex hook when Codex prompts you. If hooks are presented one at a time, approve each project hook before starting a new task. The viewer URL is printed by ./tcx service status; the release default is http://127.0.0.1:48267/. End users do not need Node, npm, or a separate frontend server.

The Head Manager inherits the active Codex model and reasoning setting. For full research workflows, we recommend gpt-5.6-sol with high or xhigh reasoning.

Start with skills

Start with the skill that matches the work. Each example is a prompt you can paste into a new Codex task; the full skill directory has exact invocation rules, boundaries, and deeper examples.

Skill Use it for Example
$tcx-plan Frame the outcome, scope, constraints, and stop conditions. Clarify a 3-year MSFT quality-compounder mandate. No order.
$tcx-workflow Run dynamic research with the smallest useful team. Analyze MSFT as a medium-term quality compounder. Include contrary evidence. No order.
$tcx-memory Replay prior judgment and test whether lessons still hold. Review the last MSFT thesis against what was known then.
$tcx-wiki Keep reusable company and industry context separate from live evidence. Put stable semiconductor value-chain facts from the latest Artifact into the Wiki.
$tcx-brain Shape inquiry with user-owned heuristics, falsifiers, and limits. Create a cautious quality-compounder inquiry framework.
$tcx-strategy Turn decision rules into a reusable, reviewable method. Define entry, sizing, and invalidation rules for quality compounders.

Use the viewer to inspect the resulting Episodes, Library, Wiki, and System posture. It is read-only; use Codex to continue, narrow, or stop the work.

The guardrail

Research, Wiki, Brain, Strategy, memory, and automation do not imply broker authority. Provider connection, ticket drafting, checks, approval, and final action remain separate checkpoints. Paper is built in; live providers require their own installation, policy approval, explicit confirmation, sync, and audit gates.

Raw credentials never belong in prompts, workspace files, reports, API/MCP responses, artifacts, or audit data.

Learn more

Developing TradingCodex

This repository is product source, not a user workspace. Start with CONTRIBUTING.md, then follow the validation route in docs/validation-and-test-plan.md.

License

TradingCodex is an Apache-2.0 open-core project. See LICENSE, NOTICE, and TRADEMARKS.md.

Release files for tradingcodex 2.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tradingcodex 2.1.3
File Size Uploaded
tradingcodex-2.1.3.tar.gz 6.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for tradingcodex 2.1.3
File Interpreter ABI Platform
tradingcodex-2.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 7.5 MB

Release files / tradingcodex-2.1.3.tar.gz

Download URL tradingcodex-2.1.3.tar.gz
Size 6.5 MB
Tags Source
SHA-256 checksum
How to use checksums
cf06c0a2adf00871e75e7dc6b31873fe01aac9900dd34d4f96552bc924345a1d
BLAKE2b-256 checksum
How to use checksums
e79439cf57ce7027c1c8677cafa06214764e620c178f5736a6a6b6ad9c9534c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 24, 2026.

Transparency log

Release files / tradingcodex-2.1.3-py3-none-any.whl

Download URL tradingcodex-2.1.3-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c334bd54efb11a092407f4cc32a82d569fda6017e70898651cb19c4b5a5cbc2a
BLAKE2b-256 checksum
How to use checksums
c02798becf40a5337a6ab683db73dec5c0d44e0d86ecf172bc121f860a4a7c98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.1.3 This release

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page