Skip to content

namsengi11/FearGreedAI

Repository files navigation

InvestorsMind

AI-powered Fear & Greed Index Analysis System for Stock Investment

📊 Project Overview

InvestorsMind is an AI system that calculates and analyzes the Fear & Greed Index for stocks. It combines quantitative analysis with investment sentiment analysis to provide comprehensive market psychology indicators.

🚀 Key Features

1. Fear & Greed Index Calculation

  • Quantitative Analysis: Market momentum, stock price strength, bond-stock returns, option ratios, CNN Fear & Greed Index
  • Investment Sentiment Analysis: Sentiment analysis through news articles and Reddit posts
  • Composite Score: Weighted average of quantitative and sentiment analysis

2. AI Agent

  • Korean language interface
  • Real-time index calculation
  • Detailed analysis explanations
  • Weight adjustment functionality

3. Evaluation Reports

  • Detailed analysis reports in JSON format
  • Historical data tracking
  • Data storage for AI analysis

🛠️ Installation & Setup

1. Environment Setup

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # macOS/Linux
# .venv\Scripts\activate  # Windows

# Install dependencies
pip install -r requirements.txt

2. Environment Variables

Create a .env file and add:

CLOVA_API_KEY=your_clova_api_key
GOOGLE_SEARCH_KEY=your_google_search_key
GOOGLE_SEARCH_ENGINE=your_search_engine_id

3. Execution

# Run AI agent
python ai_agent.py

# Run individual analysis
python numerical_data_analysis.py
python text_sentiment_analysis.py

📈 Usage

AI Agent Commands

calculate AAPL          # Calculate Fear & Greed Index for AAPL
analyze AAPL What does the momentum score mean?  # Analyze specific questions
current_weights         # Check current weights
alter_weights Please increase CNN weight  # Adjust weights
quit                    # Exit

Example Output

📈 AAPL Fear & Greed Index: 75/100
📊 Quantitative Analysis Score: 72/100
📰 Investment Sentiment Score: 78/100
🎯 Interpretation: Extreme Greed - Market may be overvalued

📁 Project Structure

InvestorsMind/
├── ai_agent.py                 # AI Agent (main interface)
├── numerical_data_analysis.py  # Quantitative analysis module
├── text_sentiment_analysis.py  # Investment sentiment analysis module
├── evaluations/                # Analysis report repository
├── assets/                     # Collected data repository
└── README.md                   # Project documentation

🔧 Tech Stack

  • Python 3.12
  • yfinance: Stock data collection
  • Selenium: Web scraping
  • CLOVA Studio: LLM analysis
  • Pandas/NumPy: Data processing
  • BeautifulSoup: HTML parsing

📊 Analysis Components

Quantitative Analysis (50%)

  • Market Momentum (20%): Price momentum relative to moving averages
  • Stock Price Strength (20%): Position relative to 52-week high/low
  • Bond-Stock Returns (20%): Corporate bond vs stock return comparison
  • Option Ratio (20%): Put/Call volume ratio
  • CNN Fear & Greed (20%): CNN market psychology index

Investment Sentiment Analysis (50%)

  • News Articles: Analysis of related news from the past 5 days
  • Reddit Posts: Investor community sentiment analysis
  • LLM Analysis: AI-powered sentiment score calculation

🤖 AI Analysis Features

  • Real-time Calculation: Instant Fear & Greed Index calculation
  • Detailed Explanations: Analysis of meaning and impact of each component
  • Weight Adjustment: Analysis weight adjustment based on user feedback
  • Historical Data: Reference and comparison with previous analysis results

📝 License

MIT License

🤝 Contributing

Issue reports and pull requests are welcome.


InvestorsMind - AI-powered market psychology analysis for better investment decisions

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages