Commit Graph

36 Commits

Author SHA1 Message Date
Yijia-Xiao
a5cb7cbd61 chore: release v0.2.5 — sentiment analyst, env-var config, more providers
Headline themes in v0.2.5:

- Sentiment Analyst grounded in real data. Renamed from social_media_analyst
  and redesigned to pre-fetch Yahoo News, StockTwits, and Reddit before the
  LLM is invoked, ending the prior fabrication behavior.
- MiniMax provider with full M2.x catalog and dual-region split. Qwen and
  GLM also split into international + China regions with separate API keys
  and a clean secondary region prompt in the CLI.
- TRADINGAGENTS_* env-var overlay for DEFAULT_CONFIG with type-aware
  coercion; .env loading centralized so every entry point sees the user's
  keys. Interactive API-key detection prompts and persists missing keys
  to .env on the fly.
- OLLAMA_BASE_URL end-to-end for remote ollama-serve, plus a Custom model
  ID option in the Ollama dropdown.
- Configurable news-fetch parameters and configurable alpha benchmark for
  non-US tickers (.NS / .T / .HK / .L / .TO / .AX / .BO ship with sensible
  regional defaults).
- Multi-language output now propagates to every user-facing agent
  (researchers, risk debators, research manager, trader) instead of only
  the analysts and portfolio manager.
- Model catalog refresh across all providers (GPT-5.5 frontier, Claude
  Opus 4.7, Gemini 3.1 Flash-Lite GA, Grok 4.20, Qwen 3.6 line).
- Capability-dispatch table drives provider-specific structured-output
  quirks (DeepSeek V4/reasoner and MiniMax M2.x tool_choice rejection,
  MiniMax reasoning_split) so the general client stays clean.
- Fixes: ticker path-traversal validation (security), dotenv loading via
  console script, reports save bug, exchange-suffix truncation in the
  ticker prompt, Docker permission errors, deepcopy config isolation,
  max_recur_limit plumbing, clearer missing-API-key error.

See CHANGELOG.md for the full per-item list with issue/PR references.
2026-05-11 09:27:36 +00:00
Yijia-Xiao
819e813a14 docs(readme): Ollama line covers endpoint, pull, custom model
The Required APIs section now mentions the default endpoint,
OLLAMA_BASE_URL for remote ollama-serve, ollama pull, and the
Custom model ID dropdown option, replacing the previous one-liner
that left those details implicit.
2026-05-11 09:07:38 +00:00
Yijia-Xiao
879e2bb5da refactor: align display label and docs with sentiment_analyst rename
The agent ingests news, StockTwits, and Reddit, but CLI labels, the
README description, and the legacy shim docstring still framed it as
social-media-only. Updates all user-visible surfaces so the name and
the implementation match.
2026-05-11 06:25:22 +00:00
Yijia-Xiao
d0dd0420ad feat(llm): GLM dual-region split + catalog refresh
Zhipu serves GLM under two brands with separate accounts (Z.AI
international vs BigModel China); the CLI URL pointed at one while
the openai_client default pointed at the other. Split into glm +
glm-cn with secondary region prompt (same UX as Qwen + MiniMax).
Catalog adds glm-5-turbo and glm-4.5-air per docs.z.ai.
2026-05-11 04:19:50 +00:00
Yijia-Xiao
e1316686f8 fix(llm): MiniMax integration polish vs official docs
M2.x tool_choice is enum-only (none/auto), so route through the
no-tool_choice dispatch. MinimaxChatOpenAI injects reasoning_split
so <think> blocks stay out of content. Catalog rounded out to the
full official M2.x lineup plus forward-compat regex.
2026-05-11 02:40:33 +00:00
Yijia-Xiao
19d22b54a9 feat(llm): add MiniMax as a built-in provider
Two regional endpoints (global api.minimax.io, China api.minimaxi.com)
with separate API keys. Models M2.7 / M2.5 plus -highspeed variants,
204K context. Follows the existing provider-preset pattern.

#789 #609 #577 #546 #395 #378
2026-05-11 02:03:27 +00:00
Yijia-Xiao
7c37249f80 chore: release v0.2.4 — structured agents, checkpoint, memory log, providers
This release bundles substantial work since v0.2.3:

