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.
- Source repo
- Y-Research-SBU/QuantHarness
- Stars
- ★ 2.9k
- Last updated
- 2mo ago
- License
- MIT
- Primary language
- HTML
- FA score
- 30/100 · Major gaps
At a glance
- How it runs
- 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
- 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
- Source review
- 30/100 · Major gaps 8 safety controls not found
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.
- Quant researchers exploring LLM-based multi-agent strategies for high-frequency trading can use QuantHarness to prototype and backtest technical signals.
- Traders seeking AI-assisted technical analysis can interact via the web UI to analyze stocks, crypto, commodities, or indices in real time.
- Developers needing a modular trading analysis library can import TradingGraph and integrate it into their own data pipelines.
- Educators teaching financial AI can demonstrate multi-agent collaboration and visual analysis.
- 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?
- Create and activate a Conda environment: conda create -n quantharness python=3.11 && conda activate quantharness.
- Install dependencies: pip install -r requirements.txt.
If TA-Lib fails, try conda install -c conda-forge ta-lib.
- 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?
- 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.
- 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?
Why each dimension lost points
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.
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.
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.
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.
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.
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.
- 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.