Skip to content
This repository was archived by the owner on Feb 3, 2026. It is now read-only.

moinsen-dev/stock-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ˆ Stock Analysis v6.1

AI-powered stock & crypto analysis with portfolio management, watchlists, dividend analysis, and viral trend detection.

ClawHub Downloads OpenClaw Skill

What's New in v6.1

  • πŸ”₯ Hot Scanner β€” Find viral stocks & crypto across multiple sources
  • 🐦 Twitter/X Integration β€” Social sentiment via bird CLI
  • πŸ“° Multi-Source Aggregation β€” CoinGecko, Google News, Yahoo Finance
  • ⏰ Cron Support β€” Daily trend reports

What's New in v6.0

  • πŸ†• Watchlist + Alerts β€” Price targets, stop losses, signal change notifications
  • πŸ†• Dividend Analysis β€” Yield, payout ratio, growth rate, safety score
  • πŸ†• Fast Mode β€” Skip slow analyses for quick checks
  • πŸ†• Improved Commands β€” Better OpenClaw/Telegram integration
  • πŸ†• Test Suite β€” Unit tests for core functionality

Features

Feature Description
8-Dimension Analysis Earnings, fundamentals, analysts, momentum, sentiment, sector, market, history
Crypto Support Top 20 cryptos with market cap, BTC correlation, momentum
Portfolio Management Track holdings, P&L, concentration warnings
Watchlist + Alerts Price targets, stop losses, signal changes
Dividend Analysis Yield, payout, growth, safety score
Risk Detection Geopolitical, earnings timing, overbought, risk-off
Breaking News Crisis keyword scanning (last 24h)

Quick Start

Analyze Stocks

uv run scripts/analyze_stock.py AAPL
uv run scripts/analyze_stock.py AAPL MSFT GOOGL
uv run scripts/analyze_stock.py AAPL --fast  # Skip slow analyses

Analyze Crypto

uv run scripts/analyze_stock.py BTC-USD
uv run scripts/analyze_stock.py ETH-USD SOL-USD

Dividend Analysis

uv run scripts/dividends.py JNJ PG KO

Watchlist

uv run scripts/watchlist.py add AAPL --target 200 --stop 150
uv run scripts/watchlist.py list
uv run scripts/watchlist.py check --notify

Portfolio

uv run scripts/portfolio.py create "My Portfolio"
uv run scripts/portfolio.py add AAPL --quantity 100 --cost 150
uv run scripts/portfolio.py show

πŸ”₯ Hot Scanner (NEW)

# Full scan with all sources
python3 scripts/hot_scanner.py

# Fast scan (skip social media)
python3 scripts/hot_scanner.py --no-social

# JSON output for automation
python3 scripts/hot_scanner.py --json

Analysis Dimensions

Stocks (8 dimensions)

  1. Earnings Surprise (30%) β€” EPS beat/miss
  2. Fundamentals (20%) β€” P/E, margins, growth, debt
  3. Analyst Sentiment (20%) β€” Ratings, price targets
  4. Historical Patterns (10%) β€” Past earnings reactions
  5. Market Context (10%) β€” VIX, SPY/QQQ trends
  6. Sector Performance (15%) β€” Relative strength
  7. Momentum (15%) β€” RSI, 52-week range
  8. Sentiment (10%) β€” Fear/Greed, shorts, insiders

Crypto (3 dimensions)

  • Market Cap & Category
  • BTC Correlation (30-day)
  • Momentum (RSI, range)

Dividend Metrics

Metric Description
Yield Annual dividend / price
Payout Ratio Dividend / EPS
5Y Growth CAGR of dividend
Consecutive Years Years of increases
Safety Score 0-100 composite
Income Rating Excellent β†’ Poor

πŸ”₯ Hot Scanner

Find what's trending RIGHT NOW across stocks & crypto.

Data Sources

Source What it finds
CoinGecko Trending Top 15 trending coins
CoinGecko Movers Biggest gainers/losers (>3%)
Google News Breaking finance & crypto news
Yahoo Finance Top gainers, losers, most active
Twitter/X Social sentiment (requires auth)

Output

πŸ“Š TOP TRENDING (by buzz):
   1. BTC      (6 pts) [CoinGecko, Google News] πŸ“‰ bearish (-2.5%)
   2. ETH      (5 pts) [CoinGecko, Twitter] πŸ“‰ bearish (-7.2%)
   3. NVDA     (3 pts) [Google News, Yahoo] πŸ“° Earnings beat...

πŸͺ™ CRYPTO HIGHLIGHTS:
   πŸš€ RIVER    River              +14.0%
   πŸ“‰ BTC      Bitcoin             -2.5%

πŸ“ˆ STOCK MOVERS:
   🟒 NVDA (gainers)
   πŸ”΄ TSLA (losers)

πŸ“° BREAKING NEWS:
   [BTC, ETH] Crypto crash: $2.5B liquidated...

Twitter/X Setup (Optional)

  1. Install bird CLI: npm install -g @steipete/bird
  2. Login to x.com in Safari/Chrome
  3. Create .env file:
AUTH_TOKEN=your_auth_token
CT0=your_ct0_token

Get tokens from browser DevTools β†’ Application β†’ Cookies β†’ x.com

Automation

Set up a daily cron job for morning reports:

# Run at 8 AM daily
0 8 * * * python3 /path/to/hot_scanner.py --no-social >> /var/log/hot_scanner.log

Risk Detection

  • ⚠️ Pre-earnings warning (< 14 days)
  • ⚠️ Post-earnings spike (> 15% in 5 days)
  • ⚠️ Overbought (RSI > 70 + near 52w high)
  • ⚠️ Risk-off mode (GLD/TLT/UUP rising)
  • ⚠️ Geopolitical keywords (Taiwan, China, etc.)
  • ⚠️ Breaking news alerts

Performance Options

Flag Speed Description
(default) 5-10s Full analysis
--no-insider 3-5s Skip SEC EDGAR
--fast 2-3s Skip insider + news

Data Sources

Storage

Data Location
Portfolios ~/.clawdbot/skills/stock-analysis/portfolios.json
Watchlist ~/.clawdbot/skills/stock-analysis/watchlist.json

Testing

uv run pytest scripts/test_stock_analysis.py -v

Limitations

  • Yahoo Finance may lag 15-20 minutes
  • Short interest lags ~2 weeks (FINRA)
  • US markets only

Disclaimer

⚠️ NOT FINANCIAL ADVICE. For informational purposes only. Consult a licensed financial advisor before making investment decisions.


Built for OpenClaw 🦞 | ClawHub

About

AI-powered stock & crypto analysis with portfolio tracking - OpenClaw Skill

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages