app/README.md
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:
One-line setup and run command:
./run.sh
If you get a "permission denied" error, run this first:
chmod +x run.sh && ./run.sh
Or alternatively, you can run:
bash run.sh
run.bat
cd app && npm install && npm run setup
That's it! These scripts will:
Requirements:
After running, you can access:
If you prefer to set up each component manually or need more control:
git clone https://github.com/virattt/ai-hedge-fund.git
cd ai-hedge-fund
# Create .env file for your API keys (in the root directory)
cp .env.example .env
# 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
curl -sSL https://install.python-poetry.org | python3 -
# From the root directory
poetry install
# 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
cd app/frontend
npm install # or pnpm install or yarn install
# In one terminal, from the backend directory
cd app/backend
poetry run uvicorn main:app --reload
# In another terminal, from the frontend directory
cd app/frontend
npm run dev
You can now access:
For more detailed information:
This project is for educational and research purposes only.
By using this software, you agree to use it solely for learning purposes.
If you see this error when running the setup script:
[ERROR] Backend failed to start. Check the logs:
Command not found: uvicorn
Solution:
Clean Poetry environment:
cd app/backend
poetry env remove --all
poetry install
Or force reinstall:
cd app/backend
poetry install --sync
Verify installation:
cd app/backend
poetry run python -c "import uvicorn; import fastapi"
python --versioncp .env.example .envIf you get "permission denied":
chmod +x run.sh
./run.sh
If ports 8000 or 5173 are in use:
pkill -f "uvicorn\|vite"