Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Y-Research-SBU/QuantAgent/llms.txt

Use this file to discover all available pages before exploring further.

QuantAgent’s Pattern and Trend agents generate and interpret visual charts. You must use a vision-capable LLM (e.g., gpt-4o, claude-haiku-4-5-20251001, or qwen3-vl-plus) — text-only models will not work.

Using the web interface

1

Create a conda environment

Python 3.11 is required.
conda create -n quantagents python=3.11
conda activate quantagents
2

Install dependencies

pip install -r requirements.txt
If TA-Lib fails to install with pip, use the conda-forge fallback:
conda install -c conda-forge ta-lib
3

Set your API key

Export the key for your chosen provider before starting the server. You can also set it later through the web interface settings panel.
# OpenAI
export OPENAI_API_KEY="your_openai_api_key_here"

# Anthropic
export ANTHROPIC_API_KEY="your_anthropic_api_key_here"

# Qwen (DashScope)
export DASHSCOPE_API_KEY="your_dashscope_api_key_here"
4

Start the web interface

python web_interface.py
The app starts at http://127.0.0.1:5000. Open it in your browser.
5

Run your first analysis

  1. Select an asset (e.g., BTC, SPX, AAPL) from the asset list.
  2. Choose a timeframe — from 1m up to 1d.
  3. Set a date range. The system uses the most recent 45 candlesticks from your selection.
  4. Click Analyze. The four agents run in sequence and return their reports alongside the final trade decision.

Using the Python API

If you prefer to run analyses programmatically, import TradingGraph directly and pass your OHLC data as a dictionary.
from trading_graph import TradingGraph

# Initialize the trading graph (uses DEFAULT_CONFIG by default)
trading_graph = TradingGraph()

# Build the initial state with your OHLC data
initial_state = {
    "kline_data": your_dataframe_dict,  # dict with Datetime, Open, High, Low, Close lists
    "analysis_results": None,
    "messages": [],
    "time_frame": "4hour",
    "stock_name": "BTC"
}

# Run the full multi-agent pipeline
final_state = trading_graph.graph.invoke(initial_state)

# Access individual agent reports
print(final_state.get("final_trade_decision"))
print(final_state.get("indicator_report"))
print(final_state.get("pattern_report"))
print(final_state.get("trend_report"))
For live market data, the web interface is the easiest path — it fetches data from Yahoo Finance automatically and uses the most recent 45 candlesticks to keep LLM context concise and analysis accurate.

Next steps

  • Read the Installation guide for detailed TA-Lib troubleshooting and provider-specific setup.
  • Learn how to configure models and temperatures in default_config.py.
  • See the arXiv paper for the research methodology behind the agent design.