Agent Skillsstaskh/trading_skills › technical-analysis

technical-analysis

GitHub

计算RSI、MACD等技术指标及相关性矩阵,支持多股票分析与财报数据。提供买卖信号、风险指标解读及交叉确认,辅助投资决策。

.claude/skills/technical-analysis/SKILL.md staskh/trading_skills

Trigger Scenarios

询问技术指标如RSI、MACD 请求技术分析或图表分析 查询超买超卖状态 需要计算股票间相关性

Install

npx skills add staskh/trading_skills --skill technical-analysis -g -y
More Options

Non-standard path

npx skills add https://github.com/staskh/trading_skills/tree/main/.claude/skills/technical-analysis -g -y

Use without installing

npx skills use staskh/trading_skills@technical-analysis

指定 Agent (Claude Code)

npx skills add staskh/trading_skills --skill technical-analysis -a claude-code -g -y

安装 repo 全部 skill

npx skills add staskh/trading_skills --all -g -y

预览 repo 内 skill

npx skills add staskh/trading_skills --list

SKILL.md

Frontmatter
{
    "name": "technical-analysis",
    "description": "Compute technical indicators like RSI, MACD, Bollinger Bands, SMA, EMA for a stock. Use when user asks about technical analysis, indicators, RSI, MACD, moving averages, overbought\/oversold, or chart analysis.",
    "dependencies": [
        "trading-skills"
    ]
}

Technical Analysis

Compute technical indicators using pandas-ta. Supports multi-symbol analysis and earnings data.

Instructions

Note: If uv is not installed or pyproject.toml is not found, replace uv run python with python in all commands below.

uv run python scripts/technicals.py SYMBOL [--period PERIOD] [--indicators INDICATORS] [--earnings]

Arguments

  • SYMBOL - Ticker symbol or comma-separated list (e.g., AAPL or AAPL,MSFT,GOOGL)
  • --period - Historical period: 1mo, 3mo, 6mo, 1y (default: 3mo)
  • --indicators - Comma-separated list: rsi,macd,bb,sma,ema,atr,adx (default: all)
  • --earnings - Include earnings data (upcoming date + history)

Output

Single symbol returns:

  • price - Current price and recent change
  • indicators - Computed values for each indicator
  • risk_metrics - Volatility (annualized %) and Sharpe ratio
  • signals - Buy/sell signals based on indicator levels
  • earnings - Upcoming date and EPS history (if --earnings)

Multiple symbols returns:

  • results - Array of individual symbol results

Crossovers

  • indicators.macd.crossover - Most recent MACD line/signal crossover, or null:
    • direction - "up" (MACD crossed above signal = bullish) or "down" (crossed below = bearish)
    • days_ago - Trading bars since the crossover (0 = happened on the most recent bar)
  • indicators.ema.crossover - Most recent EMA9/EMA21 crossover (same shape; null if none). indicators.ema also reports ema9 and ema21 alongside ema12/ema26.

Interpretation

  • RSI > 70 = overbought, RSI < 30 = oversold
  • MACD crossover = momentum shift; crossover.days_ago of 0-5 = fresh signal
  • EMA9/21 crossover confirms short-term momentum; MACD typically leads, EMA confirms
  • Price near Bollinger Band = potential reversal
  • Golden cross (SMA20 > SMA50) = bullish
  • ADX > 25 = strong trend
  • Sharpe ratio > 1 = good risk-adjusted returns, > 2 = excellent
  • Volatility (annualized) = standard deviation of returns scaled to annual basis

Examples

# Single symbol with all indicators
uv run python scripts/technicals.py AAPL

# Multiple symbols
uv run python scripts/technicals.py AAPL,MSFT,GOOGL

# With earnings data
uv run python scripts/technicals.py NVDA --earnings

# Specific indicators only
uv run python scripts/technicals.py TSLA --indicators rsi,macd

Correlation Analysis

Compute price correlation matrix between multiple symbols for diversification analysis.

Instructions

uv run python scripts/correlation.py SYMBOLS [--period PERIOD]

Arguments

  • SYMBOLS - Comma-separated ticker symbols (minimum 2)
  • --period - Historical period: 1mo, 3mo, 6mo, 1y (default: 3mo)

Output

  • symbols - List of symbols analyzed
  • period - Time period used
  • correlation_matrix - Nested dict with correlation values between all pairs

Interpretation

  • Correlation near 1.0 = highly correlated (move together)
  • Correlation near -1.0 = negatively correlated (move opposite)
  • Correlation near 0 = uncorrelated (independent movement)
  • For diversification, prefer low/negative correlations

Examples

# Portfolio correlation
uv run python scripts/correlation.py AAPL,MSFT,GOOGL,AMZN

# Sector comparison
uv run python scripts/correlation.py XLF,XLK,XLE,XLV --period 6mo

# Check hedge effectiveness
uv run python scripts/correlation.py SPY,GLD,TLT

Dependencies

  • numpy
  • pandas
  • pandas-ta
  • yfinance

Timezone

All timestamps and time-based calculations must use the America/New_York timezone. All JSON output must include generated_at (NY time string) and data_delay fields.

Version History

  • c0c554f Current 2026-07-19 12:06

    修复MACD信号与直方图列错位导致的指标计算错误;新增MACD和EMA交叉检测功能;增加相关性分析模块以支持多资产分散投资评估。

  • cc30858 2026-07-05 11:05

Dependencies

  • required trading-skills

Same Skill Collection

.claude/skills/earnings-calendar/SKILL.md
.claude/skills/fundamentals/SKILL.md
.claude/skills/greeks/SKILL.md
.claude/skills/ib-account/SKILL.md
.claude/skills/ib-collar/SKILL.md
.claude/skills/ib-create-consolidated-report/SKILL.md
.claude/skills/ib-find-short-roll/SKILL.md
.claude/skills/ib-option-chain/SKILL.md
.claude/skills/ib-pmcc-advisor/SKILL.md
.claude/skills/ib-portfolio-action-report/SKILL.md
.claude/skills/ib-portfolio/SKILL.md
.claude/skills/ib-report-delta-adjusted-notional-exposure/SKILL.md
.claude/skills/ib-stop-loss/SKILL.md
.claude/skills/ib-trades-history/SKILL.md
.claude/skills/ib-trailing-stop/SKILL.md
.claude/skills/insider-trading/SKILL.md
.claude/skills/markdown-to-pdf/SKILL.md
.claude/skills/news-sentiment/SKILL.md
.claude/skills/option-chain/SKILL.md
.claude/skills/price-history/SKILL.md
.claude/skills/report-stock/SKILL.md
.claude/skills/risk-assessment/SKILL.md
.claude/skills/scanner-bullish/SKILL.md
.claude/skills/scanner-pmcc/SKILL.md
.claude/skills/spread-analysis/SKILL.md
.claude/skills/stock-quote/SKILL.md
.claude/skills/whale-hunting/SKILL.md

Metadata

Files
0
Version
c0c554f
Hash
c2ddc904
Indexed
2026-07-05 11:05

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-30 17:14
浙ICP备14020137号-1 $Carte des visiteurs$