- Structured-output Research Manager, Trader, and Portfolio Manager
  (canonical with_structured_output pattern, single LLM call per agent,
  rendered markdown preserves the existing report shape).
- LangGraph checkpoint resume for crash recovery (--checkpoint flag).
- Persistent decision log replacing the per-agent BM25 memory, with
  deferred reflection driven by yfinance returns + alpha vs SPY.
- DeepSeek, Qwen, GLM, and Azure OpenAI provider support; dynamic
  OpenRouter model selection.
- Docker support; cache and logs moved to ~/.tradingagents/ to fix
  Docker permission issues.
- Windows UTF-8 encoding fix on every file I/O site.
- 5-tier rating consistency (Buy / Overweight / Hold / Underweight / Sell)
  across Research Manager, Portfolio Manager, signal processor, memory log.

Plus the small quality items in this commit:

1. Suppress noisy Pydantic serializer warnings from OpenAI Responses-API
   parse path by defaulting structured-output to method="function_calling"
   (root-cause fix, not a warnings filter — same typed result, no warnings).
2. Ship scripts/smoke_structured_output.py so contributors can verify
   their provider's structured-output path with one command.
3. Add opt-in memory_log_max_entries config — when set, oldest resolved
   memory log entries are pruned once the cap is exceeded; pending
   entries (unresolved) are never pruned.
4. backend_url default changed from the OpenAI URL to None so the
   per-provider client falls back to its native endpoint instead of
   leaking OpenAI's URL into Gemini / other clients.

