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

> QuantHarness is a research codebase from Y-Research-SBU that runs four LangGraph agents over K-line data and returns a LONG or SHORT directive. It is a research artifact, not a trading system, and the README is candid about the vision-model requirement.

**Y-Research-SBU/QuantHarness** — Official Repository for QuantHarness

- Repository: https://github.com/Y-Research-SBU/QuantHarness
- Stars: 2,868 · Forks: 615
- Language: HTML
- License: MIT
- Published: 2026-09-28 · Updated: 2026-09-28 · Language: en
- Canonical page: https://hysenlabs.com/projects/y-research-sbu-quantharness

## What QuantHarness actually is, and who should care

QuantHarness is the official repository for a paper titled Price-Driven Multi-Agent LLMs for High-Frequency Trading, linked to arXiv 2509.09995. It is a research artifact rather than a product. The repository is a flat set of Python modules at the top level, plus assets, benchmark, templates and tests directories, and the primary language listed for the repo is HTML, which reflects the bundled web templates rather than the analysis code.

The audience is narrow and specific. If you are studying how to decompose chart analysis into cooperating LLM agents, the four agent files (indicator_agent.py, pattern_agent.py, trend_agent.py, decision_agent.py) are readable in isolation, and the graph wiring lives in graph_setup.py and trading_graph.py. If you want a tool that places orders, this is not it. The README describes a system that produces an analysis and a directive, and it never claims execution.

The scope is also worth stating plainly. The README calls it high-frequency trading, but the interface works in timeframes from 1-minute to daily intervals and pulls data through Yahoo Finance. That is a research framing, not a latency-sensitive execution stack.

## How the four agents and the LangGraph state machine fit together

The mechanism is a shared state object passed between agents. agent_state.py defines that state, and the README's Python example shows its keys: kline_data, analysis_results, messages, time_frame and stock_name. Each agent reads what it needs and writes a report back into the same state.

The Indicator Agent converts raw OHLC data into signal-ready metrics. The README states it computes five technical indicators on each incoming K-line, naming RSI for momentum extremes, MACD for convergence-divergence dynamics, and the Stochastic Oscillator for where closing prices sit inside recent ranges. The Pattern Agent takes a different route: it draws the recent price chart, identifies main highs, lows and the general up-or-down shape, compares that shape against a set of familiar patterns, and returns a short plain-language description of the best match. The Trend Agent works on annotated K-line charts overlaid with fitted trend channels, using upper and lower boundary lines to quantify direction, channel slope and consolidation zones.

The Decision Agent is the join point. It synthesizes the outputs of the Indicator, Pattern, Trend and Risk agents, and the README says it produces a directive naming LONG or SHORT, recommended entry and exit points, stop-loss thresholds, and a rationale grounded in each agent's findings. Two of those agents are visual: pattern and trend analysis operate on generated charts, which is why the README carries the note that the model requires an LLM that can take images as input. That single constraint shapes everything downstream, from model choice to cost per analysis.

## Installation and a first programmatic run

The README gives a Conda-first installation. Create an environment on Python 3.11, then install from the requirements file at the repository root.

```bash
conda create -n quantharness python=3.11
conda activate quantharness
pip install -r requirements.txt
```

TA-Lib is the step that usually breaks. The README anticipates this and offers a conda-forge route instead of pip, pointing at the TA-Lib Python repository for platform-specific instructions.

```bash
conda install -c conda-forge ta-lib
```

Next, credentials. You can enter a key later in the web interface, or export one of the provider variables the README lists. OpenAI, Anthropic, Qwen through DashScope and MiniMax are all named, and the README notes DashScope is based in Singapore so delays may occur.

```bash
export OPENAI_API_KEY="your_openai_api_key_here"
export ANTHROPIC_API_KEY="your_anthropic_api_key_here"
```

Start the Flask interface, which the README says serves at 127.0.0.1:5000.

```bash
python web_interface.py
```

For scripted use, import TradingGraph, build an initial state with your K-line data as a DataFrame dict, and call invoke. The README's example uses a 4hour timeframe and BTC as the stock name, then reads final_trade_decision, indicator_report, pattern_report and trend_report out of the returned state.

