Skip to content

47thtechcorner/RayCodes_StocksDebate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Stock Debater Crew 📈🤖

A multi-agent AI system built with CrewAI and Ollama that performs live stock analysis and debates. The system fetches real-time data using yfinance and coordinates three specialized agents to reach a final investment verdict.

🚀 Tech Stack

  • Core Framework: CrewAI
  • LLM Engine: Ollama (Local Execution)
  • Programming Language: Python 3.12 (Requires < 3.14 for dependency compatibility)
  • Data Source: yfinance (Real-time stock data and news)
  • LLM Connector: LiteLLM (For non-native model providers)

🛠️ Setup Instructions

1. Prerequisites

  • Ollama: Install and have it running locally.
  • Python 3.12: CrewAI's current dependencies (like numpy) are most stable on Python 3.10 - 3.13.

2. Installation

Clone the repository and set up a virtual environment:

# Create venv with Python 3.12
py -3.12 -m venv .venv

# Activate (Windows)
.venv\Scripts\activate

# Install dependencies
pip install crewai langchain_ollama litellm yfinance

3. Configuration

Edit config.json to set your target stock and preferred local models:

{
    "stock_ticker": "TSLA",
    "agents": {
        "bull": { "model": "qwen3.5:0.8b", ... },
        "bear": { "model": "qwen3.5:0.8b", ... },
        "moderator": { "model": "qwen3.5:0.8b", ... }
    },
    "ollama_base_url": "http://localhost:11434"
}

🏃 Execution

Run the live debate:

.venv\Scripts\python.exe debate_crew.py

🤖 The Debate Crew

  • Bull Analyst: Identifies growth drivers, innovation, and positive market sentiment.
  • Bear Analyst: Highlights valuation risks, competition, and macroeconomic headwinds.
  • Chief Investment Officer: Moderates the arguments and provides a final "Buy", "Sell", or "Hold" verdict.

🔮 Future Features & Ideas

  • Sentiment Analysis Tool: Integrate Reddit/Twitter sentiment analysis for meme-stock volatility tracking.
  • Technical Analysis Agent: Add a fourth agent specializing in chart patterns (RSI, MACD, etc.).
  • Multi-Stock Comparison: Enable the crew to debate which of two stocks is a better investment.
  • Portfolio Integration: Connect to personal portfolio APIs to give personalized advice.
  • Messenger Integration: Create a Telegram or Discord bot to trigger debates via chat commands.
  • PDF Reports: Auto-generate a beautiful PDF report of the debate summary.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages