Install
openclaw skills install stock-alert-workflowAnalyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management (create, add, remove assets), crypto analysis (Top 20 by market cap), periodic performance reports (daily/weekly/monthly/quarterly/yearly), and earnings surprise alerts with WhatsApp push. 8 analysis dimensions for stocks, 3 for crypto. Use for stock analysis, portfolio tracking, earnings reactions, or crypto monitoring.
openclaw skills install stock-alert-workflowAnalyze US stocks and cryptocurrencies using Yahoo Finance data. Includes portfolio management, crypto support, periodic analysis, and earnings surprise alerts with WhatsApp push.
IMPORTANT: Pass ONLY the stock ticker symbol(s) as arguments. Do NOT add extra text, headers, or formatting in the command.
Analyze a single ticker:
uv run {baseDir}/scripts/analyze_stock.py AAPL
uv run {baseDir}/scripts/analyze_stock.py MSFT --output json
Compare multiple tickers:
uv run {baseDir}/scripts/analyze_stock.py AAPL MSFT GOOGL
Analyze top 20 cryptocurrencies by market cap:
uv run {baseDir}/scripts/analyze_stock.py BTC-USD
uv run {baseDir}/scripts/analyze_stock.py ETH-USD SOL-USD
Supported Cryptos: BTC-USD, ETH-USD, BNB-USD, SOL-USD, XRP-USD, ADA-USD, DOGE-USD, AVAX-USD, DOT-USD, MATIC-USD, LINK-USD, ATOM-USD, UNI-USD, LTC-USD, BCH-USD, XLM-USD, ALGO-USD, VET-USD, FIL-USD, NEAR-USD
Crypto Analysis Dimensions:
Create and manage portfolios with mixed assets (stocks + crypto):
# Create portfolio
uv run {baseDir}/scripts/portfolio.py create "My Portfolio"
# Add assets
uv run {baseDir}/scripts/portfolio.py add AAPL --quantity 100 --cost 150.00
uv run {baseDir}/scripts/portfolio.py add BTC-USD --quantity 0.5 --cost 40000 --portfolio "My Portfolio"
# View holdings with current P&L
uv run {baseDir}/scripts/portfolio.py show
# Update/remove assets
uv run {baseDir}/scripts/portfolio.py update AAPL --quantity 150
uv run {baseDir}/scripts/portfolio.py remove BTC-USD
# List/delete portfolios
uv run {baseDir}/scripts/portfolio.py list
uv run {baseDir}/scripts/portfolio.py delete "My Portfolio"
Portfolio Storage: ~/.clawdbot/skills/stock-analysis/portfolios.json
Analyze all assets in a portfolio with optional period returns:
# Analyze portfolio
uv run {baseDir}/scripts/analyze_stock.py --portfolio "My Portfolio"
# With period returns (daily/weekly/monthly/quarterly/yearly)
uv run {baseDir}/scripts/analyze_stock.py --portfolio "My Portfolio" --period weekly
uv run {baseDir}/scripts/analyze_stock.py -p "My Portfolio" --period monthly
Portfolio Summary includes:
Examples:
uv run {baseDir}/scripts/analyze_stock.py BACuv run {baseDir}/scripts/analyze_stock.py BTC-USDuv run {baseDir}/scripts/analyze_stock.py === BANK OF AMERICA (BAC) - Q4 2025 EARNINGS ===uv run {baseDir}/scripts/analyze_stock.py "Bank of America"Use the ticker symbol only (e.g., BAC, not "Bank of America"). For crypto, use the -USD suffix (e.g., BTC-USD).
The script evaluates eight key dimensions:
Sentiment Sub-Indicators:
Weights auto-normalize if some components unavailable.
Special Timing Checks:
The script detects high-risk scenarios:
The script now scans breaking news (last 24h) for crisis keywords and automatically flags affected stocks:
If a ticker is not in the affected list but its sector is exposed, applies a 15% confidence penalty.
Example Alert:
⚠️ SECTOR RISK: Tech supply chain and consumer market exposure (detected: china, tariff)
Default (text): Concise buy/hold/sell signal with 3-5 bullet points and caveats
JSON: Structured data with scores, metrics, and raw data for further analysis
Scan tickers for EPS surprises exceeding a threshold (default 10%), fetch recent analyst ratings (last 30 days), and generate a WhatsApp-ready alert message.
# Scan specific tickers
uv run {baseDir}/scripts/earnings_alert.py AAPL MSFT GOOGL
# Use a watchlist file
uv run {baseDir}/scripts/earnings_alert.py --watchlist ~/.clawdbot/skills/stock-analysis/watchlist.txt
# Custom threshold and lookback
uv run {baseDir}/scripts/earnings_alert.py AAPL --threshold 15 --days 60
# JSON output for programmatic use
uv run {baseDir}/scripts/earnings_alert.py AAPL --output json
Workflow Steps:
WhatsApp Push Integration:
After generating alerts, use the wacli skill or OpenClaw's message tool to push the text output to WhatsApp:
# Generate alert and send via OpenClaw message tool
ALERT=$(uv run {baseDir}/scripts/earnings_alert.py AAPL MSFT 2>/dev/null)
# Then use message tool: action=send, channel=whatsapp, message=$ALERT
Watchlist Format (one ticker per line, # comments supported):
# My earnings watchlist
AAPL
MSFT
GOOGL
NVDA
Default watchlist path: ~/.clawdbot/skills/stock-analysis/watchlist.txt
The script gracefully handles: