Local-first investment operating system for Codex-native research and service-gated execution.
Project description
TradingCodex: An Evolving Multi-Agent Investment Team for Codex
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.
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.
| 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
- Dynamic workflow — evidence-driven agent selection, reassessment, and stopping.
- Knowledge Wiki — reusable background knowledge and explicit write boundaries.
- Investment Brain — inquiry and interpretation frameworks.
- Improve — Decision Memory, postmortems, lessons, and controlled evolution.
- Installation — updates, runtime homes, service startup, and recovery.
- Safety, policy, and execution — permissions, approvals, brokers, secrets, and final-action boundaries.
- Documentation index — the complete product reference.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf06c0a2adf00871e75e7dc6b31873fe01aac9900dd34d4f96552bc924345a1d
|
|
| MD5 |
c613c27a1c85c1609d3c7c496eb05e2b
|
|
| BLAKE2b-256 |
e79439cf57ce7027c1c8677cafa06214764e620c178f5736a6a6b6ad9c9534c4
|
Provenance
The following attestation bundles were made for tradingcodex-2.1.3.tar.gz:
Publisher:
release.yml on monarchjuno/tradingcodex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tradingcodex-2.1.3.tar.gz -
Subject digest:
cf06c0a2adf00871e75e7dc6b31873fe01aac9900dd34d4f96552bc924345a1d - Sigstore transparency entry: 2239981924
- Sigstore integration time:
-
Permalink:
monarchjuno/tradingcodex@721f3c1e9dab2c8a4280ce094cca33d506dcfe33 -
Branch / Tag:
refs/tags/v2.1.3 - Owner: https://github.com/monarchjuno
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@721f3c1e9dab2c8a4280ce094cca33d506dcfe33 -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c334bd54efb11a092407f4cc32a82d569fda6017e70898651cb19c4b5a5cbc2a
|
|
| MD5 |
3aa5f51771daa3c17b927cc3b2f5af17
|
|
| BLAKE2b-256 |
c02798becf40a5337a6ab683db73dec5c0d44e0d86ecf172bc121f860a4a7c98
|
Provenance
The following attestation bundles were made for tradingcodex-2.1.3-py3-none-any.whl:
Publisher:
release.yml on monarchjuno/tradingcodex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tradingcodex-2.1.3-py3-none-any.whl -
Subject digest:
c334bd54efb11a092407f4cc32a82d569fda6017e70898651cb19c4b5a5cbc2a - Sigstore transparency entry: 2239982162
- Sigstore integration time:
-
Permalink:
monarchjuno/tradingcodex@721f3c1e9dab2c8a4280ce094cca33d506dcfe33 -
Branch / Tag:
refs/tags/v2.1.3 - Owner: https://github.com/monarchjuno
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@721f3c1e9dab2c8a4280ce094cca33d506dcfe33 -
Trigger Event:
workflow_dispatch
-
Statement type: