Project Name: Kurisu (Tentative) Goal: Build a modular, extensible, and modern AI-powered quantitative trading agent with a comprehensive UI. Core Objectives:
- Trading Execution: Automate trading strategies based on quantitative analysis and AI insights.
- AI Agent Research: Implement advanced agent architectures (planning, memory, tool use) for financial markets.
- Education Platform: Serve as a learning tool for quantitative finance, strategy mathematics, and modern software architecture.
- The Quant Trader: Wants to automate strategies, backtest ideas, and monitor live performance.
- The AI Researcher: Wants to experiment with different LLM prompts, agent architectures (e.g., ReAct, Plan-and-Solve), and RAG implementations.
- The Learner: Wants to understand the "why" behind a trade, visualize the mathematical models (e.g., Kelly Criterion, Sharpe Ratio), and learn code implementation.
- Multi-Source Data Ingestion: Support for crypto (Binance/CCXT), stocks (Yahoo Finance/Alpha Vantage), and alternative data (News/Social Media).
- Data Normalization: Unified data structure for OHLCV (Open, High, Low, Close, Volume) and tick data.
- Storage: Efficient storage for time-series data (historical and real-time).
- Strategy Interface: Standardized base class for implementing strategies (e.g., Moving Average Crossover, Mean Reversion, Grid Trading).
- Indicator Library: Integration with
pandas-taortalibfor technical indicators. - Backtesting Core:
- Event-driven backtesting engine.
- Support for transaction costs, slippage simulation, and margin logic.
- Performance metrics: ROI, Max Drawdown, Sharpe Ratio, Sortino Ratio, Win Rate.
- LLM Integration: Support for multiple models (OpenAI, Anthropic, Local LLMs via Ollama).
- Market Sentiment Analysis: Analyze news headlines and social sentiment to adjust strategy parameters.
- Strategy Generation: Agent can propose new code snippets for strategies based on natural language descriptions.
- Explainability: Agent must explain why a specific trade was taken or recommended, citing mathematical principles or market conditions.
- Memory System:
- Short-term: Context window for current market session.
- Long-term (Vector DB): Historical patterns, past successful trades, and learned rules.
- Interactive Tutorials: Walkthroughs of how specific strategies work.
- Math Visualization: UI components to visualize formulas (e.g., visualizing the Efficient Frontier).
- Code Breakdown: "Click-to-explain" functionality for strategy code.
- Paper Trading: Simulated execution environment for validation.
- Live Trading: API integration with exchanges for real order placement.
- Risk Management: Hard stops, position sizing limits, and kill-switch functionality.
- Dashboard: Real-time chart visualization (TradingView widget), account balance, open positions.
- Agent Chat: Chat interface to converse with the AI (e.g., "Analyze the trend of BTC for the last 4 hours").
- Backtest Lab: Form to configure and run backtests, with detailed report visualization.
- Strategy Editor: Code editor (Monaco Editor) for writing/modifying strategies in the browser.
- Modularity: Loose coupling between Data, Strategy, and Execution layers to allow swapping components.
- Latency: Low-latency processing for real-time data ingestion and signal generation.
- Scalability: Ability to monitor multiple assets and run multiple strategies concurrently.
- Security: Secure handling of API keys (local encryption or environment variables, never stored in DB).
- Observability: Comprehensive logging of all Agent decisions and system errors.
- Phase 1 (Foundation): Data ingestion, basic backtesting engine, simple UI.
- Phase 2 (AI Integration): LLM connection, sentiment analysis, basic chat interface.
- Phase 3 (Live Execution): Exchange integration, paper trading, risk management.
- Phase 4 (Advanced Agent): Autonomous strategy optimization, long-term memory.