CHANGELOG.md added with the full v0.2.4 entry. 92 tests pass without API keys.
2026-04-25 22:16:09 +00:00
Yijia-Xiao
4cbd4b086f feat: add LangGraph checkpoint resume for crash recovery (#594)
Long analyses can take many minutes; a crash or interruption forced users
to re-run from scratch and re-pay every LLM call.  This adds an opt-in
checkpoint layer backed by per-ticker SQLite databases so the graph
resumes from the last successful node.

How to use:
- CLI:    tradingagents analyze --checkpoint
- CLI:    tradingagents analyze --clear-checkpoints
- Python: config["checkpoint_enabled"] = True

Lifecycle:
- propagate() recompiles the graph with a SqliteSaver when enabled and
  injects a deterministic thread_id derived from ticker+date so the
  same ticker+date resumes while a different date starts fresh.
- On successful completion the per-thread checkpoint rows are cleared.
- The context manager is closed in a try/finally so a crash never
  leaks the SQLite connection or leaves the graph in checkpoint mode.

Storage: ~/.tradingagents/cache/checkpoints/<TICKER>.db
(override via TRADINGAGENTS_CACHE_DIR).

The checkpointer module is new (tradingagents/graph/checkpointer.py)
and the GraphSetup now returns the uncompiled workflow so it can be
recompiled with a saver when needed.

Adds langgraph-checkpoint-sqlite>=2.0.0 dependency. 3 new tests verify
the crash/resume cycle and that a different date starts fresh.
2026-04-25 08:47:15 +00:00
Yijia-Xiao
b0f6058299 feat: add DeepSeek, Qwen, GLM, and Azure OpenAI provider support 2026-04-13 07:12:07 +00:00
Yijia-Xiao
10c136f49c feat: add Docker support for cross-platform deployment 2026-04-04 08:14:01 +00:00
Yijia-Xiao
4641c03340 TradingAgents v0.2.3 2026-03-29 19:50:46 +00:00
Yijia-Xiao
e75d17bc51 chore: update model lists and defaults to GPT-5.4 family 2026-03-29 19:45:36 +00:00
Yijia-Xiao
589b351f2a TradingAgents v0.2.2 2026-03-22 23:47:56 +00:00
Yijia-Xiao
77755f0431 chore: consolidate install, fix CLI portability, normalize LLM responses
- Point requirements.txt to pyproject.toml as single source of truth
- Resolve welcome.txt path relative to module for CLI portability
- Include cli/static files in package build
- Extract shared normalize_content for OpenAI Responses API and
  Gemini 3 list-format responses into base_client.py
- Update README install and CLI usage instructions
2026-03-22 21:38:01 +00:00
Yijia-Xiao
b19c5c18fb docs: add v0.2.1 release note to README 2026-03-15 23:39:05 +00:00
Yijia Xiao
80aab35119 docs: update README for v0.2.0 release
- TradingAgents v0.2.0 release
- Trading-R1 announcement
- Multi-provider LLM documentation
2026-02-04 00:13:10 +00:00
Yijia Xiao
102b026d23 refactor: clean up codebase and streamline documentation
- Remove debug prints from vendor routing (interface.py)
- Simplify vendor fallback to only handle rate limits
- Reorder CLI provider menu: OpenAI, Google, Anthropic, xAI, OpenRouter, Ollama
- Remove dead files: local.py, reddit_utils.py, openai.py, google.py, googlenews_utils.py, yfin_utils.py
2026-02-03 22:27:20 +00:00
Edward Sun
b2ef960da7 updated readme 2025-10-09 00:32:04 -07:00
Edward Sun
a5dcc7da45 update readme 2025-10-06 20:33:12 -07:00
luohy15
b01051b9f4 Switch default data vendor
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 12:43:27 +08:00
luohy15
8fdbbcca3d alpha vantage api key url 2025-09-29 18:22:31 +08:00
luohy15
7fc9c28a94 Add environment variable configuration support
- Add .env.example file with API key placeholders
- Update README.md with .env file setup instructions
- Add dotenv loading in main.py for environment variables

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-26 23:58:51 +08:00
luohy15
7bcc2cbd8a Update configuration documentation for Alpha Vantage data vendor
Add data vendor configuration examples in README and main.py showing how to configure Alpha Vantage as the primary data provider. Update documentation to reflect the current default behavior of using Alpha Vantage for real-time market data access.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-26 23:52:26 +08:00
luohy15
0ab323c2c6 Add Alpha Vantage API integration as primary data provider
- Replace FinnHub with Alpha Vantage API in README documentation
- Implement comprehensive Alpha Vantage modules:
  - Stock data (daily OHLCV with date filtering)
  - Technical indicators (SMA, EMA, MACD, RSI, Bollinger Bands, ATR)
  - Fundamental data (overview, balance sheet, cashflow, income statement)
  - News and sentiment data with insider transactions
- Update news analyst tools to use ticker-based news search
- Integrate Alpha Vantage vendor methods into interface routing
- Maintain backward compatibility with existing vendor system

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-26 22:57:50 +08:00
luohy15
a6734d71bc WIP 2025-09-26 16:17:50 +08:00
Yijia Xiao
26c5ba5a78 Revert "Docker support and Ollama support (#47)" (#57)
This reverts commit 78ea029a0b.
2025-06-26 00:07:58 -04:00
Geeta Chauhan
78ea029a0b Docker support and Ollama support (#47)
- Added support for running CLI and Ollama server via Docker
- Introduced tests for local embeddings model and standalone Docker setup
- Enabled conditional Ollama server launch via LLM_PROVIDER
2025-06-25 23:57:05 -04:00
Mithil Srungarapu
383deb72aa Updated README.md
The diagrams were switched, so I fixed it.
2025-06-18 19:08:10 -07:00
neo
a879868396 docs: add links to other language versions of README (#13)
Added language selection links to the README for easier access to translated versions: German, Spanish, French, Japanese, Korean, Portuguese, Russian, and Chinese.
2025-06-09 15:51:06 -07:00
Yijia-Xiao
0013415378 Add star history 2025-06-09 15:14:41 -07:00
Edward Sun
0fdfd35867 Fix default python usage config code 2025-06-08 13:16:10 -07:00
Edward Sun
e994e56c23 Remove EODHD from readme 2025-06-07 15:04:43 -07:00
Yijia-Xiao
cc97cb6d5d chore(release): v0.1.0 – initial public release of TradingAgents 2025-06-05 04:27:57 -07:00
Yijia Xiao
1a2074b60e Update README.md 2025-01-20 21:21:43 -08:00
Yijia-Xiao
a70ca6e1a1 Figures 2024-12-28 11:47:36 +08:00
Yijia-Xiao
c2fa046a9b TradingAgents-AI 2024-12-28 11:32:06 +08:00