Stock Analyst

Overview

I got tired of checking my portfolio manually and flipping between Yahoo Finance and a spreadsheet. So I built this: you drop in your tickers, shares, and average cost, and it tells you what to buy, hold, or trim. It pulls live data, runs technicals like RSI and MACD, grabs analyst ratings, and can even email you a full report every morning. The public version is read-only—you enter your own data and nothing gets saved. Try it below.

Tech Stack

Python Streamlit yfinance Finnhub API Pandas NumPy TA-Lib Google News RSS SMTP / Gmail GitHub Actions Streamlit Cloud Plotly

Live Application

Enter your stocks below to try it. Your data stays in your session—no personal portfolios are exposed.

Features

Smart Signals

Per-ticker BUY/SELL/HOLD/TRIM signals based on P&L thresholds, PE ratios, RSI levels, 52-week positioning, and ticker-specific strategies for different asset classes.

Technical Indicators

Real-time RSI, MACD, Bollinger Bands, EMA 20/50 crossovers, ATR-based stop-loss and target levels, and volume analysis vs 20-day average.

Analyst Ratings

Aggregated Buy/Hold/Sell counts from Wall Street analysts, consensus price targets (low/mean/high), and 30-day insider buy/sell transaction tracking via Finnhub.

Risk Dashboard

Portfolio-level weighted beta, sector exposure breakdown, per-position 1-day risk, and 95% Value at Risk (VaR) calculation using historical volatility.

Timeline Analysis

Short-term (0-30d), medium-term (1-6mo), and long-term (6-24mo) outlook with support/resistance levels, earnings catalysts, and invalidation triggers.

Email Reports

Full HTML report delivered to the user's inbox with the same dark-themed professional layout, including all charts, signals, technicals, and risk data.

Crypto Tab

Fear & Greed Index, live BTC/ETH/SOL/BNB/XRP prices, and technical indicators for major cryptocurrencies.

How It Works

The system pulls data from multiple sources with automatic fallbacks:

  • Yahoo Finance (yfinance): Live prices, historical OHLCV data, company fundamentals (PE, market cap, 52-week range), and earnings dates.
  • Finnhub API: Analyst consensus recommendations, price targets, insider transactions, earnings calendar, and general market news with rate limiting.
  • Google News RSS: Deduplicated headlines per ticker and macro-level news scanning with keyword-based risk flagging for portfolio-relevant events.
  • TA Library: RSI (14-period), MACD (12/26/9), Bollinger Bands (20, 2-std), EMA 20/50 crossovers, and ATR (14-period) computed from 6-month daily history.

All data is cached for 30 minutes, API calls include timeout handling and graceful degradation, and Finnhub requests are rate-limited at 0.3s intervals to respect free-tier limits.

Architecture

  • main.py -- Core analysis engine: 1,200+ lines handling data fetching, caching, indicator computation, signal generation, trade strategy detection, risk math, and HTML email builder.
  • app.py -- Streamlit frontend: Public-facing input form, portfolio analysis, interactive dashboard with 4 tabs (Portfolio, Trade Ideas, Technicals, Risk & News), and email delivery.
  • GitHub Actions -- Automated CI/CD: Daily scheduled runs (Mon-Fri 7:30 AM EST) that execute the full analysis pipeline and send email reports without requiring the host machine.
  • Streamlit Cloud -- Zero-config deployment: Connected to the GitHub repo for automatic deploys on every push, with secrets managed through the platform.