Skip to content

pedrof123-ui/quant_ai

Repository files navigation

Agentic AI Quant Framework

Multi-agent financial quantitative analysis system built in Python.

Architecture

  • Planner Agent — orchestrates all sub-agents via LangGraph DAG
  • Data Agent — yfinance ingestion → DuckDB
  • Technical Analysis Agent — pandas-ta / TA-Lib indicators
  • Fundamental Agent — valuation ratios & screening
  • Quant Strategy Agent — alpha generation & factor models
  • Code Generation Agent — writes & sandboxes strategy code in Docker
  • Backtesting Agent — vectorbt / backtrader performance analysis
  • Risk Agent — VaR, CVaR, stress testing
  • Sentiment Agent — FinBERT NLP on news
  • Evaluator Agent — scores all outputs, triggers retry loops

Quick Start

# 1. Copy project to WSL home
cp -r quant-framework ~/quant-framework && cd ~/quant-framework

# 2. Create virtualenv
python3 -m venv .venv && source .venv/bin/activate

# 3. Install dependencies
pip install -r requirements.txt

# 4. Copy and configure environment
cp config/.env.example config/.env
# Edit config/.env — add your OpenRouter API key

# 5. Build Docker sandbox
docker build -f docker/Dockerfile.sandbox -t quant-sandbox ./docker

# 6. Initialize the database
python scripts/init_db.py

# 7. Run the framework
python main.py --goal "Analyze AAPL momentum and backtest a crossover strategy"

LLM Models (OpenRouter)

Configured in config/settings.py. Defaults to cost-efficient models during testing. See config/.env.example for model options.

Docker Sandbox

All AI-generated strategy code executes inside quant-sandbox container. The container has no network access and a strict resource cap.

About

quant_ai

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors