QuantHarness: Price-Driven Multi-Agent LLMs for High-Frequency Trading

A sophisticated multi-agent trading analysis system combining technical indicators, pattern recognition, and trend analysis using LangChain and LangGraph.

Stars
★ 2.9k
Last updated
2mo ago
License
MIT
Primary language
HTML

At a glance

How it runs
Web appLibrary / SDK
Works with
Portable with changesOpenAI API · Claude API
Cost
Free software; you pay for model usage
Setup effort
Medium · a few setup steps
You'll need
Python 3.11CondaLLM API keyShell / CLINetwork accessLocal filesystem
Typical use
Quant researchers exploring LLM-based multi-agent strategies for high-frequency trading can use QuantHarness to prototype and backtest technical signals.
Not a fit if
  • Developers using text-only LLMs, as agents require image-capable models
  • Anyone planning to trade live or act on the output as financial advice

What does this agent do, and when should you use it?

QuantHarness is an open-source multi-agent trading analysis framework developed by researchers at Stony Brook University and collaborators. It orchestrates four specialized agents—Indicator, Pattern, Trend, and Decision—using LangGraph to transform K-line data into actionable trade directives. The system provides both a Flask-based web interface and a programmatic Python API, supporting live market data via yfinance and integrating with LLM providers such as OpenAI, Anthropic, Qwen, and MiniMax. The project includes detailed documentation and an accompanying arXiv paper (2509.09995).

QuantHarness orchestrates four agents: the Indicator Agent computes technical indicators like RSI, MACD, and Stochastic Oscillator; the Pattern Agent draws price charts and identifies chart patterns; the Trend Agent fits trend channels to quantify market direction; and the Decision Agent synthesizes outputs to generate LONG/SHORT trade directives with entry, exit, stop-loss, and rationale. It is invoked via the TradingGraph class in Python or through a Flask web interface that allows asset, timeframe, and date range selection, and includes API key management.

  1. Quant researchers exploring LLM-based multi-agent strategies for high-frequency trading can use QuantHarness to prototype and backtest technical signals.
  2. Traders seeking AI-assisted technical analysis can interact via the web UI to analyze stocks, crypto, commodities, or indices in real time.
  3. Developers needing a modular trading analysis library can import TradingGraph and integrate it into their own data pipelines.
  4. Educators teaching financial AI can demonstrate multi-agent collaboration and visual analysis.
  5. Users interested in comparing LLM providers can test OpenAI, Claude, Qwen, or MiniMax within the trading context.

How do you install or deploy this agent?

  1. Create and activate a Conda environment: conda create -n quantharness python=3.11 && conda activate quantharness.
  2. Install dependencies: pip install -r requirements.txt.

If TA-Lib fails, try conda install -c conda-forge ta-lib.

  1. Set up an LLM API key: either via the web interface or by setting environment variables like export OPENAI_API_KEY="your_key".

How do you use this agent?

Start the web interface: python web_interface.py, accessible at http://127.0.0.1:5000.
Alternatively, programmatically:

from trading_graph import TradingGraph
tg = TradingGraph()
initial_state = {"kline_data": your_dataframe_dict, "analysis_results": None, "messages": [], "time_frame": "4hour", "stock_name": "BTC"}
final_state = tg.graph.invoke(initial_state)
print(final_state.get("final_trade_decision"))

You can adjust default configurations (e.g., model selection) in web_interface.py.

What are this agent's strengths and limitations?

Pros
  • Multi-agent design provides comprehensive analysis covering indicators, patterns, trends, and decision-making.
  • Supports multiple LLM providers (OpenAI, Anthropic, Qwen, MiniMax), reducing vendor lock-in.
  • Offers both web UI and programmatic access, catering to different user levels.
  • Real-time data from yfinance and visualization enhance interpretability.
Limitations
  • Requires paid LLM API access, leading to recurring costs and external dependency.
  • TA-Lib installation can be platform-specific and tricky, increasing setup friction.
  • Performance relies on LLM latency and quality, which may be unpredictable.
  • Data source is limited to Yahoo Finance, which may lack some assets or historical depth.
  • Intended for research/education only; not for live trading or financial advice.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
QuantHarness: Price-Driven Multi-Agent LLMs for High-Frequency Trading This agent 30 · Major gaps Web appFree + model costs ★ 2.9k 2mo ago HTML OpenAI API · Claude API
Yuxi – Self-Hosted Multi-Tenant Knowledge Agent Platform 41 · Major gaps Self-hosted serviceFree + model costs ★ 7.4k 2d ago Python OpenAI API
TradingAgents Financial Research Framework 76 · Good CLIFree + model costs ★ 112k 2d ago Python OpenAI API · Claude API
PRISM-INSIGHT 49 · Major gaps CLIFree + model costs ★ 779 today Python ChatGPT · OpenAI API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
30/ 100 5-point scale 1.5 / 5
Trust 0/29
Reliability 5/14
Adaptability 8/18
Convention 8/18
Effectiveness 6/13
Verifiability 3/8
Why each dimension lost points
Trust0 / 29 · 0.0/5

