community_usecase/stock-analysis/README.md
简体中文 | English
<p> <p align="center"></p>
<p align="center">
<b>Intelligent Stock Analysis Agent Based on 🦉OWL Framework</b>
<p>
A stock analysis agent based on the 🦉OWL framework that provides users with comprehensive stock analysis reports, including basic stock information, technical indicators, risk metrics, and investment recommendations.
<p align="center"> <b>Stock Analysis Agent Architecture</b>
# Clone the GitHub repository
git clone https://github.com/camel-ai/owl.git
# Navigate to the project directory
cd owl
# If you haven't installed uv yet, install it first
pip install uv
# Create a virtual environment and install dependencies
# We support Python 3.10, 3.11, 3.12
uv venv .venv --python=3.10
# Activate the virtual environment
# For macOS/Linux
source .venv/bin/activate
# For Windows
.venv\Scripts\activate
# Install CAMEL and all its dependencies
uv pip install -e .
# Navigate to the Stock Analysis Agent directory
cd community_usecase/stock-analysis
# Install SEC tools
uv pip install sec-api
# Create .env file
touch .env
Add relevant API keys to the .env file (refer to the .env.example file)
# DeepSeek API (https://platform.deepseek.com/api_keys)
DEEPSEEK_API_KEY='Your_Key'
DEEPSEEK_API_BASE_URL="https://api.deepseek.com/v1"
# ZHIPU API (https://bigmodel.cn/usercenter/proj-mgmt/apikeys)
ZHIPUAI_API_KEY='Your_Key'
ZHIPUAI_API_BASE_URL="https://open.bigmodel.cn/api/paas/v4/"
# SEC-API (https://sec-api.io/profile)
SEC_API_API_KEY='Your_Key'
# AgentOps API (https://app.agentops.ai/settings/billing)
AGENTOPS_API_KEY= 'Your_Key'
[!TIP] The project uses DeepSeek as the main model for the Stock Analysis Agent and Zhipu's GLM-4-Flash as the model for the SEC Agent
python run.py --h
usage: run.py [-h] [--company COMPANY] [--use-agentops] [--rounds ROUNDS]
Stock Analysis Agent
options:
-h, --help show this help message and exit
--company COMPANY Company name to analyze
--use-agentops Enable AgentOps tracking
--rounds ROUNDS Maximum conversation rounds
python run.py --company Apple
# ./log directory
Apple_chat_history.json # Records the entire execution process, including conversation history and tool call information
# ./output directory
Apple_analysis_report.md # Output investment analysis report
If you encounter issues while running the project, you can try the following methods:
stock-analysis
├── agent
│ └── sec_agent.py # SEC Agent
├── example
├── log # log directory
├── output # Report output directory
├── prompts.py # Prompt templates
├── run.py # Main file
└── tools
└── sec_tools.py # SEC Tool
This project is built on the CAMEL-AI OWL framework, which is licensed under the Apache License 2.0
Finding the Scaling Law of Agents: The First and the Best Multi-Agent Framework.