You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# AgentQuant: Autonomous Quantitative Research Agent
2
2
3
-
**A modular Python framework for quantitative strategy research and backtesting.**
3
+
**A fully autonomous AI agent that researches, generates, and validates trading strategies.**
4
4
5
-
> **⚠️ Note:**This project is currently a **structural prototype**. The "AI Agent" logic is currently simulated using stochastic (random) generation to demonstrate the workflow. The actual LLM integration (LangChain/Gemini) requires uncommenting and API setup.
5
+
> **🚀 Update (Nov 2025):**Now powered by **Google Gemini 2.5 Flash**. The agent is fully functional and no longer uses random simulation. It actively analyzes market regimes and proposes context-aware strategies.
6
6
7
7
## 🎯 What This Project Is
8
8
9
-
AgentQuant is a structured codebase designed to automate the lifecycle of a trading strategy. It handles:
10
-
11
-
1.**Data Ingestion:** Fetching market data (OHLCV).
3.**Regime Detection:** Classifying market states (e.g., "Bear", "Bull") using heuristic rules.
14
-
4.**Backtesting:** Running strategies against historical data.
15
-
16
-
It is designed as a **foundation** for developers who want to build an AI-driven trading bot but need the messy boilerplate (data handling, pipeline architecture) handled first.
17
-
18
-
## ⚙️ How It Works (The Honest View)
19
-
20
-
### 1. The "Brain" (`src/agent`)
21
-
***Current State:** The strategy planner currently uses **randomized parameter search** to simulate an AI proposing strategies.
22
-
***Future Goal:** To enable the actual AI, you must uncomment the LangChain imports in `langchain_planner.py` and provide a Google Gemini API key.
23
-
***Why?** This allows the application to run and demo the UI without requiring expensive API credits during development.
24
-
25
-
### 2. Market Regime (`src/features/regime.py`)
26
-
* Uses hardcoded logic based on VIX levels and Momentum to classify the market into states like:
27
-
*`Crisis-Bear` (VIX > 30, Negative Momentum)
28
-
*`MidVol-Bull` (VIX 20-30, Positive Momentum)
29
-
*`LowVol-MeanRevert` (VIX < 20, Flat Momentum)
30
-
31
-
### 3. Backtesting (`src/backtest`)
32
-
* Includes a fast, vectorized backtester (`simple_backtest.py`) capable of testing Momentum and Mean Reversion logic.
33
-
* Calculates Sharpe Ratio, Max Drawdown, and Total Return.
9
+
AgentQuant is an AI-powered research platform that automates the quantitative workflow. It replaces the manual work of a junior quant researcher:
10
+
11
+
1.**Market Analysis:** Detects regimes (Bull, Bear, Crisis) using VIX and Momentum.
12
+
2.**Strategy Generation:** Uses **Gemini 2.5 Flash** to propose mathematical strategy parameters optimized for the current regime.
13
+
3.**Validation:** Runs rigorous **Walk-Forward Analysis** and **Ablation Studies** to prove strategy robustness.
14
+
4.**Backtesting:** Executes vectorized backtests to verify performance.
0 commit comments