이 프로젝트는 AI 기반 헤지 펀드의 개념 증명(proof of concept)입니다. 이 프로젝트의 목표는 AI를 활용한 트레이딩 의사 결정을 탐구하는 것입니다. 이 프로젝트는 교육용으로만 제작되었으며, 실제 트레이딩이나 투자를 목적으로 하지 않습니다.
이 시스템은 여러 에이전트들이 협력하여 작동합니다:
참고: 이 시스템은 트레이딩 결정을 시뮬레이션할 뿐, 실제로 거래하지 않습니다.
이 프로젝트는 교육 및 연구 목적으로만 제공됩니다.
이 소프트웨어를 사용함으로써, 귀하는 학습 목적으로만 사용하는 데 동의하는 것입니다.
저장소 복제:
git clone https://github.com/virattt/ai-hedge-fund.git
cd ai-hedge-fund
curl -sSL https://install.python-poetry.org | python3 -
poetry install
# Create .env file for your API keys
cp .env.example .env
# For running LLMs hosted by openai (gpt-4o, gpt-4o-mini, etc.)
# Get your OpenAI API key from https://platform.openai.com/
OPENAI_API_KEY=your-openai-api-key
# For running LLMs hosted by groq (deepseek, llama3, etc.)
# Get your Groq API key from https://groq.com/
GROQ_API_KEY=your-groq-api-key
# For getting financial data to power the hedge fund
# Get your Financial Datasets API key from https://financialdatasets.ai/
FINANCIAL_DATASETS_API_KEY=your-financial-datasets-api-key
시스템에 Docker가 설치되어 있는지 확인하세요. 설치되지 않은 경우 Docker 공식 웹사이트에서 다운로드할 수 있습니다.
저장소 복제:
git clone https://github.com/virattt/ai-hedge-fund.git
cd ai-hedge-fund
# Create .env file for your API keys
cp .env.example .env
위에서 설명한 대로 API 키를 추가하기 위해 .env 파일을 편집하세요.
docker 디렉토리로 이동:
cd docker
# On Linux/Mac:
./run.sh build
# On Windows:
run.bat build
중요: 헤지 펀드가 작동하려면 OPENAI_API_KEY
, GROQ_API_KEY
, ANTHROPIC_API_KEY
또는 DEEPSEEK_API_KEY
를 설정해야 합니다. 모든 제공업체의 LLM을 사용하려면 모든 API 키를 설정해야 합니다.
AAPL, GOOGL, MSFT, NVDA 및 TSLA의 금융 데이터는 무료이며 API 키가 필요하지 않습니다.
다른 티커의 경우 .env 파일에 FINANCIAL_DATASETS_API_KEY
를 설정해야 합니다.
poetry run python src/main.py --ticker AAPL,MSFT,NVDA
참고: 모든 Docker 명령은 docker/
디렉토리에서 실행해야 합니다.
# Navigate to the docker directory first
cd docker
# On Linux/Mac:
./run.sh --ticker AAPL,MSFT,NVDA main
# On Windows:
run.bat --ticker AAPL,MSFT,NVDA main
예제 출력:
로컬 LLM을 사용하여 AI 헤지 펀드를 실행하려면 --ollama
플래그를 지정할 수도 있습니다.
# With Poetry:
poetry run python src/main.py --ticker AAPL,MSFT,NVDA --ollama
# With Docker (from docker/ directory):
# On Linux/Mac:
./run.sh --ticker AAPL,MSFT,NVDA --ollama main
# On Windows:
run.bat --ticker AAPL,MSFT,NVDA --ollama main
각 에이전트의 추론 과정을 콘솔에 출력하려면 --show-reasoning
플래그를 지정할 수도 있습니다.
# With Poetry:
poetry run python src/main.py --ticker AAPL,MSFT,NVDA --show-reasoning
# With Docker (from docker/ directory):
# On Linux/Mac:
./run.sh --ticker AAPL,MSFT,NVDA --show-reasoning main
# On Windows:
run.bat --ticker AAPL,MSFT,NVDA --show-reasoning main
특정 기간에 대한 결정을 내리기 위해 시작 날짜와 종료 날짜를 선택적으로 지정할 수 있습니다.
# With Poetry:
poetry run python src/main.py --ticker AAPL,MSFT,NVDA --start-date 2024-01-01 --end-date 2024-03-01
# With Docker (from docker/ directory):
# On Linux/Mac:
./run.sh --ticker AAPL,MSFT,NVDA --start-date 2024-01-01 --end-date 2024-03-01 main
# On Windows:
run.bat --ticker AAPL,MSFT,NVDA --start-date 2024-01-01 --end-date 2024-03-01 main
poetry run python src/backtester.py --ticker AAPL,MSFT,NVDA
참고: 모든 Docker 명령은 docker/
디렉토리에서 실행해야 합니다.
# Navigate to the docker directory first
cd docker
# On Linux/Mac:
./run.sh --ticker AAPL,MSFT,NVDA backtest
# On Windows:
run.bat --ticker AAPL,MSFT,NVDA backtest
예제 출력:
특정 기간 동안 백테스트를 실행하기 위해 시작 날짜와 종료 날짜를 선택적으로 지정할 수 있습니다.
# With Poetry:
poetry run python src/backtester.py --ticker AAPL,MSFT,NVDA --start-date 2024-01-01 --end-date 2024-03-01
# With Docker (from docker/ directory):
# On Linux/Mac:
./run.sh --ticker AAPL,MSFT,NVDA --start-date 2024-01-01 --end-date 2024-03-01 backtest
# On Windows:
run.bat --ticker AAPL,MSFT,NVDA --start-date 2024-01-01 --end-date 2024-03-01 backtest
로컬 LLM을 사용하여 백테스터를 실행하려면 --ollama
플래그를 지정할 수도 있습니다.
# With Poetry:
poetry run python src/backtester.py --ticker AAPL,MSFT,NVDA --ollama
# With Docker (from docker/ directory):
# On Linux/Mac:
./run.sh --ticker AAPL,MSFT,NVDA --ollama backtest
# On Windows:
run.bat --ticker AAPL,MSFT,NVDA --ollama backtest
중요: 풀 리퀘스트는 작고 집중적으로 유지해 주세요. 이렇게 하면 검토와 병합이 쉬워집니다.
기능 요청이 있는 경우 이슈를 열고 enhancement
태그를 달아주세요.
이 프로젝트는 MIT 라이선스 하에 제공됩니다. 자세한 내용은 LICENSE 파일을 참조하세요.