```python
from trading_graph import TradingGraph

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

Model defaults are editable. The README shows a provider branch in web_interface.py that swaps in claude-haiku-4-5-20251001 for the agent model when the configured model does not already start with claude.

## The vision requirement is the constraint that decides your bill

Most of the friction in QuantHarness comes from one line in the README: the model requires an LLM that can take images as input, because the agents generate and analyze visual charts. This is not incidental. The Pattern Agent and the Trend Agent both operate on rendered images, so a text-only model cannot run the full graph.

That choice has consequences the README does not quantify. Multimodal calls cost more per token than text calls, and each analysis renders charts and sends them, so a scan across many symbols and timeframes multiplies both latency and spend. The README lists MiniMax as having a 204K context and an OpenAI-compatible API, and lists Qwen through DashScope, which suggests the authors intend provider flexibility. Whether a given model's vision quality is good enough for pattern matching is something you have to determine yourself; the repository does not publish a model comparison.

There is a second, quieter constraint. The Decision Agent's output is prose containing entry, exit and stop-loss levels. Parsing that reliably into something a machine can act on is left to the caller. The README's example prints the decision string. Nothing in the repository describes a structured schema for it.

## Where QuantHarness is the wrong tool

QuantHarness is not a backtesting framework, and the README never presents it as one. There is a benchmark directory in the repository layout, but the README does not document what it contains, what metric it reports, or how to reproduce a published result. If your goal is to evaluate a strategy against historical data with standard metrics, you need a different tool for that job and QuantHarness as the signal source at most.

It is also not a risk system. The README mentions a Risk agent as one of the inputs to the Decision Agent, but no risk_agent.py appears in the top-level repository entries, so the risk assessment is either embedded elsewhere or produced by the Decision Agent itself. Either way, the only risk control the README describes is a stop-loss threshold written into a text directive. Position sizing, exposure limits and drawdown controls are not mentioned.

Finally, the high-frequency label deserves scepticism. Data arrives through yfinance, and the web interface supports intervals from 1-minute to daily. Yahoo Finance is a delayed, rate-limited retail data source. A pipeline built on it can analyze intraday bars, but the data path is not one you would build an execution strategy around.

## How it compares with a plain LangChain agent chain

The obvious alternative is a single LangChain agent with tools for indicators and chart rendering, rather than a LangGraph state machine with four specialized agents. The difference is in what gets preserved. A tool-calling agent decides at runtime which tool to call and in what order, and the intermediate reasoning is typically a message trace. QuantHarness instead fixes the division of labour: indicator, pattern and trend each produce a named report that lands in the shared state, and the Decision Agent receives all of them.

That structure buys inspectability. Because indicator_report, pattern_report and trend_report are separate keys, you can log them, diff them across runs, or swap one agent without touching the others. It costs flexibility: the graph in graph_setup.py decides the flow, so an analysis that would benefit from, say, skipping pattern detection on a quiet market still runs it unless you change the graph.

The other comparison worth making is against classical quantitative pipelines that compute indicators and fit channels with no LLM in the loop at all. Those are deterministic and cheap. QuantHarness trades that determinism for natural-language synthesis, which is useful when you want a readable rationale and less useful when you want the same input to produce the same output twice. The README does not discuss reproducibility.

## Maintenance, licence and what an upgrade costs you

The repository is not archived, and the last push was on 2026-08-18. There are no releases, so there is no versioned artifact to pin against; you track the main branch or a commit hash of your choosing. The README does not document a changelog, a deprecation policy or a migration path, which means an upgrade is a diff review of the agent modules and default_config.py rather than a version bump.

Dependency drift is the real maintenance cost. requirements.txt pins nothing: flask, yfinance, pandas, numpy, matplotlib, mplfinance, scipy, TA-Lib, the langchain family, langgraph, openai, anthropic, ipython, Pillow and requests are all unpinned. LangGraph and the LangChain packages change their APIs, and the graph wiring in graph_setup.py and trading_graph.py is exactly the kind of code those changes touch. TA-Lib adds a second axis of pain because it needs a native library, which is why the README offers the conda-forge route.

On licensing, the repository is MIT, which permits commercial use and modification provided the copyright notice and permission notice are retained. That covers the code in this repository. It does not cover the model you call, the market data you fetch, or any third-party package in requirements.txt, each of which carries its own terms. The README does not address data licensing for Yahoo Finance or any provider's usage policy. That is a question for your own counsel, not something the repository answers.

## Conclusion

Adopt QuantHarness if you want to read or reproduce a multi-agent LLM trading pipeline, or to reuse the Indicator, Pattern, Trend and Decision agents as a starting skeleton; the MIT licence and the separate agent files make that straightforward. Do not adopt it as a live trading system: the README documents no backtest numbers, no paper-trading mode, no execution layer and no risk controls beyond what the Decision agent writes in prose. Before anything else, confirm that your chosen model accepts images, because the README states the model requires an LLM that can take images as input, and check benchmark/ and tests/ to see what the authors actually measured.

## FAQ

### Does QuantHarness need a model that can see images?

Yes. The README states the model requires an LLM that can take images as input, because the Pattern Agent and Trend Agent generate and analyze visual charts. A text-only model cannot run the full graph.

### How do I install QuantHarness?

The README uses Conda with Python 3.11, then pip install -r requirements.txt. If TA-Lib fails to build, the README suggests conda install -c conda-forge ta-lib instead.

### Which LLM providers can I use with QuantHarness?

The README lists API key variables for OpenAI, Anthropic, Qwen through DashScope and MiniMax, and notes DashScope is based in Singapore so delays may occur. Keys can also be entered in the web interface.

### What does QuantHarness output for a given symbol?

The Decision Agent synthesizes the Indicator, Pattern, Trend and Risk agent outputs into a directive that specifies LONG or SHORT, recommended entry and exit points, stop-loss thresholds and a rationale. The README's Python example reads it from final_trade_decision.

## Sources

- [Issues](https://github.com/Y-Research-SBU/QuantHarness/issues)
- [License: MIT](https://github.com/Y-Research-SBU/QuantHarness/blob/main/LICENSE)
- [README](https://github.com/Y-Research-SBU/QuantHarness/blob/main/README.md)
- [Y-Research-SBU/QuantHarness on GitHub](https://github.com/Y-Research-SBU/QuantHarness)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/y-research-sbu-quantharness
