| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Fei Xiong1,2 ★ Xiang Zhang3 ★ Aosong Feng4 Siqi Sun5 Chenyu You1
1 Stony Brook University
2 Carnegie Mellon University
3 University of British Columbia
4 Yale University
5 Fudan University
★ Equal Contribution
A sophisticated multi-agent trading analysis system that combines technical indicators, pattern recognition, and trend analysis using LangChain and LangGraph. The system provides both a web interface and programmatic access for comprehensive market analysis.
🚀 Features | ⚡ Installation | 🎬 Usage | 🔧 Implementation Details | 🤝 Contributing | 📄 License
• Computes five technical indicators—including RSI to assess momentum extremes, MACD to quantify convergence–divergence dynamics, and the Stochastic Oscillator to measure closing prices against recent trading ranges—on each incoming K‑line, converting raw OHLC data into precise, signal-ready metrics.
• Upon a pattern query, the Pattern Agent first uses the agent draws the recent price chart, spots its main highs, lows, and general up‑or‑down moves, compares that shape to a set of familiar patterns, and returns a short, plain‑language description of the best match.
• Leverages tool-generated annotated K‑line charts overlaid with fitted trend channels—upper and lower boundary lines tracing recent highs and lows—to quantify market direction, channel slope, and consolidation zones, then delivers a concise, professional summary of the prevailing trend.
• Synthesizes outputs from the Indicator, Pattern, Trend, and Risk agents—including momentum metrics, detected chart formations, channel analysis, and risk–reward assessments—to formulate actionable trade directives, clearly specifying LONG or SHORT positions, recommended entry and exit points, stop‑loss thresholds, and concise rationale grounded in each agent’s findings.
Modern Flask-based web application with:
conda create -n quantagents python=3.11
conda activate quantagentspip install -r requirements.txtIf you encounter issues with TA-lib-python, try
conda install -c conda-forge ta-libOr visit the TA-Lib Python repository for detailed installation instructions.
You can set it in our Web InterFace Later,
Or set it as an environment variable:
# For OpenAI
export OPENAI_API_KEY="your_openai_api_key_here"
# For Anthropic (Claude)
export ANTHROPIC_API_KEY="your_anthropic_api_key_here"
# For Qwen (DashScope, based in Singapore — delays may occur)
export DASHSCOPE_API_KEY="your_dashscope_api_key_here"
python web_interface.pyThe web application will be available at http://127.0.0.1:5000
Important Note: Our model requires an LLM that can take images as input, as our agents generate and analyze visual charts for pattern recognition and trend analysis.
To use QuantAgents inside your code, you can import the trading_graph module and initialize a TradingGraph() object. The .invoke() function will return a comprehensive analysis. You can run web_interface.py, here's also a quick example:
from trading_graph import TradingGraph
# Initialize the trading graph
trading_graph = TradingGraph()
# Create initial state with your data
initial_state = {
"kline_data": your_dataframe_dict,
"analysis_results": None,
"messages": [],
"time_frame": "4hour",
"stock_name": "BTC"
}
# Run the analysis
final_state = trading_graph.graph.invoke(initial_state)
# Access results
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"))You can also adjust the default configuration to set your own choice of LLMs or analysis parameters in web_interface.py.
if provider == "anthropic":
# Set default Claude models if not already set to Anthropic models
if not analyzer.config["agent_llm_model"].startswith("claude"):
analyzer.config["agent_llm_model"] = "claude-haiku-4-5-20251001"
if not analyzer.config["graph_llm_model"].startswith("claude"):
analyzer.config["graph_llm_model"] = "claude-haiku-4-5-20251001"
elif provider == "qwen":
# Set default Qwen models if not already set to Qwen models
if not analyzer.config["agent_llm_model"].startswith("qwen"):
analyzer.config["agent_llm_model"] = "qwen3-max"
if not analyzer.config["graph_llm_model"].startswith("qwen"):
analyzer.config["graph_llm_model"] = "qwen3-vl-plus"
else:
# Set default OpenAI models if not already set to OpenAI models
if analyzer.config["agent_llm_model"].startswith(("claude", "qwen")):
analyzer.config["agent_llm_model"] = "gpt-4o-mini"
if analyzer.config["graph_llm_model"].startswith(("claude", "qwen")):
analyzer.config["graph_llm_model"] = "gpt-4o"
For live data, we recommend using the web interface as it provides access to real-time market data through yfinance. The system automatically fetches the most recent 30 candlesticks for optimal LLM analysis accuracy.
The system supports the following configuration parameters:
Note: The system uses default token limits for comprehensive analysis. No artificial token restrictions are applied.
You can view the full list of configurations in default_config.py.
This project is licensed under the MIT License - see the LICENSE file for details.
@article{xiong2025quantagent,
title={QuantAgent: Price-Driven Multi-Agent LLMs for High-Frequency Trading},
author={Fei Xiong and Xiang Zhang and Aosong Feng and Siqi Sun and Chenyu You},
journal={arXiv preprint arXiv:2509.09995},
year={2025}
}
This repository was built with the help of the following libraries and frameworks:
This software is for educational and research purposes only. It is not intended to provide financial advice. Always do your own research and consider consulting with a financial advisor before making investment decisions.
TA-Lib Installation: If you encounter TA-Lib installation issues, refer to the official repository for platform-specific instructions.
LLM API Key: Ensure your API key is properly set in the environment or through the web interface.
Data Fetching: The system uses Yahoo Finance for data. Some symbols might not be available or have limited historical data.
Memory Issues: For large datasets, consider reducing the analysis window or using a smaller timeframe.
If you encounter any issues, please:
For questions, feedback, or collaboration opportunities, please contact:
| Back | FazBrowse Home | New Git URL |