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.

Requirements

Before you begin, make sure you have conda installed. The following Python packages are installed via requirements.txt:
PackagePurpose
flaskWeb interface server
yfinanceReal-time market data from Yahoo Finance
pandas, numpyData processing
matplotlib, mplfinanceChart rendering
scipySignal processing utilities
TA-LibTechnical indicator computation
langchain, langchain-coreLLM abstraction layer
langchain-openaiOpenAI provider integration
langchain-anthropicAnthropic provider integration
langchain-qwqQwen provider integration
langgraphMulti-agent graph orchestration
openai, anthropicProvider SDK clients
PillowImage processing for chart analysis
requests, ipythonHTTP utilities and notebook support

Installation steps

1

Create and activate a conda environment

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

Install Python dependencies

pip install -r requirements.txt
3

Handle TA-Lib installation issues (if needed)

TA-Lib requires a C library that pip sometimes cannot build automatically. If the pip install fails, use the conda-forge package instead:
conda install -c conda-forge ta-lib
If you still encounter issues, visit the TA-Lib Python repository for platform-specific installation instructions covering Windows, macOS, and Linux.
4

Set your LLM API key

Configure the API key for your chosen provider. See the API key setup section below for all three providers.

API key setup

QuantAgent supports OpenAI, Anthropic, and Qwen. Set the environment variable for your chosen provider, or enter it later through the web interface settings panel.
Get your API key from platform.openai.com/api-keys.
export OPENAI_API_KEY="your_openai_api_key_here"
Default models when using OpenAI:
  • Agent LLM: gpt-4o-mini
  • Graph LLM: gpt-4o
You can override these in default_config.py:
DEFAULT_CONFIG = {
    "agent_llm_model": "gpt-4o-mini",
    "graph_llm_model": "gpt-4o",
    "agent_llm_provider": "openai",
    "graph_llm_provider": "openai",
    "agent_llm_temperature": 0.1,
    "graph_llm_temperature": 0.1,
    "api_key": "sk-",
}
All three providers require a vision-capable model. The Pattern and Trend agents generate K-line charts and pass them directly to the LLM for interpretation. Text-only models will cause analysis failures.

Verify your installation

Start the web interface to confirm everything is working:
python web_interface.py
Open http://127.0.0.1:5000 in your browser. If the page loads and the settings panel shows your API key as set, your installation is complete.

Troubleshooting

TA-Lib build failure on pip install Use conda install -c conda-forge ta-lib as described above, or follow the platform-specific instructions in the official repository. API key not recognized Verify the environment variable is exported in the same shell session where you run python web_interface.py. Alternatively, enter the key directly in the web interface settings panel and click Save. Data not available for a symbol QuantAgent uses Yahoo Finance via yfinance. Some symbols may have limited historical data or may not be available. Try a different date range or a standard symbol such as BTC, SPX, or AAPL. Rate limit or billing errors Check that your API account has sufficient credits and that you are not exceeding the provider’s rate limits. Wait a moment and retry the analysis.

Build docs developers (and LLMs) love