Skip to main content

AI-powered stock analysis package combining data, technical indicators, and multi-provider AI analysis

Project description

Screenshot 2025-06-25 at 7 43 49 PM

InvestorMate 🤖📈

PyPI version Python 3.9+ License: MIT

AI-Powered Stock Analysis in Python

InvestorMate is the only Python package you need for comprehensive stock analysis - from data fetching to AI-powered insights.

"Ask any question about any stock and get instant AI-powered insights"

✨ Features

  • AI-Powered Analysis - Ask natural language questions about any stock using OpenAI, Claude, or Gemini
  • Comprehensive Stock Data - Real-time prices, financials, news, and SEC filings via yfinance
  • 60+ Technical Indicators - SMA, EMA, RSI, MACD, Bollinger Bands, and more via pandas-ta
  • Financial Ratios - Auto-calculated P/E, ROE, debt ratios, and profitability metrics
  • Stock Screening - Find value stocks, growth stocks, or create custom screens
  • Portfolio Analysis - Track performance, risk metrics, and allocation
  • Market Summaries - Real-time data for US, Asian, European, crypto, and commodity markets

🚀 Quick Start

pip install investormate
from investormate import Investor, Stock

# AI-powered analysis
investor = Investor(openai_api_key="sk-...")
result = investor.ask("AAPL", "Is Apple undervalued compared to its peers?")
print(result)

# Stock data and analysis
stock = Stock("AAPL")
print(f"Price: ${stock.price}")
print(f"P/E Ratio: {stock.ratios.pe}")
print(f"RSI: {stock.indicators.rsi()}")

📦 Installation

# Basic installation
pip install investormate

# With development dependencies
pip install investormate[dev]

🔑 API Keys

InvestorMate supports multiple AI providers:

You only need one API key to use the AI features.

📚 Documentation

🎯 Why InvestorMate?

Feature InvestorMate Other Solutions
Simplicity One package, simple API Need 5+ packages
AI-Powered Built-in AI analysis Manual analysis only
Provider Choice OpenAI, Claude, Gemini Locked to one provider
Setup Time 2 lines of code Hours of configuration
Data Format JSON-ready Raw pandas DataFrames
Target Users Everyone Enterprise only

💡 Examples

Stock Analysis

from investormate import Stock

stock = Stock("TSLA")

# Basic info
print(stock.price)
print(stock.market_cap)
print(stock.sector)

# Financial statements
income_stmt = stock.income_statement
balance_sheet = stock.balance_sheet
cash_flow = stock.cash_flow

# Historical data
df = stock.history(period="1y", interval="1d")

AI-Powered Insights

from investormate import Investor

investor = Investor(openai_api_key="sk-...")

# Ask questions
result = investor.ask("NVDA", "What are the key revenue drivers?")

# Compare stocks
comparison = investor.compare(
    ["AAPL", "GOOGL", "MSFT"],
    "Which has the best growth prospects?"
)

# Analyze documents
result = investor.analyze_document(
    ticker="TSLA",
    url="https://example.com/earnings-report.pdf",
    question="Summarize Q4 earnings highlights"
)

Technical Analysis

from investormate import Stock

stock = Stock("AAPL")
df = stock.history(period="6mo")

# Add indicators
df = stock.add_indicators(df, [
    "sma_20", "sma_50", "rsi_14", "macd", "bbands"
])

# Or use individual methods
sma_20 = stock.indicators.sma(20)
rsi = stock.indicators.rsi(14)
macd = stock.indicators.macd()

Stock Screening

from investormate import Screener

screener = Screener()

# Pre-built screens
value_stocks = screener.value_stocks(pe_max=15, pb_max=1.5)
growth_stocks = screener.growth_stocks(revenue_growth_min=20)
dividend_stocks = screener.dividend_stocks(yield_min=3.0)

# Custom screening
results = screener.filter(
    market_cap_min=1_000_000_000,
    pe_ratio=(10, 25),
    roe_min=15,
    sector="Technology"
)

Portfolio Analysis

from investormate import Portfolio

portfolio = Portfolio({
    "AAPL": 10,
    "GOOGL": 5,
    "MSFT": 15,
    "TSLA": 8
})

print(f"Total Value: ${portfolio.value:,.2f}")
print(f"Sharpe Ratio: {portfolio.sharpe_ratio:.2f}")
print(f"Allocation: {portfolio.allocation}")

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

⚠️ Disclaimer

InvestorMate is for educational and research purposes only. It is not financial advice. AI-generated insights may contain errors or hallucinations. Always verify information and consult with a qualified financial advisor before making investment decisions.

🌟 Support

If you find InvestorMate useful, please give it a star on GitHub!


Made with ❤️ by the InvestorMate community

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

investormate-0.1.1.tar.gz (43.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

investormate-0.1.1-py3-none-any.whl (41.4 kB view details)

Uploaded Python 3

File details

Details for the file investormate-0.1.1.tar.gz.

File metadata

  • Download URL: investormate-0.1.1.tar.gz
  • Upload date:
  • Size: 43.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.12

File hashes

Hashes for investormate-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b6df61d6c9e44a85e372433d09248eaf0dc4458a06260a2a6ff2644bb4b88c2e
MD5 1bc1735ce66ea4c396f1f5af4fe0d2e9
BLAKE2b-256 4dbdd47ec2bec9c6572cd722a018f00cdbee5405b77561dc1183062741933515

See more details on using hashes here.

File details

Details for the file investormate-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: investormate-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 41.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.12

File hashes

Hashes for investormate-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 38640e6e6e9a4d8972ffc9dcedd7a76df9803c98265f08131ae3ea14bd6d63bd
MD5 b55fbbbf0eb2fefc49a7d9e2a709b3c6
BLAKE2b-256 f0bb64008fa822ef3d29d5e335f607bececde4373642230379228249097908d8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page