Rank
65
LangChain/LangGraph tools for AI agent x402 payments on X1
Traction
No public download signal
Freshness
Updated 4mo ago
Xpersona Agent
Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management, watchlists with alerts, dividend analysis, 8-dimension stock scoring, viral trend detection (Hot Scanner), and rumor/early signal detection. Use for stock analysis, portfolio tracking, earnings reactions, crypto monitoring, trending stocks, or finding rumors before they hit mainstream. Skill: Stock Analysis Owner: udiedrichsen Summary: Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management, watchlists with alerts, dividend analysis, 8-dimension stock scoring, viral trend detection (Hot Scanner), and rumor/early signal detection. Use for stock analysis, portfolio tracking, earnings reactions, crypto monitoring, trending stocks, or finding rumors before they hit m
clawhub skill install publishers:udiedrichsen:stock-analysisOverall rank
#62
Adoption
52.3K downloads
Trust
Unknown
Freshness
May 31, 2026
Freshness
Last checked May 31, 2026
Best For
Stock Analysis is best for general automation workflows where OpenClaw compatibility matters.
Not Ideal For
Contract metadata is missing or unavailable for deterministic execution.
Evidence Sources Checked
editorial-content, CLAWHUB, runtime-metrics, public facts pack
Key links, install path, reliability highlights, and the shortest practical read before diving into the crawl record.
Overview
Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management, watchlists with alerts, dividend analysis, 8-dimension stock scoring, viral trend detection (Hot Scanner), and rumor/early signal detection. Use for stock analysis, portfolio tracking, earnings reactions, crypto monitoring, trending stocks, or finding rumors before they hit mainstream. Skill: Stock Analysis Owner: udiedrichsen Summary: Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management, watchlists with alerts, dividend analysis, 8-dimension stock scoring, viral trend detection (Hot Scanner), and rumor/early signal detection. Use for stock analysis, portfolio tracking, earnings reactions, crypto monitoring, trending stocks, or finding rumors before they hit m Capability contract not published. No trust telemetry is available yet. 52.3K downloads reported by the source. Last updated 5/31/2026.
Trust score
Unknown
Compatibility
OpenClaw
Freshness
May 31, 2026
Vendor
Clawhub
Artifacts
0
Benchmarks
0
Last release
6.2.0
Install & run
clawhub skill install publishers:udiedrichsen:stock-analysisSetup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Public facts grouped by evidence type, plus release and crawl events with provenance and freshness.
Public facts
Vendor
Clawhub
Protocol compatibility
OpenClaw
Latest release
6.2.0
Adoption signal
52.3K downloads
Handshake status
UNKNOWN
Parameters, dependencies, examples, extracted files, editorial overview, and the complete README when available.
Captured outputs
Extracted files
5
Examples
6
Snippets
0
Languages
Unknown
bash
# Basic analysis
uv run {baseDir}/scripts/analyze_stock.py AAPL
# Fast mode (skips insider trading & breaking news)
uv run {baseDir}/scripts/analyze_stock.py AAPL --fast
# Compare multiple
uv run {baseDir}/scripts/analyze_stock.py AAPL MSFT GOOGL
# Crypto
uv run {baseDir}/scripts/analyze_stock.py BTC-USD ETH-USDbash
# Analyze dividends
uv run {baseDir}/scripts/dividends.py JNJ
# Compare dividend stocks
uv run {baseDir}/scripts/dividends.py JNJ PG KO MCD --output jsonbash
# Add to watchlist
uv run {baseDir}/scripts/watchlist.py add AAPL
# With price target alert
uv run {baseDir}/scripts/watchlist.py add AAPL --target 200
# With stop loss alert
uv run {baseDir}/scripts/watchlist.py add AAPL --stop 150
# Alert on signal change (BUYโSELL)
uv run {baseDir}/scripts/watchlist.py add AAPL --alert-on signal
# View watchlist
uv run {baseDir}/scripts/watchlist.py list
# Check for triggered alerts
uv run {baseDir}/scripts/watchlist.py check
uv run {baseDir}/scripts/watchlist.py check --notify # Telegram format
# Remove from watchlist
uv run {baseDir}/scripts/watchlist.py remove AAPLbash
# Create portfolio
uv run {baseDir}/scripts/portfolio.py create "Tech Portfolio"
# Add assets
uv run {baseDir}/scripts/portfolio.py add AAPL --quantity 100 --cost 150
uv run {baseDir}/scripts/portfolio.py add BTC-USD --quantity 0.5 --cost 40000
# View portfolio
uv run {baseDir}/scripts/portfolio.py show
# Analyze with period returns
uv run {baseDir}/scripts/analyze_stock.py --portfolio "Tech Portfolio" --period weeklybash
# Full scan - find what's trending NOW
python3 {baseDir}/scripts/hot_scanner.py
# Fast scan (skip social media)
python3 {baseDir}/scripts/hot_scanner.py --no-social
# JSON output for automation
python3 {baseDir}/scripts/hot_scanner.py --jsonbash
# Find early signals, M&A rumors, insider activity
python3 {baseDir}/scripts/rumor_scanner.pySKILL.md
---
name: stock-analysis
description: Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management, watchlists with alerts, dividend analysis, 8-dimension stock scoring, viral trend detection (Hot Scanner), and rumor/early signal detection. Use for stock analysis, portfolio tracking, earnings reactions, crypto monitoring, trending stocks, or finding rumors before they hit mainstream.
version: 6.2.0
homepage: https://finance.yahoo.com
commands:
- /stock - Analyze a stock or crypto (e.g., /stock AAPL)
- /stock_compare - Compare multiple tickers
- /stock_dividend - Analyze dividend metrics
- /stock_watch - Add/remove from watchlist
- /stock_alerts - Check triggered alerts
- /stock_hot - Find trending stocks & crypto (Hot Scanner)
- /stock_rumors - Find early signals, M&A rumors, insider activity (Rumor Scanner)
- /portfolio - Show portfolio summary
- /portfolio_add - Add asset to portfolio
metadata: {"clawdbot":{"emoji":"๐","requires":{"bins":["uv"],"env":[]},"install":[{"id":"uv-brew","kind":"brew","formula":"uv","bins":["uv"],"label":"Install uv (brew)"}]}}
---
# Stock Analysis v6.1
Analyze US stocks and cryptocurrencies with 8-dimension analysis, portfolio management, watchlists, alerts, dividend analysis, and **viral trend detection**.
## What's New in v6.2
- ๐ฎ **Rumor Scanner** โ Early signals before mainstream news
- M&A rumors and takeover bids
- Insider buying/selling activity
- Analyst upgrades/downgrades
- Twitter/X "hearing that...", "sources say..." detection
- ๐ฏ **Impact Scoring** โ Rumors ranked by potential market impact
## What's 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 in v6.0
- ๐ **Watchlist + Alerts** โ Price targets, stop losses, signal changes
- ๐ **Dividend Analysis** โ Yield, payout ratio, growth, safety score
- ๐ **Fast Mode** โ `--fast` skips slow analyses (insider, news)
- ๐ **Improved Performance** โ `--no-insider` for faster runs
## Quick Commands
### Stock Analysis
```bash
# Basic analysis
uv run {baseDir}/scripts/analyze_stock.py AAPL
# Fast mode (skips insider trading & breaking news)
uv run {baseDir}/scripts/analyze_stock.py AAPL --fast
# Compare multiple
uv run {baseDir}/scripts/analyze_stock.py AAPL MSFT GOOGL
# Crypto
uv run {baseDir}/scripts/analyze_stock.py BTC-USD ETH-USD
```
### Dividend Analysis (NEW v6.0)
```bash
# Analyze dividends
uv run {baseDir}/scripts/dividends.py JNJ
# Compare dividend stocks
uv run {baseDir}/scripts/dividends.py JNJ PG KO MCD --output json
```
**Dividend Metrics:**
- Dividend Yield & Annual Payout
- Payout Ratio (safe/moderate/high/unsustainable)
- 5-Year Dividend Growth (CAGR)
- Consecutive Years of Increases
- Safety Score (0-100)
- Income Rating (excellent/good/moderate/poor)
docs/README.md
# Documentation ## Stock Analysis v6.1 This folder contains detailed documentation for the Stock Analysis skill. ## Contents | Document | Description | |----------|-------------| | [CONCEPT.md](./CONCEPT.md) | Philosophy, ideas, and design rationale | | [USAGE.md](./USAGE.md) | Practical usage guide with examples | | [ARCHITECTURE.md](./ARCHITECTURE.md) | Technical implementation details | | [HOT_SCANNER.md](./HOT_SCANNER.md) | ๐ฅ Viral trend detection (NEW) | ## Quick Links ### For Users Start with **[USAGE.md](./USAGE.md)** โ it has practical examples for: - Basic stock analysis - Comparing stocks - Crypto analysis - Dividend investing - Portfolio management - Watchlist & alerts ### For Understanding Read **[CONCEPT.md](./CONCEPT.md)** to understand: - Why 8 dimensions? - How scoring works - Contrarian signals - Risk detection philosophy - Limitations we acknowledge ### For Developers Check **[ARCHITECTURE.md](./ARCHITECTURE.md)** for: - System overview diagram - Data flow - Caching strategy - File structure - Performance optimization ## Quick Start ```bash # Analyze a stock uv run scripts/analyze_stock.py AAPL # Fast mode (2-3 seconds) uv run scripts/analyze_stock.py AAPL --fast # Dividend analysis uv run scripts/dividends.py JNJ # Watchlist uv run scripts/watchlist.py add AAPL --target 200 uv run scripts/watchlist.py check ``` ## Key Concepts ### The 8 Dimensions 1. **Earnings Surprise** (30%) โ Did they beat expectations? 2. **Fundamentals** (20%) โ P/E, margins, growth, debt 3. **Analyst Sentiment** (20%) โ Professional consensus 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 ### Signal Thresholds | Score | Recommendation | |-------|----------------| | > +0.33 | **BUY** | | -0.33 to +0.33 | **HOLD** | | < -0.33 | **SELL** | ### Risk Flags - โ ๏ธ Pre-earnings (< 14 days) - โ ๏ธ Post-spike (> 15% in 5 days) - โ ๏ธ Overbought (RSI > 70 + near 52w high) - โ ๏ธ Risk-off mode (GLD/TLT/UUP rising) - โ ๏ธ Geopolitical keywords - โ ๏ธ Breaking news alerts ## Disclaimer โ ๏ธ **NOT FINANCIAL ADVICE.** For informational purposes only. Always do your own research and consult a licensed financial advisor.
README.md
# ๐ Stock Analysis v6.1 > AI-powered stock & crypto analysis with portfolio management, watchlists, dividend analysis, and **viral trend detection**. [](https://clawhub.ai) [](https://openclaw.ai) ## 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 ```bash 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 ```bash uv run scripts/analyze_stock.py BTC-USD uv run scripts/analyze_stock.py ETH-USD SOL-USD ``` ### Dividend Analysis ```bash uv run scripts/dividends.py JNJ PG KO ``` ### Watchlist ```bash 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 ```bash 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) ```bash # 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**
_meta.json
{
"ownerId": "kn77fv9851hjcqe52zqx0bhhbx7z680h",
"slug": "stock-analysis",
"version": "6.2.0",
"publishedAt": 1770041353575
}App-Plan.md
# StockPulse - Commercial Product Roadmap
## Vision
Transform the stock-analysis skill into **StockPulse**, a commercial mobile app for retail investors with AI-powered stock and crypto analysis, portfolio tracking, and personalized alerts.
## Technical Decisions
- **Mobile:** Flutter (iOS + Android cross-platform)
- **Backend:** Python FastAPI on AWS (ECS/Lambda)
- **Database:** PostgreSQL (RDS) + Redis (ElastiCache)
- **Auth:** AWS Cognito or Firebase Auth
- **Monetization:** Freemium + Subscription ($9.99/mo or $79.99/yr)
---
## Architecture Overview
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MOBILE APP (Flutter) โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ โDashboard โ โPortfolio โ โ Analysis โ โ Alerts โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HTTPS/REST
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ API GATEWAY (AWS) โ
โ Rate Limiting, Auth, Caching โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BACKEND (FastAPI on ECS) โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ Auth Service โ โ Analysis API โ โ Portfolio APIโ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ Alerts Svc โ โ Subscription โ โ User Service โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ PostgreSQL โ โ Redis โ โ S3 โ
โ (RDS) โ โ (ElastiCache)โ โ (Reports) โ
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
BACKGROUND WORKERS (Lambda/ECS)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โPrice Updater โ โAlert Checker โ โDaily Reports โ โ
โ โ (5 min) โ โ (1 min) โ โ (Daily) โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
---
## Feature Tiers
### Free Tier
- 1 portfolio (max 10 assets)
- Basic stock/crypto analysis
- Daily market summary
- Limited to 5 analyses/day
- Ads displayed
Editorial read
Docs source
CLAWHUB
Editorial quality
ready
Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management, watchlists with alerts, dividend analysis, 8-dimension stock scoring, viral trend detection (Hot Scanner), and rumor/early signal detection. Use for stock analysis, portfolio tracking, earnings reactions, crypto monitoring, trending stocks, or finding rumors before they hit mainstream. Skill: Stock Analysis Owner: udiedrichsen Summary: Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management, watchlists with alerts, dividend analysis, 8-dimension stock scoring, viral trend detection (Hot Scanner), and rumor/early signal detection. Use for stock analysis, portfolio tracking, earnings reactions, crypto monitoring, trending stocks, or finding rumors before they hit m
Skill: Stock Analysis
Owner: udiedrichsen
Summary: Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management, watchlists with alerts, dividend analysis, 8-dimension stock scoring, viral trend detection (Hot Scanner), and rumor/early signal detection. Use for stock analysis, portfolio tracking, earnings reactions, crypto monitoring, trending stocks, or finding rumors before they hit mainstream.
Tags: latest:6.2.0
Version history:
v6.2.0 | 2026-02-02T14:09:13.575Z | user
๐ฎ Rumor Scanner: M&A rumors, insider activity, Twitter whispers, impact scoring
v6.1.0 | 2026-02-02T11:07:39.843Z | auto
Major update: Viral trend detection ("Hot Scanner") and social media integration.
v6.0.0 | 2026-02-02T09:07:24.446Z | user
Watchlist + Alerts, Dividend Analysis, Fast Mode, Tests
v5.0.0 | 2026-01-16T09:33:36.509Z | user
Portfolio management, crypto analysis (Top 20), periodic reports (daily/weekly/monthly/quarterly/yearly)
v4.0.0 | 2026-01-15T07:11:12.536Z | user
v4.0.0: Geopolitical Risk & News Sentiment
Major new features: โข Safe-haven indicators (GLD, TLT, UUP) with risk-off detection โข Breaking news check (Google News RSS) for crisis keywords โข Geopolitical sector risk mapping (Taiwan, China, Russia, Middle East, banking) โข Automatic confidence penalties for affected tickers/sectors (15-30%) โข Up to 5 caveats in output (was 3)
Risk detection: โข Flight to safety detection across gold, treasuries, USD โข Crisis keyword scanning (war, recession, sanctions, disasters) โข Sector-specific exposure warnings โข 1-hour cache for breaking news and shared indicators
v3.5.0 | 2026-01-15T06:39:48.890Z | user
Major performance upgrade: Async parallel fetching (6-10s โ 3-5s per stock) + caching for shared indicators (Fear/Greed, VIX). Multi-stock analysis now ~3x faster. All 5 sentiment indicators fetch in parallel with 10s timeouts. Fear & Greed Index and VIX term structure cached for 1h.
v3.0.0 | 2026-01-15T06:10:37.779Z | user
Add comprehensive sentiment analysis with 5 indicators: Fear & Greed Index, short interest, VIX term structure, insider trading, and put/call ratio. Sentiment adds 10% weight to overall recommendation. Runtime increased to 6-10s per stock.
v2.0.0 | 2026-01-14T16:31:21.094Z | user
Major enhancement: Added market context (VIX, SPY/QQQ), sector performance comparison, earnings timing warnings (pre/post-earnings), and momentum analysis (RSI, 52w range). Now detects 'sell the news' scenarios, overbought conditions, and sector rotation. Helps avoid losses like the BAC scenario by warning about high-risk entry points. All 7 dimensions now analyzed with smart recommendation overrides.
v1.0.1 | 2026-01-14T15:21:58.281Z | user
Fix: Add explicit instructions to prevent agent from adding extra text in command invocation
v1.0.0 | 2026-01-14T09:46:15.214Z | user
Initial release: Analyze US stocks during earnings season with buy/hold/sell signals based on earnings surprises, fundamentals (P/E, margins, growth, debt), analyst sentiment, and historical patterns. Uses Yahoo Finance data via yfinance library.
Archive index:
Archive v6.2.0: 18 files, 80513 bytes
Files: App-Plan.md (14708b), docs/ARCHITECTURE.md (16594b), docs/CONCEPT.md (9101b), docs/HOT_SCANNER.md (5865b), docs/README.md (2405b), docs/USAGE.md (8898b), README.md (6390b), scripts/analyze_stock.py (89930b), scripts/dividends.py (13130b), scripts/hot_scanner.py (24620b), scripts/portfolio.py (18897b), scripts/rumor_scanner.py (11578b), scripts/test_stock_analysis.py (11958b), scripts/watchlist.py (11542b), skill-card.md (2643b), SKILL.md (8230b), TODO.md (12848b), _meta.json (133b)
File v6.2.0:SKILL.md
name: stock-analysis description: Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management, watchlists with alerts, dividend analysis, 8-dimension stock scoring, viral trend detection (Hot Scanner), and rumor/early signal detection. Use for stock analysis, portfolio tracking, earnings reactions, crypto monitoring, trending stocks, or finding rumors before they hit mainstream. version: 6.2.0 homepage: https://finance.yahoo.com commands:
Analyze US stocks and cryptocurrencies with 8-dimension analysis, portfolio management, watchlists, alerts, dividend analysis, and viral trend detection.
--fast skips slow analyses (insider, news)--no-insider for faster runs# Basic analysis
uv run {baseDir}/scripts/analyze_stock.py AAPL
# Fast mode (skips insider trading & breaking news)
uv run {baseDir}/scripts/analyze_stock.py AAPL --fast
# Compare multiple
uv run {baseDir}/scripts/analyze_stock.py AAPL MSFT GOOGL
# Crypto
uv run {baseDir}/scripts/analyze_stock.py BTC-USD ETH-USD
# Analyze dividends
uv run {baseDir}/scripts/dividends.py JNJ
# Compare dividend stocks
uv run {baseDir}/scripts/dividends.py JNJ PG KO MCD --output json
Dividend Metrics:
# Add to watchlist
uv run {baseDir}/scripts/watchlist.py add AAPL
# With price target alert
uv run {baseDir}/scripts/watchlist.py add AAPL --target 200
# With stop loss alert
uv run {baseDir}/scripts/watchlist.py add AAPL --stop 150
# Alert on signal change (BUYโSELL)
uv run {baseDir}/scripts/watchlist.py add AAPL --alert-on signal
# View watchlist
uv run {baseDir}/scripts/watchlist.py list
# Check for triggered alerts
uv run {baseDir}/scripts/watchlist.py check
uv run {baseDir}/scripts/watchlist.py check --notify # Telegram format
# Remove from watchlist
uv run {baseDir}/scripts/watchlist.py remove AAPL
Alert Types:
# Create portfolio
uv run {baseDir}/scripts/portfolio.py create "Tech Portfolio"
# Add assets
uv run {baseDir}/scripts/portfolio.py add AAPL --quantity 100 --cost 150
uv run {baseDir}/scripts/portfolio.py add BTC-USD --quantity 0.5 --cost 40000
# View portfolio
uv run {baseDir}/scripts/portfolio.py show
# Analyze with period returns
uv run {baseDir}/scripts/analyze_stock.py --portfolio "Tech Portfolio" --period weekly
# Full scan - find what's trending NOW
python3 {baseDir}/scripts/hot_scanner.py
# Fast scan (skip social media)
python3 {baseDir}/scripts/hot_scanner.py --no-social
# JSON output for automation
python3 {baseDir}/scripts/hot_scanner.py --json
Data Sources:
Output:
Twitter Setup (Optional):
npm install -g @steipete/bird.env with AUTH_TOKEN and CT0# Find early signals, M&A rumors, insider activity
python3 {baseDir}/scripts/rumor_scanner.py
What it finds:
Impact Scoring:
Best Practice: Run at 07:00 before US market open to catch pre-market signals.
| Dimension | Weight | Description | |-----------|--------|-------------| | Earnings Surprise | 30% | EPS beat/miss | | Fundamentals | 20% | P/E, margins, growth | | Analyst Sentiment | 20% | Ratings, price targets | | Historical | 10% | Past earnings reactions | | Market Context | 10% | VIX, SPY/QQQ trends | | Sector | 15% | Relative strength | | Momentum | 15% | RSI, 52-week range | | Sentiment | 10% | Fear/Greed, shorts, insiders |
| Indicator | Source | Signal | |-----------|--------|--------| | Fear & Greed | CNN | Contrarian (fear=buy) | | Short Interest | Yahoo | Squeeze potential | | VIX Structure | Futures | Stress detection | | Insider Trades | SEC EDGAR | Smart money | | Put/Call Ratio | Options | Sentiment extreme |
| Flag | Effect | Speed |
|------|--------|-------|
| (default) | Full analysis | 5-10s |
| --no-insider | Skip SEC EDGAR | 3-5s |
| --fast | Skip insider + news | 2-3s |
BTC, ETH, BNB, SOL, XRP, ADA, DOGE, AVAX, DOT, MATIC, LINK, ATOM, UNI, LTC, BCH, XLM, ALGO, VET, FIL, NEAR
(Use -USD suffix: BTC-USD, ETH-USD)
| File | Location |
|------|----------|
| Portfolios | ~/.clawdbot/skills/stock-analysis/portfolios.json |
| Watchlist | ~/.clawdbot/skills/stock-analysis/watchlist.json |
โ ๏ธ NOT FINANCIAL ADVICE. For informational purposes only. Consult a licensed financial advisor before making investment decisions.
File v6.2.0:docs/README.md
This folder contains detailed documentation for the Stock Analysis skill.
| Document | Description | |----------|-------------| | CONCEPT.md | Philosophy, ideas, and design rationale | | USAGE.md | Practical usage guide with examples | | ARCHITECTURE.md | Technical implementation details | | HOT_SCANNER.md | ๐ฅ Viral trend detection (NEW) |
Start with USAGE.md โ it has practical examples for:
Read CONCEPT.md to understand:
Check ARCHITECTURE.md for:
# Analyze a stock
uv run scripts/analyze_stock.py AAPL
# Fast mode (2-3 seconds)
uv run scripts/analyze_stock.py AAPL --fast
# Dividend analysis
uv run scripts/dividends.py JNJ
# Watchlist
uv run scripts/watchlist.py add AAPL --target 200
uv run scripts/watchlist.py check
| Score | Recommendation | |-------|----------------| | > +0.33 | BUY | | -0.33 to +0.33 | HOLD | | < -0.33 | SELL |
โ ๏ธ NOT FINANCIAL ADVICE. For informational purposes only. Always do your own research and consult a licensed financial advisor.
File v6.2.0:README.md
AI-powered stock & crypto analysis with portfolio management, watchlists, dividend analysis, and viral trend detection.
| 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) |
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
uv run scripts/analyze_stock.py BTC-USD
uv run scripts/analyze_stock.py ETH-USD SOL-USD
uv run scripts/dividends.py JNJ PG KO
uv run scripts/watchlist.py add AAPL --target 200 --stop 150
uv run scripts/watchlist.py list
uv run scripts/watchlist.py check --notify
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
# 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
| 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 |
Find what's trending RIGHT NOW across stocks & crypto.
| 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) |
๐ 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...
npm install -g @steipete/bird.env file:AUTH_TOKEN=your_auth_token
CT0=your_ct0_token
Get tokens from browser DevTools โ Application โ Cookies โ x.com
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
| Flag | Speed | Description |
|------|-------|-------------|
| (default) | 5-10s | Full analysis |
| --no-insider | 3-5s | Skip SEC EDGAR |
| --fast | 2-3s | Skip insider + news |
| Data | Location |
|------|----------|
| Portfolios | ~/.clawdbot/skills/stock-analysis/portfolios.json |
| Watchlist | ~/.clawdbot/skills/stock-analysis/watchlist.json |
uv run pytest scripts/test_stock_analysis.py -v
โ ๏ธ NOT FINANCIAL ADVICE. For informational purposes only. Consult a licensed financial advisor before making investment decisions.
Built for OpenClaw ๐ฆ | ClawHub
File v6.2.0:_meta.json
{ "ownerId": "kn77fv9851hjcqe52zqx0bhhbx7z680h", "slug": "stock-analysis", "version": "6.2.0", "publishedAt": 1770041353575 }
File v6.2.0:App-Plan.md
Transform the stock-analysis skill into StockPulse, a commercial mobile app for retail investors with AI-powered stock and crypto analysis, portfolio tracking, and personalized alerts.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MOBILE APP (Flutter) โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ โDashboard โ โPortfolio โ โ Analysis โ โ Alerts โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HTTPS/REST
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ API GATEWAY (AWS) โ
โ Rate Limiting, Auth, Caching โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BACKEND (FastAPI on ECS) โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ Auth Service โ โ Analysis API โ โ Portfolio APIโ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ Alerts Svc โ โ Subscription โ โ User Service โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ PostgreSQL โ โ Redis โ โ S3 โ
โ (RDS) โ โ (ElastiCache)โ โ (Reports) โ
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
BACKGROUND WORKERS (Lambda/ECS)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โPrice Updater โ โAlert Checker โ โDaily Reports โ โ
โ โ (5 min) โ โ (1 min) โ โ (Daily) โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Goal: Convert Python scripts to production REST API
Project Setup
Core API Endpoints
POST /auth/register
POST /auth/login
POST /auth/refresh
GET /analysis/{ticker}
POST /analysis/batch
GET /portfolios
POST /portfolios
PUT /portfolios/{id}
DELETE /portfolios/{id}
GET /portfolios/{id}/assets
POST /portfolios/{id}/assets
PUT /portfolios/{id}/assets/{ticker}
DELETE /portfolios/{id}/assets/{ticker}
GET /portfolios/{id}/performance?period=weekly
GET /portfolios/{id}/summary
GET /alerts
POST /alerts
DELETE /alerts/{id}
GET /user/subscription
POST /user/subscription/upgrade
Database Schema
users (id, email, password_hash, created_at, subscription_tier)
portfolios (id, user_id, name, created_at, updated_at)
assets (id, portfolio_id, ticker, asset_type, quantity, cost_basis)
alerts (id, user_id, ticker, condition, threshold, enabled)
analysis_cache (ticker, data, expires_at)
subscriptions (id, user_id, stripe_id, status, expires_at)
Refactor Existing Code
analyze_stock.py into modules:
analysis/earnings.pyanalysis/fundamentals.pyanalysis/sentiment.pyanalysis/crypto.pyanalysis/market_context.pybackend/
โโโ app/
โ โโโ main.py # FastAPI app
โ โโโ config.py # Settings
โ โโโ models/ # SQLAlchemy models
โ โโโ schemas/ # Pydantic schemas
โ โโโ routers/ # API routes
โ โ โโโ auth.py
โ โ โโโ analysis.py
โ โ โโโ portfolios.py
โ โ โโโ alerts.py
โ โโโ services/ # Business logic
โ โ โโโ analysis/ # Refactored from analyze_stock.py
โ โ โโโ portfolio.py
โ โ โโโ alerts.py
โ โโโ workers/ # Background tasks
โโโ tests/
โโโ Dockerfile
โโโ docker-compose.yml
โโโ requirements.txt
Goal: Build polished cross-platform mobile app
dependencies:
flutter_bloc: ^8.0.0 # State management
dio: ^5.0.0 # HTTP client
go_router: ^12.0.0 # Navigation
fl_chart: ^0.65.0 # Charts
firebase_messaging: ^14.0.0 # Push notifications
in_app_purchase: ^3.0.0 # Subscriptions
shared_preferences: ^2.0.0
flutter_secure_storage: ^9.0.0
lib/
โโโ main.dart
โโโ app/
โ โโโ routes.dart
โ โโโ theme.dart
โโโ features/
โ โโโ auth/
โ โ โโโ bloc/
โ โ โโโ screens/
โ โ โโโ widgets/
โ โโโ dashboard/
โ โโโ analysis/
โ โโโ portfolio/
โ โโโ alerts/
โ โโโ settings/
โโโ core/
โ โโโ api/
โ โโโ models/
โ โโโ utils/
โโโ shared/
โโโ widgets/
Goal: Production-ready cloud infrastructure
infrastructure/
โโโ main.tf
โโโ variables.tf
โโโ modules/
โ โโโ vpc/
โ โโโ ecs/
โ โโโ rds/
โ โโโ elasticache/
โ โโโ cognito/
โโโ environments/
โโโ dev/
โโโ staging/
โโโ prod/
| Service | Est. Cost | |---------|-----------| | ECS Fargate (2 tasks) | $50-100 | | RDS (db.t3.small) | $30-50 | | ElastiCache (cache.t3.micro) | $15-25 | | S3 + CloudFront | $10-20 | | Other (Cognito, SES, etc.) | $20-30 | | Total | $125-225/mo |
Goal: Integrate Stripe for subscriptions
# Backend webhook handler
@router.post("/webhooks/stripe")
async def stripe_webhook(request: Request):
event = stripe.Webhook.construct_event(...)
if event.type == "customer.subscription.updated":
update_user_tier(event.data.object)
elif event.type == "customer.subscription.deleted":
downgrade_to_free(event.data.object)
Goal: Real-time price alerts and notifications
Goal: Track usage, errors, business metrics
Authentication
Data Protection
API Security
Compliance
| Risk | Impact | Mitigation | |------|--------|------------| | Yahoo Finance rate limits | High | Implement caching, use paid API fallback | | App store rejection | Medium | Follow guidelines, proper disclaimers | | Data accuracy issues | High | Clear disclaimers, data validation | | Security breach | Critical | Security audit, penetration testing | | Low conversion rate | Medium | A/B testing, feature gating |
| Metric | Target | |--------|--------| | App downloads | 10,000+ | | DAU | 1,000+ | | Premium subscribers | 500+ | | Monthly revenue | $5,000+ | | App store rating | 4.5+ stars | | Churn rate | <5%/month |
stockpulse/
โโโ backend/ # FastAPI backend
โ โโโ app/
โ โโโ tests/
โ โโโ Dockerfile
โ โโโ requirements.txt
โโโ mobile/ # Flutter app
โ โโโ lib/
โ โโโ test/
โ โโโ ios/
โ โโโ android/
โ โโโ pubspec.yaml
โโโ infrastructure/ # Terraform
โ โโโ modules/
โ โโโ environments/
โโโ docs/ # Documentation
โ โโโ api/
โ โโโ architecture/
โโโ scripts/ # Utility scripts
| Phase | Duration | Dependencies | |-------|----------|--------------| | 1. Backend API | 4-6 weeks | - | | 2. Flutter App | 6-8 weeks | Phase 1 | | 3. Infrastructure | 2-3 weeks | Phase 1 | | 4. Payments | 2 weeks | Phase 2, 3 | | 5. Notifications | 2 weeks | Phase 2, 3 | | 6. Analytics | 1 week | Phase 2 | | Total | 17-22 weeks | |
This is a planning document. No fixed timeline - execute phases as resources allow.
Disclaimer: This tool is for informational purposes only and does NOT constitute financial advice.
File v6.2.0:docs/ARCHITECTURE.md
How Stock Analysis v6.0 works under the hood.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Stock Analysis v6.0 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ CLI Interface โ โ
โ โ analyze_stock.py | dividends.py | watchlist.py | portfolio.pyโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Analysis Engine โ โ
โ โ โ โ
โ โ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โ โ
โ โ โEarnings โ โFundmtls โ โAnalysts โ โHistoricalโ โ โ
โ โ โโโโโโฌโโโโโ โโโโโโฌโโโโโ โโโโโโฌโโโโโ โโโโโโฌโโโโโ โ โ
โ โ โ โ โ โ โ โ
โ โ โโโโโโดโโโโโ โโโโโโดโโโโโ โโโโโโดโโโโโ โโโโโโดโโโโโ โ โ
โ โ โ Market โ โ Sector โ โMomentum โ โSentimentโ โ โ
โ โ โโโโโโฌโโโโโ โโโโโโฌโโโโโ โโโโโโฌโโโโโ โโโโโโฌโโโโโ โ โ
โ โ โ โ โ โ โ โ
โ โ โโโโโโโโโโโโโดโโโโโโโโโโโโดโโโโโโโโโโโโ โ โ
โ โ โ โ โ
โ โ [Synthesizer] โ โ
โ โ โ โ โ
โ โ [Signal Output] โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Data Sources โ โ
โ โ โ โ
โ โ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โ โ
โ โ โ Yahoo โ โ CNN โ โ SEC โ โ Google โ โ โ
โ โ โ Finance โ โFear/Grd โ โ EDGAR โ โ News โ โ โ
โ โ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
fetch_stock_data)def fetch_stock_data(ticker: str, verbose: bool = False) -> StockData | None:
"""Fetch stock data from Yahoo Finance with retry logic."""
Features:
Returns: StockData dataclass with:
info: Company fundamentalsearnings_history: Past earningsanalyst_info: Ratings and targetsprice_history: 1-year OHLCVEach dimension has its own analyzer:
| Module | Function | Returns |
|--------|----------|---------|
| Earnings | analyze_earnings_surprise() | EarningsSurprise |
| Fundamentals | analyze_fundamentals() | Fundamentals |
| Analysts | analyze_analyst_sentiment() | AnalystSentiment |
| Historical | analyze_historical_patterns() | HistoricalPatterns |
| Market | analyze_market_context() | MarketContext |
| Sector | analyze_sector_performance() | SectorComparison |
| Momentum | analyze_momentum() | MomentumAnalysis |
| Sentiment | analyze_sentiment() | SentimentAnalysis |
Sentiment runs 5 parallel async tasks:
results = await asyncio.gather(
get_fear_greed_index(), # CNN Fear & Greed
get_short_interest(data), # Yahoo Finance
get_vix_term_structure(), # VIX Futures
get_insider_activity(), # SEC EDGAR
get_put_call_ratio(data), # Options Chain
return_exceptions=True
)
Timeout: 10 seconds per indicator Minimum: 2 of 5 indicators required
def synthesize_signal(
ticker, company_name,
earnings, fundamentals, analysts, historical,
market_context, sector, earnings_timing,
momentum, sentiment,
breaking_news, geopolitical_risk_warning, geopolitical_risk_penalty
) -> Signal:
Scoring:
final_scoreThresholds:
if final_score > 0.33:
recommendation = "BUY"
elif final_score < -0.33:
recommendation = "SELL"
else:
recommendation = "HOLD"
| Data | TTL | Key |
|------|-----|-----|
| Market Context | 1 hour | market_context |
| Fear & Greed | 1 hour | fear_greed |
| VIX Structure | 1 hour | vix_structure |
| Breaking News | 1 hour | breaking_news |
_SENTIMENT_CACHE = {}
_CACHE_TTL_SECONDS = 3600 # 1 hour
def _get_cached(key: str):
if key in _SENTIMENT_CACHE:
value, timestamp = _SENTIMENT_CACHE[key]
if time.time() - timestamp < _CACHE_TTL_SECONDS:
return value
return None
def _set_cache(key: str, value):
_SENTIMENT_CACHE[key] = (value, time.time())
User Input: "AAPL"
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 1. FETCH DATA (yfinance) โ
โ - Stock info, earnings, price history โ
โ - ~2 seconds โ
โโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 2. PARALLEL ANALYSIS โ
โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ โ Earnings โ โFundmtls โ โ Analysts โ ... (sync) โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Market Context (cached or fetch) โ ~1 second โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Sentiment (5 async tasks) โ ~3-5 seconds โ
โ โ - Fear/Greed (cached) โ โ
โ โ - Short Interest โ โ
โ โ - VIX Structure (cached) โ โ
โ โ - Insider Trading (slow!) โ โ
โ โ - Put/Call Ratio โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 3. SYNTHESIZE SIGNAL โ
โ - Combine scores with weights โ
โ - Apply adjustments โ
โ - Generate caveats โ
โ - ~10 ms โ
โโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 4. OUTPUT โ
โ - Text or JSON format โ
โ - Include disclaimer โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
GEOPOLITICAL_RISK_MAP = {
"taiwan": {
"keywords": ["taiwan", "tsmc", "strait"],
"sectors": ["Technology", "Communication Services"],
"affected_tickers": ["NVDA", "AMD", "TSM", ...],
"impact": "Semiconductor supply chain disruption",
},
# ... china, russia_ukraine, middle_east, banking_crisis
}
Process:
def check_breaking_news(verbose: bool = False) -> list[str] | None:
"""Scan Google News RSS for crisis keywords (last 24h)."""
Crisis Keywords:
CRISIS_KEYWORDS = {
"war": ["war", "invasion", "military strike", ...],
"economic": ["recession", "crisis", "collapse", ...],
"regulatory": ["sanctions", "embargo", "ban", ...],
"disaster": ["earthquake", "hurricane", "pandemic", ...],
"financial": ["emergency rate", "bailout", ...],
}
stock-analysis/
โโโ scripts/
โ โโโ analyze_stock.py # Main analysis engine (2500+ lines)
โ โโโ portfolio.py # Portfolio management
โ โโโ dividends.py # Dividend analysis
โ โโโ watchlist.py # Watchlist + alerts
โ โโโ test_stock_analysis.py # Unit tests
โโโ docs/
โ โโโ CONCEPT.md # Philosophy & ideas
โ โโโ USAGE.md # Practical guide
โ โโโ ARCHITECTURE.md # This file
โโโ SKILL.md # OpenClaw skill definition
โโโ README.md # Project overview
โโโ .clawdhub/ # ClawHub metadata
portfolios.json){
"portfolios": [
{
"name": "Retirement",
"created_at": "2024-01-01T00:00:00Z",
"assets": [
{
"ticker": "AAPL",
"quantity": 100,
"cost_basis": 150.00,
"type": "stock",
"added_at": "2024-01-01T00:00:00Z"
}
]
}
]
}
watchlist.json)[
{
"ticker": "NVDA",
"added_at": "2024-01-15T10:30:00Z",
"price_at_add": 700.00,
"target_price": 800.00,
"stop_price": 600.00,
"alert_on_signal": true,
"last_signal": "BUY",
"last_check": "2024-01-20T08:00:00Z"
}
]
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "yfinance>=0.2.40", # Stock data
# "pandas>=2.0.0", # Data manipulation
# "fear-and-greed>=0.4", # CNN Fear & Greed
# "edgartools>=2.0.0", # SEC EDGAR filings
# "feedparser>=6.0.0", # RSS parsing
# ]
# ///
Why These:
yfinance: Most reliable free stock APIpandas: Industry standard for financial datafear-and-greed: Simple CNN F&G wrapperedgartools: Clean SEC EDGAR accessfeedparser: Robust RSS parsing| Operation | Time | |-----------|------| | yfinance fetch | ~2s | | Market context | ~1s (cached after) | | Insider trading | ~3-5s (slowest!) | | Sentiment (parallel) | ~3-5s | | Synthesis | ~10ms | | Total | 5-10s |
--fast)Skips:
Result: 2-3 seconds
max_retries = 3
for attempt in range(max_retries):
try:
# fetch data
except Exception as e:
wait_time = 2 ** attempt # Exponential backoff: 1, 2, 4 seconds
time.sleep(wait_time)
File v6.2.0:docs/CONCEPT.md
Making investment decisions is hard. There's too much data, too many opinions, and too much noise. Most retail investors either:
Stock Analysis provides a structured, multi-dimensional framework that:
Think of it as a second opinion โ not a replacement for your judgment, but a systematic check.
No single metric tells the whole story:
By combining 8 dimensions, we get a more complete picture.
Some of our best signals are contrarian:
| Indicator | Crowd Says | We Interpret | |-----------|------------|--------------| | Extreme Fear (Fear & Greed < 25) | "Sell everything!" | Potential buy opportunity | | Extreme Greed (> 75) | "Easy money!" | Caution, reduce exposure | | High Short Interest + Days to Cover | "Stock is doomed" | Squeeze potential | | Insider Buying | (often ignored) | Smart money signal |
A good stock at the wrong time is a bad trade:
We detect these timing issues and adjust recommendations accordingly.
The same stock behaves differently in different market regimes:
| Regime | Characteristics | Impact | |--------|-----------------|--------| | Bull | VIX < 20, SPY up | BUY signals more reliable | | Bear | VIX > 30, SPY down | Even good stocks fall | | Risk-Off | GLD/TLT/UUP rising | Flight to safety, reduce equity | | Geopolitical | Crisis keywords | Sector-specific penalties |
Income investors have different priorities than growth investors:
| Growth Investor | Income Investor | |-----------------|-----------------| | Price appreciation | Dividend yield | | Revenue growth | Payout sustainability | | Market share | Dividend growth rate | | P/E ratio | Safety of payment |
That's why we have a separate dividend analysis module.
Each dimension captures a different aspect of investment quality:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ FUNDAMENTAL VALUE โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โ โ Earnings โ โ Fundamentals โ โ
โ โ Surprise โ โ (P/E, etc.) โ โ
โ โ (30%) โ โ (20%) โ โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ EXTERNAL VALIDATION โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โ โ Analyst โ โ Historical โ โ
โ โ Sentiment โ โ Patterns โ โ
โ โ (20%) โ โ (10%) โ โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ MARKET ENVIRONMENT โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โ โ Market โ โ Sector โ โ
โ โ Context โ โ Performance โ โ
โ โ (10%) โ โ (15%) โ โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ TECHNICAL & SENTIMENT โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โ โ Momentum โ โ Sentiment โ โ
โ โ (RSI, range) โ โ (Fear, shorts) โ โ
โ โ (15%) โ โ (10%) โ โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Weight | Dimension | Rationale | |--------|-----------|-----------| | 30% | Earnings | Most direct measure of company performance | | 20% | Fundamentals | Long-term value indicators | | 20% | Analysts | Professional consensus (with skepticism) | | 15% | Sector | Relative performance matters | | 15% | Momentum | Trend is your friend (until it isn't) | | 10% | Market | Rising tide lifts all boats | | 10% | Sentiment | Contrarian edge | | 10% | Historical | Past behavior predicts future reactions |
Note: Weights auto-normalize when data is missing.
Warren Buffett's Rule #1. Our risk detection is designed to prevent bad entries:
We err on the side of caution:
That's why our caveats are prominent, and we downgrade BUY โ HOLD liberally.
Crypto is fundamentally different from stocks:
| Stocks | Crypto | |--------|--------| | Earnings | No earnings | | P/E Ratio | Market cap tiers | | Sector ETFs | BTC correlation | | Dividends | Staking yields (not tracked) | | SEC Filings | No filings |
We adapted the framework:
This is a tool, not a crystal ball.
Stock Analysis v6.0 is designed to be your systematic second opinion:
NOT:
Use it wisely. ๐
File v6.2.0:docs/HOT_SCANNER.md
Find viral stocks & crypto trends in real-time by aggregating multiple data sources.
The Hot Scanner answers one question: "What's hot right now?"
It aggregates data from:
# Full scan with all sources
python3 scripts/hot_scanner.py
# Skip social media (faster)
python3 scripts/hot_scanner.py --no-social
# JSON output for automation
python3 scripts/hot_scanner.py --json
============================================================
๐ฅ HOT SCANNER v2 - What's Trending Right Now?
๐
2026-02-02 10:45:30 UTC
============================================================
๐ 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%
๐ ETH Ethereum -7.2%
๐ STOCK MOVERS:
๐ข NVDA (gainers)
๐ด TSLA (losers)
๐ AAPL (most active)
๐ฆ SOCIAL BUZZ:
[twitter] Bitcoin to $100k prediction...
[reddit_wsb] GME yolo update...
๐ฐ BREAKING NEWS:
[BTC, ETH] Crypto crash: $2.5B liquidated...
[NVDA] Nvidia beats earnings expectations...
{
"scan_time": "2026-02-02T10:45:30+00:00",
"top_trending": [
{
"symbol": "BTC",
"mentions": 6,
"sources": ["CoinGecko Trending", "Google News"],
"signals": ["๐ bearish (-2.5%)"]
}
],
"crypto_highlights": [...],
"stock_highlights": [...],
"social_buzz": [...],
"breaking_news": [...]
}
| Endpoint | Data |
|----------|------|
| /search/trending | Top 15 trending coins |
| /coins/markets | Top 100 by market cap with 24h changes |
Scoring: Trending coins get 2 points, movers with >3% change get 1 point.
| Feed | Content | |------|---------| | Business News | General finance headlines | | Crypto Search | Bitcoin, Ethereum, crypto keywords |
Ticker Extraction: Uses regex patterns and company name mappings.
| Page | Data |
|------|------|
| /gainers | Top gaining stocks |
| /losers | Top losing stocks |
| /most-active | Highest volume stocks |
Note: Requires gzip decompression.
Uses bird CLI for Twitter search.
Searches:
stock OR $SPY OR $QQQ OR earningsbitcoin OR ethereum OR crypto OR $BTC# macOS
brew install steipete/tap/bird
# npm
npm install -g @steipete/bird
Option A: Browser cookies (macOS)
bird whoami to verifyOption B: Manual extraction
auth_token and ct0 valuesCreate .env file in the skill directory:
# /path/to/stock-analysis/.env
AUTH_TOKEN=your_auth_token_here
CT0=your_ct0_token_here
Or export as environment variables:
export AUTH_TOKEN="..."
export CT0="..."
bird whoami
# Should show: ๐ @YourUsername
Each mention from a source adds points:
| Source | Points | |--------|--------| | CoinGecko Trending | 2 | | CoinGecko Movers | 1 | | Google News | 1 | | Yahoo Finance | 1 | | Twitter/X | 1 | | Reddit (high score) | 2 | | Reddit (normal) | 1 |
Symbols are ranked by total points across all sources.
# Cashtag: $AAPL
r'\$([A-Z]{1,5})\b'
# Parentheses: (AAPL)
r'\(([A-Z]{2,5})\)'
# Stock mentions: AAPL stock, AAPL shares
r'\b([A-Z]{2,5})(?:\'s|:|\s+stock|\s+shares)'
{
"Apple": "AAPL",
"Microsoft": "MSFT",
"Tesla": "TSLA",
"Nvidia": "NVDA",
"Bitcoin": "BTC",
"Ethereum": "ETH",
# ... etc
}
{
"bitcoin": "BTC",
"ethereum": "ETH",
"solana": "SOL",
"dogecoin": "DOGE",
# ... etc
}
# Daily at 8 AM
0 8 * * * cd /path/to/stock-analysis && python3 scripts/hot_scanner.py --json > cache/daily_scan.json
# Cron job config
name: "๐ฅ Daily Hot Scanner"
schedule:
kind: cron
expr: "0 8 * * *"
tz: "Europe/Berlin"
payload:
kind: agentTurn
message: "Run hot scanner and summarize results"
deliver: true
sessionTarget: isolated
Results are saved to:
cache/hot_scan_latest.json โ Most recent scan# Check auth
bird whoami
# Should see your username
# If not, re-export tokens
The scanner handles gzip automatically. If issues persist, Yahoo may be rate-limiting.
Check that news headlines contain recognizable patterns. The scanner uses conservative extraction to avoid false positives.
File v6.2.0:docs/USAGE.md
Practical examples for using Stock Analysis v6.0 in real scenarios.
uv run scripts/analyze_stock.py AAPL
Output:
===========================================================================
STOCK ANALYSIS: AAPL (Apple Inc.)
Generated: 2024-02-01T10:30:00
===========================================================================
RECOMMENDATION: BUY (Confidence: 72%)
SUPPORTING POINTS:
โข Beat by 8.2% - EPS $2.18 vs $2.01 expected
โข Strong margin: 24.1%
โข Analyst consensus: Buy with 12.3% upside (42 analysts)
โข Momentum: RSI 58 (neutral)
โข Sector: Technology uptrend (+5.2% 1m)
CAVEATS:
โข Earnings in 12 days - high volatility expected
โข High market volatility (VIX 24)
===========================================================================
DISCLAIMER: NOT FINANCIAL ADVICE.
===========================================================================
For programmatic use:
uv run scripts/analyze_stock.py AAPL --output json | jq '.recommendation, .confidence'
See what's happening under the hood:
uv run scripts/analyze_stock.py AAPL --verbose
uv run scripts/analyze_stock.py AAPL MSFT GOOGL
Each stock gets a full analysis. Compare recommendations and confidence levels.
Compare stocks in the same sector:
# Banks
uv run scripts/analyze_stock.py JPM BAC WFC GS
# Tech
uv run scripts/analyze_stock.py AAPL MSFT GOOGL AMZN META
uv run scripts/analyze_stock.py BTC-USD
Crypto-Specific Output:
uv run scripts/analyze_stock.py BTC-USD ETH-USD SOL-USD
BTC, ETH, BNB, SOL, XRP, ADA, DOGE, AVAX, DOT, MATIC,
LINK, ATOM, UNI, LTC, BCH, XLM, ALGO, VET, FIL, NEAR
Use -USD suffix: BTC-USD, ETH-USD, etc.
uv run scripts/dividends.py JNJ
Output:
============================================================
DIVIDEND ANALYSIS: JNJ (Johnson & Johnson)
============================================================
Current Price: $160.50
Annual Dividend: $4.76
Dividend Yield: 2.97%
Payment Freq: quarterly
Ex-Dividend: 2024-02-15
Payout Ratio: 65.0% (moderate)
5Y Div Growth: +5.8%
Consecutive Yrs: 62
SAFETY SCORE: 78/100
INCOME RATING: GOOD
Safety Factors:
โข Moderate payout ratio (65%)
โข Good dividend growth (+5.8% CAGR)
โข Dividend Aristocrat (62+ years)
Dividend History:
2023: $4.52
2022: $4.36
2021: $4.24
2020: $4.04
2019: $3.80
============================================================
uv run scripts/dividends.py JNJ PG KO MCD VZ T
Look for stocks with:
uv run scripts/portfolio.py create "Retirement"
# Stocks
uv run scripts/portfolio.py add AAPL --quantity 100 --cost 150.00
# Crypto
uv run scripts/portfolio.py add BTC-USD --quantity 0.5 --cost 40000
uv run scripts/portfolio.py show
Output:
Portfolio: Retirement
====================
Assets:
AAPL 100 shares @ $150.00 = $15,000.00
Current: $185.00 = $18,500.00 (+23.3%)
BTC-USD 0.5 @ $40,000 = $20,000.00
Current: $45,000 = $22,500.00 (+12.5%)
Total Cost: $35,000.00
Current Value: $41,000.00
Total P&L: +$6,000.00 (+17.1%)
# Full analysis of all holdings
uv run scripts/analyze_stock.py --portfolio "Retirement"
# With period returns
uv run scripts/analyze_stock.py --portfolio "Retirement" --period monthly
The analysis flags concentration warnings:
โ ๏ธ CONCENTRATION WARNINGS:
โข AAPL: 45.1% (>30% of portfolio)
# Basic watch
uv run scripts/watchlist.py add NVDA
# With price target
uv run scripts/watchlist.py add NVDA --target 800
# With stop loss
uv run scripts/watchlist.py add NVDA --stop 600
# Alert on signal change
uv run scripts/watchlist.py add NVDA --alert-on signal
# All options
uv run scripts/watchlist.py add NVDA --target 800 --stop 600 --alert-on signal
uv run scripts/watchlist.py list
Output:
{
"success": true,
"items": [
{
"ticker": "NVDA",
"current_price": 725.50,
"price_at_add": 700.00,
"change_pct": 3.64,
"target_price": 800.00,
"to_target_pct": 10.27,
"stop_price": 600.00,
"to_stop_pct": -17.30,
"alert_on_signal": true,
"last_signal": "BUY",
"added_at": "2024-01-15"
}
],
"count": 1
}
# Check for triggered alerts
uv run scripts/watchlist.py check
# Format for notification (Telegram)
uv run scripts/watchlist.py check --notify
Alert Example:
๐ข Stock Alerts
๐ฏ NVDA hit target! $802.50 >= $800.00
๐ TSLA hit stop! $195.00 <= $200.00
๐ AAPL signal changed: HOLD โ BUY
uv run scripts/watchlist.py remove NVDA
Skip slow analyses for quick checks:
# Skip insider trading + breaking news
uv run scripts/analyze_stock.py AAPL --fast
Speed comparison:
| Mode | Time | What's Skipped |
|------|------|----------------|
| Default | 5-10s | Nothing |
| --no-insider | 3-5s | SEC EDGAR |
| --fast | 2-3s | Insider + News |
Analyze multiple stocks in one command:
uv run scripts/analyze_stock.py AAPL MSFT GOOGL AMZN META
Market context is cached for 1 hour:
Second analysis of different stock reuses cached data.
| Score | Recommendation | |-------|----------------| | > +0.33 | BUY | | -0.33 to +0.33 | HOLD | | < -0.33 | SELL |
| Confidence | Meaning | |------------|---------| | > 80% | Strong conviction | | 60-80% | Moderate conviction | | 40-60% | Mixed signals | | < 40% | Low conviction |
Always read the caveats! They often contain critical information:
CAVEATS:
โข Earnings in 5 days - high volatility expected โ Timing risk
โข RSI 78 (overbought) + near 52w high โ Technical risk
โข โ ๏ธ BREAKING NEWS: Fed emergency rate discussion โ External risk
โข โ ๏ธ SECTOR RISK: China tensions affect tech โ Geopolitical
# Check watchlist alerts
uv run scripts/watchlist.py check --notify
# Quick portfolio update
uv run scripts/analyze_stock.py --portfolio "Main" --fast
# Full analysis
uv run scripts/analyze_stock.py XYZ
# If dividend stock
uv run scripts/dividends.py XYZ
# Add to watchlist for monitoring
uv run scripts/watchlist.py add XYZ --alert-on signal
# Full portfolio analysis
uv run scripts/analyze_stock.py --portfolio "Main" --period weekly
# Check dividend holdings
uv run scripts/dividends.py JNJ PG KO
-USD suffix--fast for quick checksFile v6.2.0:skill-card.md
Analyzes stocks and cryptocurrencies with Yahoo Finance data, portfolio and watchlist tracking, dividend metrics, stock scoring, trend detection, and rumor scanning. <br>
This skill is ready for commercial/non-commercial use. <br>
udiedrichsen <br>
External users and developers use this skill to run command-line stock, crypto, dividend, portfolio, watchlist, trend, and rumor analyses for informational market research. <br>
Global <br>
Risk: Optional Twitter/X scanning can expose live AUTH_TOKEN and CT0 session credentials to an external CLI. <br> Mitigation: Use finance-only commands or run the hot scanner with --no-social unless social-media data is required; do not provide AUTH_TOKEN or CT0 unless the credential exposure is acceptable. <br> Risk: The Twitter/X setup may require broad local permissions such as Terminal Full Disk Access. <br> Mitigation: Avoid granting broad local permissions casually, and keep any .env file containing session credentials out of shared folders and repositories. <br> Risk: Market, short-interest, filing, news, and social signals may be delayed, cached, rate-limited, or keyword-based. <br> Mitigation: Treat outputs as informational market research, verify important claims against primary sources, and do not use the skill as financial advice. <br>
Output Type(s): [Text, JSON, Shell commands, Configuration, Guidance] <br> Output Format: [Console text and optional JSON, with command examples and local configuration guidance] <br> Output Parameters: [1D] <br> Other Properties Related to Output: [May write local portfolio, watchlist, and scanner cache JSON files under user or skill storage paths.] <br>
6.2.0 (source: frontmatter and server release metadata) <br>
Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>
File v6.2.0:TODO.md
โ 8 analysis dimensions with Fear/Greed, short interest, VIX structure, put/call ratio โ Safe-haven indicators (GLD, TLT, UUP) with risk-off detection โ Breaking news alerts via Google News RSS โ Geopolitical risk mapping (Taiwan, China, Russia, Middle East, Banking) โ Sector-specific crisis flagging with confidence penalties โ 1h caching for shared indicators (Fear/Greed, VIX structure, breaking news) โ Async parallel sentiment fetching (5 indicators with 10s timeouts)
โ Portfolio management (create, add, remove, show assets) โ Cryptocurrency support (Top 20 by market cap) โ Portfolio analysis with --portfolio flag โ Periodic returns (--period daily/weekly/monthly/quarterly/yearly) โ Concentration warnings (>30% single asset) โ Crypto fundamentals (market cap, category, BTC correlation)
โ Full insider trading parsing via edgartools (Task #1) โ Market context caching with 1h TTL (Task #3b) ๐ง SEC EDGAR rate limit monitoring (Task #4 - low priority)
๐ก Research phase: Social sentiment, fund flows, on-chain metrics
Status: โ DONE Priority: Medium Effort: 2-3 hours
Current State:
get_insider_activity() fetches Form 4 filings via edgartools[email protected])Tasks:
Expected Impact:
Status: โ DONE (sentiment indicators) Priority: High Effort: 4-6 hours
Current State:
asyncio.gather()Tasks:
async def get_fear_greed_index()async def get_short_interest(data)async def get_vix_term_structure()async def get_insider_activity(ticker)async def get_put_call_ratio(data)analyze_sentiment() to use asyncio.gather()Expected Impact:
Status: โ DONE (sentiment + breaking news) Priority: Medium Effort: 2-3 hours
Current State:
Tasks:
BAC TSLA AAPL)Expected Impact:
Status: Not Started Priority: Low (until insider trading implemented) Effort: 1-2 hours
Current State:
Tasks:
Expected Impact:
The current implementation captures:
What we don't have yet:
Status: โ DONE (keyword-based) Priority: High Effort: 8-12 hours
Proposed Approach: Option A: Use GPRD (Geopolitical Risk Daily Index) from policyuncertainty.com Option B: Scan news APIs (NewsAPI, GDELT) for geopolitical keywords
Tasks:
Expected Impact:
Example Output:
โ ๏ธ GEOPOLITICAL RISK: HIGH (72/100)
Context: Elevated Taiwan tensions detected
Market Impact: Risk-off sentiment likely
Status: โ DONE Priority: High Effort: 6-8 hours
Current Gap:
Proposed Risk Mapping:
| Geopolitical Event | Affected Sectors | Example Tickers | |-------------------|------------------|-----------------| | Taiwan conflict | Semiconductors | NVDA, AMD, TSM, INTC | | Russia-Ukraine | Energy, Agriculture | XLE, MOS, CF, NTR | | Middle East escalation | Oil, Defense | XOM, CVX, LMT, RTX | | China tensions | Tech supply chain, Retail | AAPL, QCOM, NKE, SBUX | | Banking crisis | Financials | JPM, BAC, WFC, C |
Tasks:
Expected Impact:
Example Output:
โ ๏ธ SECTOR RISK ALERT: Semiconductors
Event: Taiwan military exercises (elevated tensions)
Impact: NVDA HIGH RISK - supply chain exposure
Recommendation: HOLD โ downgraded from BUY
Status: โ DONE Priority: Medium Effort: 4-6 hours
Current Gap:
Proposed Solution:
Tasks:
--skip-news flag for offline modeExpected Impact:
Example Output:
โ ๏ธ BREAKING NEWS ALERT (last 6 hours):
"Fed announces emergency rate hike"
Impact: Market-wide volatility expected
Caveat: Analysis may be outdated - rerun in 24h
Status: โ DONE Priority: Medium Effort: 3-4 hours
Current Gap:
Proposed Indicators:
Risk-Off Detection Logic:
IF GLD +2% AND TLT +1% AND UUP +1% (all rising together)
THEN Market Regime = RISK-OFF
Tasks:
Expected Impact:
Example Output:
๐ก๏ธ SAFE-HAVEN ALERT: Risk-off mode detected
- Gold (GLD): +3.2% (5d)
- Treasuries (TLT): +2.1% (5d)
- USD Index: +1.8% (5d)
Recommendation: Reduce equity exposure, favor defensives
Status: Deferred Priority: Low Effort: 8-12 hours
Notes:
Status: Deferred Priority: Low Effort: 6-8 hours
Notes:
Archive v6.1.0: 16 files, 74714 bytes
Files: App-Plan.md (14708b), docs/ARCHITECTURE.md (16594b), docs/CONCEPT.md (9101b), docs/HOT_SCANNER.md (5865b), docs/README.md (2405b), docs/USAGE.md (8898b), README.md (6390b), scripts/analyze_stock.py (89930b), scripts/dividends.py (13130b), scripts/hot_scanner.py (24620b), scripts/portfolio.py (18897b), scripts/test_stock_analysis.py (11958b), scripts/watchlist.py (11542b), SKILL.md (6963b), TODO.md (12848b), _meta.json (133b)
File v6.1.0:SKILL.md
name: stock-analysis description: Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management, watchlists with alerts, dividend analysis, 8-dimension stock scoring, and viral trend detection (Hot Scanner). Use for stock analysis, portfolio tracking, earnings reactions, crypto monitoring, or finding what's trending. version: 6.1.0 homepage: https://finance.yahoo.com commands:
Analyze US stocks and cryptocurrencies with 8-dimension analysis, portfolio management, watchlists, alerts, dividend analysis, and viral trend detection.
--fast skips slow analyses (insider, news)--no-insider for faster runs# Basic analysis
uv run {baseDir}/scripts/analyze_stock.py AAPL
# Fast mode (skips insider trading & breaking news)
uv run {baseDir}/scripts/analyze_stock.py AAPL --fast
# Compare multiple
uv run {baseDir}/scripts/analyze_stock.py AAPL MSFT GOOGL
# Crypto
uv run {baseDir}/scripts/analyze_stock.py BTC-USD ETH-USD
# Analyze dividends
uv run {baseDir}/scripts/dividends.py JNJ
# Compare dividend stocks
uv run {baseDir}/scripts/dividends.py JNJ PG KO MCD --output json
Dividend Metrics:
# Add to watchlist
uv run {baseDir}/scripts/watchlist.py add AAPL
# With price target alert
uv run {baseDir}/scripts/watchlist.py add AAPL --target 200
# With stop loss alert
uv run {baseDir}/scripts/watchlist.py add AAPL --stop 150
# Alert on signal change (BUYโSELL)
uv run {baseDir}/scripts/watchlist.py add AAPL --alert-on signal
# View watchlist
uv run {baseDir}/scripts/watchlist.py list
# Check for triggered alerts
uv run {baseDir}/scripts/watchlist.py check
uv run {baseDir}/scripts/watchlist.py check --notify # Telegram format
# Remove from watchlist
uv run {baseDir}/scripts/watchlist.py remove AAPL
Alert Types:
# Create portfolio
uv run {baseDir}/scripts/portfolio.py create "Tech Portfolio"
# Add assets
uv run {baseDir}/scripts/portfolio.py add AAPL --quantity 100 --cost 150
uv run {baseDir}/scripts/portfolio.py add BTC-USD --quantity 0.5 --cost 40000
# View portfolio
uv run {baseDir}/scripts/portfolio.py show
# Analyze with period returns
uv run {baseDir}/scripts/analyze_stock.py --portfolio "Tech Portfolio" --period weekly
# Full scan - find what's trending NOW
python3 {baseDir}/scripts/hot_scanner.py
# Fast scan (skip social media)
python3 {baseDir}/scripts/hot_scanner.py --no-social
# JSON output for automation
python3 {baseDir}/scripts/hot_scanner.py --json
Data Sources:
Output:
Twitter Setup (Optional):
npm install -g @steipete/bird.env with AUTH_TOKEN and CT0| Dimension | Weight | Description | |-----------|--------|-------------| | Earnings Surprise | 30% | EPS beat/miss | | Fundamentals | 20% | P/E, margins, growth | | Analyst Sentiment | 20% | Ratings, price targets | | Historical | 10% | Past earnings reactions | | Market Context | 10% | VIX, SPY/QQQ trends | | Sector | 15% | Relative strength | | Momentum | 15% | RSI, 52-week range | | Sentiment | 10% | Fear/Greed, shorts, insiders |
| Indicator | Source | Signal | |-----------|--------|--------| | Fear & Greed | CNN | Contrarian (fear=buy) | | Short Interest | Yahoo | Squeeze potential | | VIX Structure | Futures | Stress detection | | Insider Trades | SEC EDGAR | Smart money | | Put/Call Ratio | Options | Sentiment extreme |
| Flag | Effect | Speed |
|------|--------|-------|
| (default) | Full analysis | 5-10s |
| --no-insider | Skip SEC EDGAR | 3-5s |
| --fast | Skip insider + news | 2-3s |
BTC, ETH, BNB, SOL, XRP, ADA, DOGE, AVAX, DOT, MATIC, LINK, ATOM, UNI, LTC, BCH, XLM, ALGO, VET, FIL, NEAR
(Use -USD suffix: BTC-USD, ETH-USD)
| File | Location |
|------|----------|
| Portfolios | ~/.clawdbot/skills/stock-analysis/portfolios.json |
| Watchlist | ~/.clawdbot/skills/stock-analysis/watchlist.json |
โ ๏ธ NOT FINANCIAL ADVICE. For informational purposes only. Consult a licensed financial advisor before making investment decisions.
File v6.1.0:docs/README.md
This folder contains detailed documentation for the Stock Analysis skill.
| Document | Description | |----------|-------------| | CONCEPT.md | Philosophy, ideas, and design rationale | | USAGE.md | Practical usage guide with examples | | ARCHITECTURE.md | Technical implementation details | | HOT_SCANNER.md | ๐ฅ Viral trend detection (NEW) |
Start with USAGE.md โ it has practical examples for:
Read CONCEPT.md to understand:
Check ARCHITECTURE.md for:
# Analyze a stock
uv run scripts/analyze_stock.py AAPL
# Fast mode (2-3 seconds)
uv run scripts/analyze_stock.py AAPL --fast
# Dividend analysis
uv run scripts/dividends.py JNJ
# Watchlist
uv run scripts/watchlist.py add AAPL --target 200
uv run scripts/watchlist.py check
| Score | Recommendation | |-------|----------------| | > +0.33 | BUY | | -0.33 to +0.33 | HOLD | | < -0.33 | SELL |
โ ๏ธ NOT FINANCIAL ADVICE. For informational purposes only. Always do your own research and consult a licensed financial advisor.
File v6.1.0:README.md
AI-powered stock & crypto analysis with portfolio management, watchlists, dividend analysis, and viral trend detection.
| 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) |
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
uv run scripts/analyze_stock.py BTC-USD
uv run scripts/analyze_stock.py ETH-USD SOL-USD
uv run scripts/dividends.py JNJ PG KO
uv run scripts/watchlist.py add AAPL --target 200 --stop 150
uv run scripts/watchlist.py list
uv run scripts/watchlist.py check --notify
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
# 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
| 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 |
Find what's trending RIGHT NOW across stocks & crypto.
| 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) |
๐ 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...
npm install -g @steipete/bird.env file:AUTH_TOKEN=your_auth_token
CT0=your_ct0_token
Get tokens from browser DevTools โ Application โ Cookies โ x.com
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
| Flag | Speed | Description |
|------|-------|-------------|
| (default) | 5-10s | Full analysis |
| --no-insider | 3-5s | Skip SEC EDGAR |
| --fast | 2-3s | Skip insider + news |
| Data | Location |
|------|----------|
| Portfolios | ~/.clawdbot/skills/stock-analysis/portfolios.json |
| Watchlist | ~/.clawdbot/skills/stock-analysis/watchlist.json |
uv run pytest scripts/test_stock_analysis.py -v
โ ๏ธ NOT FINANCIAL ADVICE. For informational purposes only. Consult a licensed financial advisor before making investment decisions.
Built for OpenClaw ๐ฆ | ClawHub
File v6.1.0:_meta.json
{ "ownerId": "kn77fv9851hjcqe52zqx0bhhbx7z680h", "slug": "stock-analysis", "version": "6.1.0", "publishedAt": 1770030459843 }
File v6.1.0:App-Plan.md
Transform the stock-analysis skill into StockPulse, a commercial mobile app for retail investors with AI-powered stock and crypto analysis, portfolio tracking, and personalized alerts.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MOBILE APP (Flutter) โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ โDashboard โ โPortfolio โ โ Analysis โ โ Alerts โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HTTPS/REST
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ API GATEWAY (AWS) โ
โ Rate Limiting, Auth, Caching โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BACKEND (FastAPI on ECS) โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ Auth Service โ โ Analysis API โ โ Portfolio APIโ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ Alerts Svc โ โ Subscription โ โ User Service โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ PostgreSQL โ โ Redis โ โ S3 โ
โ (RDS) โ โ (ElastiCache)โ โ (Reports) โ
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
BACKGROUND WORKERS (Lambda/ECS)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โPrice Updater โ โAlert Checker โ โDaily Reports โ โ
โ โ (5 min) โ โ (1 min) โ โ (Daily) โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Goal: Convert Python scripts to production REST API
Project Setup
Core API Endpoints
POST /auth/register
POST /auth/login
POST /auth/refresh
GET /analysis/{ticker}
POST /analysis/batch
GET /portfolios
POST /portfolios
PUT /portfolios/{id}
DELETE /portfolios/{id}
GET /portfolios/{id}/assets
POST /portfolios/{id}/assets
PUT /portfolios/{id}/assets/{ticker}
DELETE /portfolios/{id}/assets/{ticker}
GET /portfolios/{id}/performance?period=weekly
GET /portfolios/{id}/summary
GET /alerts
POST /alerts
DELETE /alerts/{id}
GET /user/subscription
POST /user/subscription/upgrade
Database Schema
users (id, email, password_hash, created_at, subscription_tier)
portfolios (id, user_id, name, created_at, updated_at)
assets (id, portfolio_id, ticker, asset_type, quantity, cost_basis)
alerts (id, user_id, ticker, condition, threshold, enabled)
analysis_cache (ticker, data, expires_at)
subscriptions (id, user_id, stripe_id, status, expires_at)
Refactor Existing Code
analyze_stock.py into modules:
analysis/earnings.pyanalysis/fundamentals.pyanalysis/sentiment.pyanalysis/crypto.pyanalysis/market_context.pybackend/
โโโ app/
โ โโโ main.py # FastAPI app
โ โโโ config.py # Settings
โ โโโ models/ # SQLAlchemy models
โ โโโ schemas/ # Pydantic schemas
โ โโโ routers/ # API routes
โ โ โโโ auth.py
โ โ โโโ analysis.py
โ โ โโโ portfolios.py
โ โ โโโ alerts.py
โ โโโ services/ # Business logic
โ โ โโโ analysis/ # Refactored from analyze_stock.py
โ โ โโโ portfolio.py
โ โ โโโ alerts.py
โ โโโ workers/ # Background tasks
โโโ tests/
โโโ Dockerfile
โโโ docker-compose.yml
โโโ requirements.txt
Goal: Build polished cross-platform mobile app
dependencies:
flutter_bloc: ^8.0.0 # State management
dio: ^5.0.0 # HTTP client
go_router: ^12.0.0 # Navigation
fl_chart: ^0.65.0 # Charts
firebase_messaging: ^14.0.0 # Push notifications
in_app_purchase: ^3.0.0 # Subscriptions
shared_preferences: ^2.0.0
flutter_secure_storage: ^9.0.0
lib/
โโโ main.dart
โโโ app/
โ โโโ routes.dart
โ โโโ theme.dart
โโโ features/
โ โโโ auth/
โ โ โโโ bloc/
โ โ โโโ screens/
โ โ โโโ widgets/
โ โโโ dashboard/
โ โโโ analysis/
โ โโโ portfolio/
โ โโโ alerts/
โ โโโ settings/
โโโ core/
โ โโโ api/
โ โโโ models/
โ โโโ utils/
โโโ shared/
โโโ widgets/
Goal: Production-ready cloud infrastructure
infrastructure/
โโโ main.tf
โโโ variables.tf
โโโ modules/
โ โโโ vpc/
โ โโโ ecs/
โ โโโ rds/
โ โโโ elasticache/
โ โโโ cognito/
โโโ environments/
โโโ dev/
โโโ staging/
โโโ prod/
| Service | Est. Cost | |---------|-----------| | ECS Fargate (2 tasks) | $50-100 | | RDS (db.t3.small) | $30-50 | | ElastiCache (cache.t3.micro) | $15-25 | | S3 + CloudFront | $10-20 | | Other (Cognito, SES, etc.) | $20-30 | | Total | $125-225/mo |
Goal: Integrate Stripe for subscriptions
# Backend webhook handler
@router.post("/webhooks/stripe")
async def stripe_webhook(request: Request):
event = stripe.Webhook.construct_event(...)
if event.type == "customer.subscription.updated":
update_user_tier(event.data.object)
elif event.type == "customer.subscription.deleted":
downgrade_to_free(event.data.object)
Goal: Real-time price alerts and notifications
Goal: Track usage, errors, business metrics
Authentication
Data Protection
API Security
Compliance
| Risk | Impact | Mitigation | |------|--------|------------| | Yahoo Finance rate limits | High | Implement caching, use paid API fallback | | App store rejection | Medium | Follow guidelines, proper disclaimers | | Data accuracy issues | High | Clear disclaimers, data validation | | Security breach | Critical | Security audit, penetration testing | | Low conversion rate | Medium | A/B testing, feature gating |
| Metric | Target | |--------|--------| | App downloads | 10,000+ | | DAU | 1,000+ | | Premium subscribers | 500+ | | Monthly revenue | $5,000+ | | App store rating | 4.5+ stars | | Churn rate | <5%/month |
stockpulse/
โโโ backend/ # FastAPI backend
โ โโโ app/
โ โโโ tests/
โ โโโ Dockerfile
โ โโโ requirements.txt
โโโ mobile/ # Flutter app
โ โโโ lib/
โ โโโ test/
โ โโโ ios/
โ โโโ android/
โ โโโ pubspec.yaml
โโโ infrastructure/ # Terraform
โ โโโ modules/
โ โโโ environments/
โโโ docs/ # Documentation
โ โโโ api/
โ โโโ architecture/
โโโ scripts/ # Utility scripts
| Phase | Duration | Dependencies | |-------|----------|--------------| | 1. Backend API | 4-6 weeks | - | | 2. Flutter App | 6-8 weeks | Phase 1 | | 3. Infrastructure | 2-3 weeks | Phase 1 | | 4. Payments | 2 weeks | Phase 2, 3 | | 5. Notifications | 2 weeks | Phase 2, 3 | | 6. Analytics | 1 week | Phase 2 | | Total | 17-22 weeks | |
This is a planning document. No fixed timeline - execute phases as resources allow.
Disclaimer: This tool is for informational purposes only and does NOT constitute financial advice.
File v6.1.0:docs/ARCHITECTURE.md
How Stock Analysis v6.0 works under the hood.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Stock Analysis v6.0 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ CLI Interface โ โ
โ โ analyze_stock.py | dividends.py | watchlist.py | portfolio.pyโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Analysis Engine โ โ
โ โ โ โ
โ โ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โ โ
โ โ โEarnings โ โFundmtls โ โAnalysts โ โHistoricalโ โ โ
โ โ โโโโโโฌโโโโโ โโโโโโฌโโโโโ โโโโโโฌโโโโโ โโโโโโฌโโโโโ โ โ
โ โ โ โ โ โ โ โ
โ โ โโโโโโดโโโโโ โโโโโโดโโโโโ โโโโโโดโโโโโ โโโโโโดโโโโโ โ โ
โ โ โ Market โ โ Sector โ โMomentum โ โSentimentโ โ โ
โ โ โโโโโโฌโโโโโ โโโโโโฌโโโโโ โโโโโโฌโโโโโ โโโโโโฌโโโโโ โ โ
โ โ โ โ โ โ โ โ
โ โ โโโโโโโโโโโโโดโโโโโโโโโโโโดโโโโโโโโโโโโ โ โ
โ โ โ โ โ
โ โ [Synthesizer] โ โ
โ โ โ โ โ
โ โ [Signal Output] โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Data Sources โ โ
โ โ โ โ
โ โ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โ โ
โ โ โ Yahoo โ โ CNN โ โ SEC โ โ Google โ โ โ
โ โ โ Finance โ โFear/Grd โ โ EDGAR โ โ News โ โ โ
โ โ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
fetch_stock_data)def fetch_stock_data(ticker: str, verbose: bool = False) -> StockData | None:
"""Fetch stock data from Yahoo Finance with retry logic."""
Features:
Returns: StockData dataclass with:
info: Company fundamentalsearnings_history: Past earningsanalyst_info: Ratings and targetsprice_history: 1-year OHLCVEach dimension has its own analyzer:
| Module | Function | Returns |
|--------|----------|---------|
| Earnings | analyze_earnings_surprise() | EarningsSurprise |
| Fundamentals | analyze_fundamentals() | Fundamentals |
| Analysts | analyze_analyst_sentiment() | AnalystSentiment |
| Historical | analyze_historical_patterns() | HistoricalPatterns |
| Market | analyze_market_context() | MarketContext |
| Sector | analyze_sector_performance() | SectorComparison |
| Momentum | analyze_momentum() | MomentumAnalysis |
| Sentiment | analyze_sentiment() | SentimentAnalysis |
Sentiment runs 5 parallel async tasks:
results = await asyncio.gather(
get_fear_greed_index(), # CNN Fear & Greed
get_short_interest(data), # Yahoo Finance
get_vix_term_structure(), # VIX Futures
get_insider_activity(), # SEC EDGAR
get_put_call_ratio(data), # Options Chain
return_exceptions=True
)
Timeout: 10 seconds per indicator Minimum: 2 of 5 indicators required
def synthesize_signal(
ticker, company_name,
earnings, fundamentals, analysts, historical,
market_context, sector, earnings_timing,
momentum, sentiment,
breaking_news, geopolitical_risk_warning, geopolitical_risk_penalty
) -> Signal:
Scoring:
final_scoreThresholds:
if final_score > 0.33:
recommendation = "BUY"
elif final_score < -0.33:
recommendation = "SELL"
else:
recommendation = "HOLD"
| Data | TTL | Key |
|------|-----|-----|
| Market Context | 1 hour | market_context |
| Fear & Greed | 1 hour | fear_greed |
| VIX Structure | 1 hour | vix_structure |
| Breaking News | 1 hour | breaking_news |
_SENTIMENT_CACHE = {}
_CACHE_TTL_SECONDS = 3600 # 1 hour
def _get_cached(key: str):
if key in _SENTIMENT_CACHE:
value, timestamp = _SENTIMENT_CACHE[key]
if time.time() - timestamp < _CACHE_TTL_SECONDS:
return value
return None
def _set_cache(key: str, value):
_SENTIMENT_CACHE[key] = (value, time.time())
User Input: "AAPL"
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 1. FETCH DATA (yfinance) โ
โ - Stock info, earnings, price history โ
โ - ~2 seconds โ
โโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 2. PARALLEL ANALYSIS โ
โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ โ Earnings โ โFundmtls โ โ Analysts โ ... (sync) โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Market Context (cached or fetch) โ ~1 second โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Sentiment (5 async tasks) โ ~3-5 seconds โ
โ โ - Fear/Greed (cached) โ โ
โ โ - Short Interest โ โ
โ โ - VIX Structure (cached) โ โ
โ โ - Insider Trading (slow!) โ โ
โ โ - Put/Call Ratio โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 3. SYNTHESIZE SIGNAL โ
โ - Combine scores with weights โ
โ - Apply adjustments โ
โ - Generate caveats โ
โ - ~10 ms โ
โโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 4. OUTPUT โ
โ - Text or JSON format โ
โ - Include disclaimer โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
GEOPOLITICAL_RISK_MAP = {
"taiwan": {
"keywords": ["taiwan", "tsmc", "strait"],
"sectors": ["Technology", "Communication Services"],
"affected_tickers": ["NVDA", "AMD", "TSM", ...],
"impact": "Semiconductor supply chain disruption",
},
# ... china, russia_ukraine, middle_east, banking_crisis
}
Process:
def check_breaking_news(verbose: bool = False) -> list[str] | None:
"""Scan Google News RSS for crisis keywords (last 24h)."""
Crisis Keywords:
CRISIS_KEYWORDS = {
"war": ["war", "invasion", "military strike", ...],
"economic": ["recession", "crisis", "collapse", ...],
"regulatory": ["sanctions", "embargo", "ban", ...],
"disaster": ["earthquake", "hurricane", "pandemic", ...],
"financial": ["emergency rate", "bailout", ...],
}
stock-analysis/
โโโ scripts/
โ โโโ analyze_stock.py # Main analysis engine (2500+ lines)
โ โโโ portfolio.py # Portfolio management
โ โโโ dividends.py # Dividend analysis
โ โโโ watchlist.py # Watchlist + alerts
โ โโโ test_stock_analysis.py # Unit tests
โโโ docs/
โ โโโ CONCEPT.md # Philosophy & ideas
โ โโโ USAGE.md # Practical guide
โ โโโ ARCHITECTURE.md # This file
โโโ SKILL.md # OpenClaw skill definition
โโโ README.md # Project overview
โโโ .clawdhub/ # ClawHub metadata
portfolios.json){
"portfolios": [
{
"name": "Retirement",
"created_at": "2024-01-01T00:00:00Z",
"assets": [
{
"ticker": "AAPL",
"quantity": 100,
"cost_basis": 150.00,
"type": "stock",
"added_at": "2024-01-01T00:00:00Z"
}
]
}
]
}
watchlist.json)[
{
"ticker": "NVDA",
"added_at": "2024-01-15T10:30:00Z",
"price_at_add": 700.00,
"target_price": 800.00,
"stop_price": 600.00,
"alert_on_signal": true,
"last_signal": "BUY",
"last_check": "2024-01-20T08:00:00Z"
}
]
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "yfinance>=0.2.40", # Stock data
# "pandas>=2.0.0", # Data manipulation
# "fear-and-greed>=0.4", # CNN Fear & Greed
# "edgartools>=2.0.0", # SEC EDGAR filings
# "feedparser>=6.0.0", # RSS parsing
# ]
# ///
Why These:
yfinance: Most reliable free stock APIpandas: Industry standard for financial datafear-and-greed: Simple CNN F&G wrapperedgartools: Clean SEC EDGAR accessfeedparser: Robust RSS parsing| Operation | Time | |-----------|------| | yfinance fetch | ~2s | | Market context | ~1s (cached after) | | Insider trading | ~3-5s (slowest!) | | Sentiment (parallel) | ~3-5s | | Synthesis | ~10ms | | Total | 5-10s |
--fast)Skips:
Result: 2-3 seconds
max_retries = 3
for attempt in range(max_retries):
try:
# fetch data
except Exception as e:
wait_time = 2 ** attempt # Exponential backoff: 1, 2, 4 seconds
time.sleep(wait_time)
File v6.1.0:docs/CONCEPT.md
Making investment decisions is hard. There's too much data, too many opinions, and too much noise. Most retail investors either:
Stock Analysis provides a structured, multi-dimensional framework that:
Think of it as a second opinion โ not a replacement for your judgment, but a systematic check.
No single metric tells the whole story:
By combining 8 dimensions, we get a more complete picture.
Some of our best signals are contrarian:
| Indicator | Crowd Says | We Interpret | |-----------|------------|--------------| | Extreme Fear (Fear & Greed < 25) | "Sell everything!" | Potential buy opportunity | | Extreme Greed (> 75) | "Easy money!" | Caution, reduce exposure | | High Short Interest + Days to Cover | "Stock is doomed" | Squeeze potential | | Insider Buying | (often ignored) | Smart money signal |
A good stock at the wrong time is a bad trade:
We detect these timing issues and adjust recommendations accordingly.
The same stock behaves differently in different market regimes:
| Regime | Characteristics | Impact | |--------|-----------------|--------| | Bull | VIX < 20, SPY up | BUY signals more reliable | | Bear | VIX > 30, SPY down | Even good stocks fall | | Risk-Off | GLD/TLT/UUP rising | Flight to safety, reduce equity | | Geopolitical | Crisis keywords | Sector-specific penalties |
Income investors have different priorities than growth investors:
| Growth Investor | Income Investor | |-----------------|-----------------| | Price appreciation | Dividend yield | | Revenue growth | Payout sustainability | | Market share | Dividend growth rate | | P/E ratio | Safety of payment |
That's why we have a separate dividend analysis module.
Each dimension captures a different aspect of investment quality:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ FUNDAMENTAL VALUE โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โ โ Earnings โ โ Fundamentals โ โ
โ โ Surprise โ โ (P/E, etc.) โ โ
โ โ (30%) โ โ (20%) โ โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ EXTERNAL VALIDATION โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โ โ Analyst โ โ Historical โ โ
โ โ Sentiment โ โ Patterns โ โ
โ โ (20%) โ โ (10%) โ โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ MARKET ENVIRONMENT โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โ โ Market โ โ Sector โ โ
โ โ Context โ โ Performance โ โ
โ โ (10%) โ โ (15%) โ โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ TECHNICAL & SENTIMENT โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โ โ Momentum โ โ Sentiment โ โ
โ โ (RSI, range) โ โ (Fear, shorts) โ โ
โ โ (15%) โ โ (10%) โ โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Weight | Dimension | Rationale | |--------|-----------|-----------| | 30% | Earnings | Most direct measure of company performance | | 20% | Fundamentals | Long-term value indicators | | 20% | Analysts | Professional consensus (with skepticism) | | 15% | Sector | Relative performance matters | | 15% | Momentum | Trend is your friend (until it isn't) | | 10% | Market | Rising tide lifts all boats | | 10% | Sentiment | Contrarian edge | | 10% | Historical | Past behavior predicts future reactions |
Note: Weights auto-normalize when data is missing.
Warren Buffett's Rule #1. Our risk detection is designed to prevent bad entries:
We err on the side of caution:
That's why our caveats are prominent, and we downgrade BUY โ HOLD liberally.
Crypto is fundamentally different from stocks:
| Stocks | Crypto | |--------|--------| | Earnings | No earnings | | P/E Ratio | Market cap tiers | | Sector ETFs | BTC correlation | | Dividends | Staking yields (not tracked) | | SEC Filings | No filings |
We adapted the framework:
This is a tool, not a crystal ball.
Stock Analysis v6.0 is designed to be your systematic second opinion:
NOT:
Use it wisely. ๐
File v6.1.0:docs/HOT_SCANNER.md
Find viral stocks & crypto trends in real-time by aggregating multiple data sources.
The Hot Scanner answers one question: "What's hot right now?"
It aggregates data from:
# Full scan with all sources
python3 scripts/hot_scanner.py
# Skip social media (faster)
python3 scripts/hot_scanner.py --no-social
# JSON output for automation
python3 scripts/hot_scanner.py --json
============================================================
๐ฅ HOT SCANNER v2 - What's Trending Right Now?
๐
2026-02-02 10:45:30 UTC
============================================================
๐ 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%
๐ ETH Ethereum -7.2%
๐ STOCK MOVERS:
๐ข NVDA (gainers)
๐ด TSLA (losers)
๐ AAPL (most active)
๐ฆ SOCIAL BUZZ:
[twitter] Bitcoin to $100k prediction...
[reddit_wsb] GME yolo update...
๐ฐ BREAKING NEWS:
[BTC, ETH] Crypto crash: $2.5B liquidated...
[NVDA] Nvidia beats earnings expectations...
{
"scan_time": "2026-02-02T10:45:30+00:00",
"top_trending": [
{
"symbol": "BTC",
"mentions": 6,
"sources": ["CoinGecko Trending", "Google News"],
"signals": ["๐ bearish (-2.5%)"]
}
],
"crypto_highlights": [...],
"stock_highlights": [...],
"social_buzz": [...],
"breaking_news": [...]
}
| Endpoint | Data |
|----------|------|
| /search/trending | Top 15 trending coins |
| /coins/markets | Top 100 by market cap with 24h changes |
Scoring: Trending coins get 2 points, movers with >3% change get 1 point.
| Feed | Content | |------|---------| | Business News | General finance headlines | | Crypto Search | Bitcoin, Ethereum, crypto keywords |
Ticker Extraction: Uses regex patterns and company name mappings.
| Page | Data |
|------|------|
| /gainers | Top gaining stocks |
| /losers | Top losing stocks |
| /most-active | Highest volume stocks |
Note: Requires gzip decompression.
Uses bird CLI for Twitter search.
Searches:
stock OR $SPY OR $QQQ OR earningsbitcoin OR ethereum OR crypto OR $BTC# macOS
brew install steipete/tap/bird
# npm
npm install -g @steipete/bird
Option A: Browser cookies (macOS)
bird whoami to verifyOption B: Manual extraction
auth_token and ct0 valuesCreate .env file in the skill directory:
# /path/to/stock-analysis/.env
AUTH_TOKEN=your_auth_token_here
CT0=your_ct0_token_here
Or export as environment variables:
export AUTH_TOKEN="..."
export CT0="..."
bird whoami
# Should show: ๐ @YourUsername
Each mention from a source adds points:
| Source | Points | |--------|--------| | CoinGecko Trending | 2 | | CoinGecko Movers | 1 | | Google News | 1 | | Yahoo Finance | 1 | | Twitter/X | 1 | | Reddit (high score) | 2 | | Reddit (normal) | 1 |
Symbols are ranked by total points across all sources.
# Cashtag: $AAPL
r'\$([A-Z]{1,5})\b'
# Parentheses: (AAPL)
r'\(([A-Z]{2,5})\)'
# Stock mentions: AAPL stock, AAPL shares
r'\b([A-Z]{2,5})(?:\'s|:|\s+stock|\s+shares)'
{
"Apple": "AAPL",
"Microsoft": "MSFT",
"Tesla": "TSLA",
"Nvidia": "NVDA",
"Bitcoin": "BTC",
"Ethereum": "ETH",
# ... etc
}
{
"bitcoin": "BTC",
"ethereum": "ETH",
"solana": "SOL",
"dogecoin": "DOGE",
# ... etc
}
# Daily at 8 AM
0 8 * * * cd /path/to/stock-analysis && python3 scripts/hot_scanner.py --json > cache/daily_scan.json
# Cron job config
name: "๐ฅ Daily Hot Scanner"
schedule:
kind: cron
expr: "0 8 * * *"
tz: "Europe/Berlin"
payload:
kind: agentTurn
message: "Run hot scanner and summarize results"
deliver: true
sessionTarget: isolated
Results are saved to:
cache/hot_scan_latest.json โ Most recent scan# Check auth
bird whoami
# Should see your username
# If not, re-export tokens
The scanner handles gzip automatically. If issues persist, Yahoo may be rate-limiting.
Check that news headlines contain recognizable patterns. The scanner uses conservative extraction to avoid false positives.
File v6.1.0:docs/USAGE.md
Practical examples for using Stock Analysis v6.0 in real scenarios.
uv run scripts/analyze_stock.py AAPL
Output:
===========================================================================
STOCK ANALYSIS: AAPL (Apple Inc.)
Generated: 2024-02-01T10:30:00
===========================================================================
RECOMMENDATION: BUY (Confidence: 72%)
SUPPORTING POINTS:
โข Beat by 8.2% - EPS $2.18 vs $2.01 expected
โข Strong margin: 24.1%
โข Analyst consensus: Buy with 12.3% upside (42 analysts)
โข Momentum: RSI 58 (neutral)
โข Sector: Technology uptrend (+5.2% 1m)
CAVEATS:
โข Earnings in 12 days - high volatility expected
โข High market volatility (VIX 24)
===========================================================================
DISCLAIMER: NOT FINANCIAL ADVICE.
===========================================================================
For programmatic use:
uv run scripts/analyze_stock.py AAPL --output json | jq '.recommendation, .confidence'
See what's happening under the hood:
uv run scripts/analyze_stock.py AAPL --verbose
uv run scripts/analyze_stock.py AAPL MSFT GOOGL
Each stock gets a full analysis. Compare recommendations and confidence levels.
Compare stocks in the same sector:
# Banks
uv run scripts/analyze_stock.py JPM BAC WFC GS
# Tech
uv run scripts/analyze_stock.py AAPL MSFT GOOGL AMZN META
uv run scripts/analyze_stock.py BTC-USD
Crypto-Specific Output:
uv run scripts/analyze_stock.py BTC-USD ETH-USD SOL-USD
BTC, ETH, BNB, SOL, XRP, ADA, DOGE, AVAX, DOT, MATIC,
LINK, ATOM, UNI, LTC, BCH, XLM, ALGO, VET, FIL, NEAR
Use -USD suffix: BTC-USD, ETH-USD, etc.
uv run scripts/dividends.py JNJ
Output:
============================================================
DIVIDEND ANALYSIS: JNJ (Johnson & Johnson)
============================================================
Current Price: $160.50
Annual Dividend: $4.76
Dividend Yield: 2.97%
Payment Freq: quarterly
Ex-Dividend: 2024-02-15
Payout Ratio: 65.0% (moderate)
5Y Div Growth: +5.8%
Consecutive Yrs: 62
SAFETY SCORE: 78/100
INCOME RATING: GOOD
Safety Factors:
โข Moderate payout ratio (65%)
โข Good dividend growth (+5.8% CAGR)
โข Dividend Aristocrat (62+ years)
Dividend History:
2023: $4.52
2022: $4.36
2021: $4.24
2020: $4.04
2019: $3.80
============================================================
uv run scripts/dividends.py JNJ PG KO MCD VZ T
Look for stocks with:
uv run scripts/portfolio.py create "Retirement"
# Stocks
uv run scripts/portfolio.py add AAPL --quantity 100 --cost 150.00
# Crypto
uv run scripts/portfolio.py add BTC-USD --quantity 0.5 --cost 40000
uv run scripts/portfolio.py show
Output:
Portfolio: Retirement
====================
Assets:
AAPL 100 shares @ $150.00 = $15,000.00
Current: $185.00 = $18,500.00 (+23.3%)
BTC-USD 0.5 @ $40,000 = $20,000.00
Current: $45,000 = $22,500.00 (+12.5%)
Total Cost: $35,000.00
Current Value: $41,000.00
Total P&L: +$6,000.00 (+17.1%)
# Full analysis of all holdings
uv run scripts/analyze_stock.py --portfolio "Retirement"
# With period returns
uv run scripts/analyze_stock.py --portfolio "Retirement" --period monthly
The analysis flags concentration warnings:
โ ๏ธ CONCENTRATION WARNINGS:
โข AAPL: 45.1% (>30% of portfolio)
# Basic watch
uv run scripts/watchlist.py add NVDA
# With price target
uv run scripts/watchlist.py add NVDA --target 800
# With stop loss
uv run scripts/watchlist.py add NVDA --stop 600
# Alert on signal change
uv run scripts/watchlist.py add NVDA --alert-on signal
# All options
uv run scripts/watchlist.py add NVDA --target 800 --stop 600 --alert-on signal
uv run scripts/watchlist.py list
Output:
{
"success": true,
"items": [
{
"ticker": "NVDA",
"current_price": 725.50,
"price_at_add": 700.00,
"change_pct": 3.64,
"target_price": 800.00,
"to_target_pct": 10.27,
"stop_price": 600.00,
"to_stop_pct": -17.30,
"alert_on_signal": true,
"last_signal": "BUY",
"added_at": "2024-01-15"
}
],
"count": 1
}
# Check for triggered alerts
uv run scripts/watchlist.py check
# Format for notification (Telegram)
uv run scripts/watchlist.py check --notify
Alert Example:
๐ข Stock Alerts
๐ฏ NVDA hit target! $802.50 >= $800.00
๐ TSLA hit stop! $195.00 <= $200.00
๐ AAPL signal changed: HOLD โ BUY
uv run scripts/watchlist.py remove NVDA
Skip slow analyses for quick checks:
# Skip insider trading + breaking news
uv run scripts/analyze_stock.py AAPL --fast
Speed comparison:
| Mode | Time | What's Skipped |
|------|------|----------------|
| Default | 5-10s | Nothing |
| --no-insider | 3-5s | SEC EDGAR |
| --fast | 2-3s | Insider + News |
Analyze multiple stocks in one command:
uv run scripts/analyze_stock.py AAPL MSFT GOOGL AMZN META
Market context is cached for 1 hour:
Second analysis of different stock reuses cached data.
| Score | Recommendation | |-------|----------------| | > +0.33 | BUY | | -0.33 to +0.33 | HOLD | | < -0.33 | SELL |
| Confidence | Meaning | |------------|---------| | > 80% | Strong conviction | | 60-80% | Moderate conviction | | 40-60% | Mixed signals | | < 40% | Low conviction |
Always read the caveats! They often contain critical information:
CAVEATS:
โข Earnings in 5 days - high volatility expected โ Timing risk
โข RSI 78 (overbought) + near 52w high โ Technical risk
โข โ ๏ธ BREAKING NEWS: Fed emergency rate discussion
Archive v6.0.0: 10 files, 50773 bytes
Files: App-Plan.md (14708b), README.md (4321b), scripts/analyze_stock.py (89930b), scripts/dividends.py (13130b), scripts/portfolio.py (18897b), scripts/test_stock_analysis.py (11958b), scripts/watchlist.py (11542b), SKILL.md (5674b), TODO.md (12848b), _meta.json (133b)
Archive v5.0.0: 7 files, 41538 bytes
Files: App-Plan.md (14708b), README.md (3295b), scripts/analyze_stock.py (88970b), scripts/portfolio.py (18897b), SKILL.md (8381b), TODO.md (12848b), _meta.json (133b)
Archive v4.0.0: 4 files, 25321 bytes
Files: scripts/analyze_stock.py (69140b), SKILL.md (6322b), TODO.md (12243b), _meta.json (133b)
Archive v3.5.0: 4 files, 20870 bytes
Files: scripts/analyze_stock.py (55960b), SKILL.md (4867b), TODO.md (12243b), _meta.json (133b)
Archive v3.0.0: 3 files, 15312 bytes
Files: scripts/analyze_stock.py (53567b), SKILL.md (4829b), _meta.json (133b)
Archive v2.0.0: 3 files, 11767 bytes
Files: scripts/analyze_stock.py (39895b), SKILL.md (3674b), _meta.json (133b)
Archive v1.0.1: 3 files, 7117 bytes
Files: scripts/analyze_stock.py (20374b), SKILL.md (2532b), _meta.json (133b)
Archive v1.0.0: 3 files, 6902 bytes
Files: scripts/analyze_stock.py (20374b), SKILL.md (2080b), _meta.json (133b)
Machine endpoints, contract coverage, trust signals, runtime metrics, benchmarks, and guardrails for agent-to-agent use.
Machine interfaces
Contract coverage
Status
missing
Auth
None
Streaming
No
Data region
Unspecified
Protocol support
Requires: none
Forbidden: none
Guardrails
Operational confidence: low
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-udiedrichsen-stock-analysis/snapshot"
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-udiedrichsen-stock-analysis/contract"
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-udiedrichsen-stock-analysis/trust"
Operational fit
Trust signals
Handshake
UNKNOWN
Confidence
unknown
Attempts 30d
unknown
Fallback rate
unknown
Runtime metrics
Observed P50
unknown
Observed P95
unknown
Rate limit
unknown
Estimated cost
unknown
Do not use if
Raw contract, invocation, trust, capability, facts, and change-event payloads for machine-side inspection.
Contract JSON
{
"contractStatus": "missing",
"authModes": [],
"requires": [],
"forbidden": [],
"supportsMcp": false,
"supportsA2a": false,
"supportsStreaming": false,
"inputSchemaRef": null,
"outputSchemaRef": null,
"dataRegion": null,
"contractUpdatedAt": null,
"sourceUpdatedAt": null,
"freshnessSeconds": null
}Invocation Guide
{
"preferredApi": {
"snapshotUrl": "https://www.xpersona.co/api/v1/agents/clawhub-udiedrichsen-stock-analysis/snapshot",
"contractUrl": "https://www.xpersona.co/api/v1/agents/clawhub-udiedrichsen-stock-analysis/contract",
"trustUrl": "https://www.xpersona.co/api/v1/agents/clawhub-udiedrichsen-stock-analysis/trust"
},
"curlExamples": [
"curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-udiedrichsen-stock-analysis/snapshot\"",
"curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-udiedrichsen-stock-analysis/contract\"",
"curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-udiedrichsen-stock-analysis/trust\""
],
"jsonRequestTemplate": {
"query": "summarize this repo",
"constraints": {
"maxLatencyMs": 2000,
"protocolPreference": [
"OPENCLEW"
]
}
},
"jsonResponseTemplate": {
"ok": true,
"result": {
"summary": "...",
"confidence": 0.9
},
"meta": {
"source": "CLAWHUB",
"generatedAt": "2026-10-08T22:20:12.880Z"
}
},
"retryPolicy": {
"maxAttempts": 3,
"backoffMs": [
500,
1500,
3500
],
"retryableConditions": [
"HTTP_429",
"HTTP_503",
"NETWORK_TIMEOUT"
]
}
}Trust JSON
{
"status": "unavailable",
"handshakeStatus": "UNKNOWN",
"verificationFreshnessHours": null,
"reputationScore": null,
"p95LatencyMs": null,
"successRate30d": null,
"fallbackRate": null,
"attempts30d": null,
"trustUpdatedAt": null,
"trustConfidence": "unknown",
"sourceUpdatedAt": null,
"freshnessSeconds": null
}Capability Matrix
{
"rows": [
{
"key": "OPENCLEW",
"type": "protocol",
"support": "unknown",
"confidenceSource": "profile",
"notes": "Listed on profile"
}
],
"flattenedTokens": "protocol:OPENCLEW|unknown|profile"
}Facts JSON
[
{
"factKey": "vendor",
"label": "Vendor",
"value": "Clawhub",
"category": "vendor",
"href": "https://clawhub.ai/udiedrichsen/stock-analysis",
"sourceUrl": "https://clawhub.ai/udiedrichsen/stock-analysis",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-05-31T06:21:41.781Z",
"isPublic": true,
"metadata": {}
},
{
"factKey": "protocols",
"label": "Protocol compatibility",
"value": "OpenClaw",
"category": "compatibility",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-udiedrichsen-stock-analysis/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-udiedrichsen-stock-analysis/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-05-31T06:21:41.781Z",
"isPublic": true,
"metadata": {}
},
{
"factKey": "traction",
"label": "Adoption signal",
"value": "52.3K downloads",
"category": "adoption",
"href": "https://clawhub.ai/udiedrichsen/stock-analysis",
"sourceUrl": "https://clawhub.ai/udiedrichsen/stock-analysis",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-05-31T06:21:41.781Z",
"isPublic": true,
"metadata": {}
},
{
"factKey": "latest_release",
"label": "Latest release",
"value": "6.2.0",
"category": "release",
"href": "https://clawhub.ai/udiedrichsen/stock-analysis",
"sourceUrl": "https://clawhub.ai/udiedrichsen/stock-analysis",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-02-02T14:09:13.575Z",
"isPublic": true,
"metadata": {}
},
{
"factKey": "handshake_status",
"label": "Handshake status",
"value": "UNKNOWN",
"category": "security",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-udiedrichsen-stock-analysis/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-udiedrichsen-stock-analysis/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true,
"metadata": {}
}
]Change Events JSON
[
{
"eventType": "release",
"title": "Release 6.2.0",
"description": "๐ฎ Rumor Scanner: M&A rumors, insider activity, Twitter whispers, impact scoring",
"href": "https://clawhub.ai/udiedrichsen/stock-analysis",
"sourceUrl": "https://clawhub.ai/udiedrichsen/stock-analysis",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-02-02T14:09:13.575Z",
"isPublic": true,
"metadata": {}
}
]Sponsored
Ads related to Stock Analysis and adjacent AI workflows.