Skip to main content

Local-first investment operating system for Codex-native research and service-gated execution.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tradingcodex-2.1.3.tar.gz (6.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tradingcodex-2.1.3-py3-none-any.whl (1.0 MB view details)

Uploaded Python 3

File details

Details for the file tradingcodex-2.1.3.tar.gz.

File metadata

  • Download URL: tradingcodex-2.1.3.tar.gz
  • Upload date:
  • Size: 6.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for tradingcodex-2.1.3.tar.gz
Algorithm Hash digest
SHA256 cf06c0a2adf00871e75e7dc6b31873fe01aac9900dd34d4f96552bc924345a1d
MD5 c613c27a1c85c1609d3c7c496eb05e2b
BLAKE2b-256 e79439cf57ce7027c1c8677cafa06214764e620c178f5736a6a6b6ad9c9534c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for tradingcodex-2.1.3.tar.gz:

Publisher: release.yml on monarchjuno/tradingcodex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tradingcodex-2.1.3-py3-none-any.whl.

File metadata

  • Download URL: tradingcodex-2.1.3-py3-none-any.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for tradingcodex-2.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c334bd54efb11a092407f4cc32a82d569fda6017e70898651cb19c4b5a5cbc2a
MD5 3aa5f51771daa3c17b927cc3b2f5af17
BLAKE2b-256 c02798becf40a5337a6ab683db73dec5c0d44e0d86ecf172bc121f860a4a7c98

See more details on using hashes here.

Provenance

The following attestation bundles were made for tradingcodex-2.1.3-py3-none-any.whl:

Publisher: release.yml on monarchjuno/tradingcodex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page