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.
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.
- 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.
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.
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 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.