Stock Alert Workflow — Stock Alert 工作流
v5.1Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management (创建, 添加, 移除 as设置s), crypto analysis (Top 20 by market cap), periodic performance 报告s (dAIly/weekly/monthly/quarterly/yearly), and earnings surprise alerts with Whats应用 push. 8 analysis dimensions for stocks, 3 for crypto. Use for stock analysis, portfolio 追踪ing, earnings reactions, or crypto 监控ing.
运行时依赖
安装命令
点击复制技能文档
Stock Analysis (v5.1)
Analyze US stocks and cryptocurrencies using Yahoo Finance data. Includes portfolio management, crypto support, periodic analysis, and earnings surprise alerts with Whats应用 push.
Quick 启动
导入ANT: Pass ONLY the stock ticker symbol(s) as arguments. Do NOT 添加 extra text, headers, or 格式化ting in the command.
Analyze a single ticker:
uv 运行 {baseDir}/scripts/analyze_stock.py AAPL uv 运行 {baseDir}/scripts/analyze_stock.py MSFT --输出 json
Compare multiple tickers:
uv 运行 {baseDir}/scripts/analyze_stock.py AAPL MSFT GOOGL
Cryptocurrency Analysis (v5.0)
Analyze top 20 cryptocurrencies by market cap:
uv 运行 {baseDir}/scripts/analyze_stock.py BTC-USD uv 运行 {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:
Market cap (large/mid/small classification) Category (Smart Contract L1, DeFi, Payment, etc.) BTC correlation (30-day) Momentum (RSI, price range) Market 上下文 (VIX, general market regime) Portfolio Management (v5.0)
创建 and manage portfolios with mixed as设置s (stocks + crypto):
# 创建 portfolio uv 运行 {baseDir}/scripts/portfolio.py 创建 "My Portfolio"
# 添加 as设置s uv 运行 {baseDir}/scripts/portfolio.py 添加 AAPL --quantity 100 --cost 150.00 uv 运行 {baseDir}/scripts/portfolio.py 添加 BTC-USD --quantity 0.5 --cost 40000 --portfolio "My Portfolio"
# View holdings with current P&L uv 运行 {baseDir}/scripts/portfolio.py show
# 更新/移除 as设置s uv 运行 {baseDir}/scripts/portfolio.py 更新 AAPL --quantity 150 uv 运行 {baseDir}/scripts/portfolio.py 移除 BTC-USD
# 列出/删除 portfolios uv 运行 {baseDir}/scripts/portfolio.py 列出 uv 运行 {baseDir}/scripts/portfolio.py 删除 "My Portfolio"
Portfolio Storage: ~/.clawd机器人/技能s/stock-analysis/portfolios.json
Portfolio Analysis (v5.0)
Analyze all as设置s in a portfolio with optional period returns:
# Analyze portfolio uv 运行 {baseDir}/scripts/analyze_stock.py --portfolio "My Portfolio"
# With period returns (dAIly/weekly/monthly/quarterly/yearly) uv 运行 {baseDir}/scripts/analyze_stock.py --portfolio "My Portfolio" --period weekly uv 运行 {baseDir}/scripts/analyze_stock.py -p "My Portfolio" --period monthly
Portfolio Summary includes:
Total cost, current value, P&L Period return (if specified) Concentration 警告s (>30% in single as设置) Recommendation summary (BUY/HOLD/SELL counts)
Examples:
✅ CORRECT: uv 运行 {baseDir}/scripts/analyze_stock.py BAC ✅ CORRECT: uv 运行 {baseDir}/scripts/analyze_stock.py BTC-USD ❌ WRONG: uv 运行 {baseDir}/scripts/analyze_stock.py === BANK OF AMERICA (BAC) - Q4 2025 EARNINGS === ❌ WRONG: uv 运行 {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).
Analysis 组件s
The script evaluates eight key dimensions:
Earnings Surprise (30% weight): Actual vs expected EPS, revenue beats/misses Fundamentals (20% weight): P/E ratio, profit margins, revenue growth, debt levels Analyst Sentiment (20% weight): Consensus ratings, price tar获取 vs current price Historical Patterns (10% weight): Past earnings reactions, volatility Market 上下文 (10% weight): VIX, SPY/QQQ trends, market regime Sector Performance (15% weight): Stock vs sector comparison, sector trends Momentum (15% weight): RSI, 52-week range, volume, relative strength Sentiment Analysis (10% weight): Fear/Greed 索引, short interest, VIX term structure, insider trading, put/call ratio
Sentiment Sub-Indicators:
Fear & Greed 索引 (CNN): Contrarian 签名al (extreme fear = buy opportunity, extreme greed = caution) Short Interest: High shorts + squeeze potential = bullish; justified shorts = bearish VIX Term Structure: Contango = complacency/bullish; backwardation = stress/bearish Insider Activity: Net buying/selling from SEC Form 4 filings (90-day window) Put/Call Ratio: High ratio = excessive fear/bullish; low ratio = complacency/bearish
Weights auto-normalize if some 组件s unavAIlable.
Special Timing 检查s:
Pre-earnings 警告 (< 14 days): Recommends HOLD instead of BUY Post-earnings spike 检测ion (> 15% in 5 days): Flags "gAIns priced in" Overbought conditions (RSI > 70 + near 52w high): Reduces confidence Timing 警告s & Risk Flags
The script 检测s high-risk scenarios:
Earnings Timing Pre-Earnings Period: If earnings < 14 days away, BUY 签名als become HOLD Post-Earnings Spike: If stock up > 15% in 5 days after earnings, warns "gAIns may be priced in" Technical Risk Overbought Conditions: RSI > 70 + near 52-week high = high-risk entry Market Risk High VIX: Market fear (VIX > 30) reduces confidence in BUY 签名als Risk-Off Mode (v4.0.0): When safe-havens (GLD, TLT, UUP) rise to获取her, reduces BUY confidence by 30% 检测s flight to safety across gold, treasuries, and