Script-first multi-agent trading analysis orchestrator with deterministic report outputs.
Agent-Alpha runs a LangGraph pipeline for one or many tickers, then writes stable markdown + JSON artifacts designed for both human review and machine ingestion.
This repository is for research and educational use only. It is not financial advice.
- Runtime consolidated around
scripts/run_today.pyfor daily usage. - Graph internals split into focused modules (
setup,propagation,conditional_logic,reflection). - Reporting standardized in
tradingagents/reporting.pywith stable section headings. - Optional checkpoint/resume support added for interrupted runs.
- Decision memory loop now supports deferred outcome resolution and reflection reuse.
- Structured decision agents now feed a consistent five-tier rating scale.
python -m venv .venv
source .venv/bin/activate
pip install .cp .env.example .envSet at least one provider key (for example OPENAI_API_KEY).
OPENAI_API_KEYGOOGLE_API_KEYANTHROPIC_API_KEY- provider-specific keys for OpenAI-compatible backends as needed
Single ticker (today):
python scripts/run_today.py --ticker NVDAMultiple tickers (today):
python scripts/run_today.py --tickers NVDA,MSFT,AAPLCustom date:
python scripts/run_today.py --tickers NVDA,AMD --date 2026-04-29Enable checkpoint resume:
python scripts/run_today.py --ticker NVDA --checkpointscripts/run_today.py supports:
--ticker--tickers--date(default: local today)--provider(default:openai)--deep-model(default:gpt-5.4)--quick-model(default:gpt-5.4-mini)--debate-rounds(default:1)--output-dir(default:outputs)--checkpoint(resume from LangGraph checkpoints)
Provider support in the current LLM client factory:
- OpenAI-compatible:
openai,xai,deepseek,qwen,glm,ollama,openrouter - Native adapters:
google,anthropic,azure
outputs/
YYYY-MM-DD/
index.md
<TICKER>/
report.md
metadata.json
_internal_logs/
_cache/
report.mdfollows the schema contract inplanning/Output_Schema.md.metadata.jsonstores parseable run metadata (run ID, provider, models, final rating, confidence, status).index.mdaggregates per-ticker outcomes for the day.
Agent-Alpha keeps an append-only decision log and updates prior pending decisions once outcome data is available:
- computes raw return and alpha vs SPY after holding window
- generates compact reflection text
- injects lessons into future runs (same ticker and cross-ticker context)
This creates a lightweight learning loop without training new model weights.
tradingagents/: agents, graph orchestration, LLM clients, reporting, utilitiesscripts/: script entrypoints and smoke checkstests/: unit/integration/smoke testsplanning/: product/technical docs and output contractresearch/: research notes and run analysis artifacts
Run all tests:
pytestRun focused regression tests for core refactor guarantees:
pytest tests/test_output_schema.py tests/test_ticker_symbol_handling.pyRun structured-output smoke test against a real provider:
python scripts/smoke_structured_output.py openaiApache-2.0 (LICENSE).
- Improve confidence calibration and risk quantification fields.
- Expand structured evidence extraction from analyst outputs.
- Add portfolio-level synthesis across many daily ticker reports.