AI-powered stock trading backtesting system that integrates Large Language Models for intelligent trading decision analysis.

flowchart TD
%% User Interface Layer
A[Frontend - Next.js] --> B[API Gateway - FastAPI Backend]
%% Main Function Modules
B --> C[LLM Streaming Backtest Engine]
B --> D[Backtest Analysis API]
B --> E[Daily Feedback API]
%% Data Layer
F[Stock Data Service<br/>YFinance] --> C
G[SQLite Database<br/>Backtest Logs] --> D
G --> E
%% LLM Strategy Engine
C --> H[LLM Smart Strategy]
H --> I[Azure OpenAI<br/>GPT-4]
H --> J[Technical Analysis Engine]
H --> K[Risk Management Module]
%% Backtest Execution Flow
C --> L[Trading Signal Generation]
L --> M[Performance Calculation]
M --> N[Result Recording]
N --> G
%% Style Definitions
classDef frontend fill:#e1f5fe
classDef backend fill:#f3e5f5
classDef llm fill:#fff3e0
classDef data fill:#e8f5e8
class A frontend
class B,C,D,E backend
class H,I,J,K llm
class F,G data
- macOS/Linux: Native support for
makecommands - Windows: May require additional setup (WSL, Git Bash, or make utility installation)
make installCopy and configure your .env file:
cp .env.example .envSwitch LLM Provider: Edit .env and comment/uncomment the API keys:
# Use Azure OpenAI (default)
AZURE_OPENAI_API_KEY=your_key
# GOOGLE_API_KEY=your_key # comment out
# Use Google Gemini instead
# AZURE_OPENAI_API_KEY=your_key # comment out
GOOGLE_API_KEY=your_keymake run🎉 Success! After setup, open your browser and navigate to: http://localhost:3000 to access the web application
make stop # Stop all services
make test # Run tests
make clean # Clean cache files
make format # Format codeIf you encounter issues with make commands on Windows, consider:
- WSL (Windows Subsystem for Linux): Recommended approach
- Git Bash: Included with Git for Windows
- Make for Windows: Install GNU Make utility