Evidence shows: The repository provides no mechanisms for least privilege, user confirmation, data flow transparency, sensitive data handling, dependency security, external effects, rollback, or source attribution. README mentions API key management but does not specify secure storage or least privilege. Therefore all trust criteria score 0.

Reliability5 / 14 · 1.8/5

Evidence shows: README and test files are mostly consistent in configuration and API key handling, but there are inconsistencies, such as 'langchain-qwq' mentioned in README but not listed in requirements.txt, and tests mock many dependencies, potentially masking real behavior. Dependency availability: requirements.txt lists all dependencies but without version pinning, and TA-Lib installation may be problematic. Failure messages: README provides troubleshooting section but lacks detailed error handling mechanisms. Thus self-consistency scores 1, dependency availability scores 1, failure messages scores 1.

Adaptability8 / 18 · 2.2/5

Evidence shows: README clearly identifies target audience (researchers and traders) and usage scenarios (technical analysis, multi-agent analysis), but does not define capability boundaries, such as limitations on data quality or market conditions. Trigger precision: README describes how to invoke TradingGraph but does not detail trigger conditions. Environment fit: installation instructions are provided but compatibility with OS or Python versions is not specified. Therefore audience and scenarios scores 2, capability boundaries scores 1, trigger precision scores 1, environment fit scores 1.

Convention8 / 18 · 2.2/5

Evidence shows: README provides clear information architecture including features, installation, usage, implementation details. Installation notes are detailed with conda and pip steps. Naming stability: no version history or naming conventions provided. Examples and FAQ: usage examples and troubleshooting provided. Known limitations: README mentions TA-Lib installation issues but not comprehensive. License is MIT, but no versioning or changelog. Maintenance responsibility: contact emails provided but maintainers not clearly identified. Thus information architecture scores 2, install notes scores 2, naming stability scores 1, examples and FAQ scores 2, known limitations scores 1, license scores 2, versioning/changelog scores 0, maintenance responsibility scores 1.

Effectiveness6 / 13 · 2.3/5

Evidence shows: Output usability: README describes outputs including trade decisions and reports but does not detail output format. Marginal value: tool provides multi-agent analysis but may overlap with other tools. Cost-benefit: requires multiple LLM API keys, potentially high cost, but no cost estimation provided. Therefore output usability scores 2, marginal value scores 1, cost-benefit scores 1.

Verifiability3 / 8 · 1.9/5

Evidence shows: Claim traceability: README cites arXiv paper but does not link to specific implementation details. Cross-source corroboration: test files provide some validation but not independent verification. Fact-inference separation: README distinguishes feature descriptions and disclaimers but does not clearly separate facts and inferences. Therefore claim traceability scores 1, cross-source corroboration scores 1, fact-inference separation scores 1.

Risks and how to mitigate them
  • Not found in source: least-privilege scopingGrant only what the task needs: a dedicated account or read-only token, scoped to specific directories and repos.
  • Not found in source: confirmation before actingTurn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
  • Not found in source: data-flow disclosureWatch which external services it contacts (proxy or firewall logs) and keep sensitive data out until you know where it goes.
  • Not found in source: sensitive-data handlingUse dedicated, low-privilege, revocable API keys — never production credentials — and keep secrets out of logs.
  • Not found in source: dependency securityPin versions and run a dependency audit (npm audit, pip-audit) before installing; prefer running it in a container.
  • Not found in source: disclosed external effectsEstablish which external systems it writes to, sends to or changes, and verify with test accounts or repos before production.
  • Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
  • Not found in source: verifiable attributionInstall from the official repo or registry and check the publisher and URL to avoid look-alike packages.
  • API key management lacks secure storage and least privilege guidance, potentially exposing sensitive information.
  • Dependencies are not version-pinned, posing supply chain risks.
  • Tests heavily use mocks, potentially masking real integration issues.
  • No versioning or changelog provided, making updates hard to track.
Evidence confidence: Low Reviewed Aug 11, 2026 Reviewed revision 00a88cbbc3b9 New commits since this review; the score may not cover them
See the full review method →

FAQ

What are the hardware/software prerequisites?
You need Python 3.11, Conda, and the TA-Lib dependency. Network access is required for data and an LLM API key (e.g., OpenAI).
Can this be used for live trading?
No, it's for educational and research purposes only. The README explicitly disclaims financial advice.
How do I manage API keys?
You can enter them in the web interface or set environment variables like OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.
What if TA-Lib fails to install?
Try conda install -c conda-forge ta-lib or refer to the official TA-Lib Python repository for platform-specific instructions.
View on GitHub ↗ Install ↓

Related agents