This project is currently a work in progress. To track progress, please get updates here.
The AI Hedge Fund app is a complete system with both frontend and backend components that enables you to run an AI-powered hedge fund trading system through a web interface on your own computer.
The AI Hedge Fund consists of:
- Backend: A FastAPI application that provides a REST API to run the hedge fund trading system and backtester
- Frontend: A React/Vite application that offers a user-friendly interface to visualize and control the hedge fund operations
- 🚀 Quick Start (For Non-Technical Users)
- 🛠️ Manual Setup (For Developers)
- Detailed Documentation
- Disclaimer
One-line setup and run command:
./run.shIf you get a "permission denied" error, run this first:
chmod +x run.sh && ./run.shOr alternatively, you can run:
bash run.shrun.batcd app && npm install && npm run setupThat's it! These scripts will:
- Check for required dependencies (Node.js, Python, Poetry)
- Install all dependencies automatically
- Start both frontend and backend services
- Automatically open your web browser to the application
Requirements:
After running, you can access:
- Frontend (Web Interface): http://localhost:5173
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
If you prefer to set up each component manually or need more control:
- Node.js and npm for the frontend
- Python 3.8+ and Poetry for the backend
- Clone the repository:
git clone https://github.com/virattt/ai-hedge-fund.git
cd ai-hedge-fund- Set up your environment variables:
# Create .env file for your API keys (in the root directory)
cp .env.example .env- Edit the .env file to add your API keys:
# For running LLMs hosted by openai (gpt-4o, gpt-4o-mini, etc.)
OPENAI_API_KEY=your-openai-api-key
# For running LLMs hosted by groq (deepseek, llama3, etc.)
GROQ_API_KEY=your-groq-api-key
# For getting financial data to power the hedge fund
FINANCIAL_DATASETS_API_KEY=your-financial-datasets-api-key- Install Poetry (if not already installed):
curl -sSL https://install.python-poetry.org | python3 -- Install root project dependencies:
# From the root directory
poetry install- Install backend app dependencies:
# Navigate to the backend directory
cd app/backend
pip install -r requirements.txt # If there's a requirements.txt file
# OR
poetry install # If there's a pyproject.toml in the backend directory- Install frontend app dependencies:
cd app/frontend
npm install # or pnpm install or yarn install- Start the backend server:
# In one terminal, from the backend directory
cd app/backend
poetry run uvicorn main:app --reload- Start the frontend application:
# In another terminal, from the frontend directory
cd app/frontend
npm run devYou can now access:
- Frontend application: http://localhost:5173
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
For more detailed information:
This project is for educational and research purposes only.
- Not intended for real trading or investment
- No warranties or guarantees provided
- Creator assumes no liability for financial losses
- Consult a financial advisor for investment decisions
By using this software, you agree to use it solely for learning purposes.