technical-analysis
Scannednpx machina-cli add skill staskh/trading_skills/technical-analysis --openclawTechnical Analysis
Compute technical indicators using pandas-ta. Supports multi-symbol analysis and earnings data.
Instructions
Note: If
uvis not installed orpyproject.tomlis not found, replaceuv run pythonwithpythonin 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.,AAPLorAAPL,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 changeindicators- Computed values for each indicatorrisk_metrics- Volatility (annualized %) and Sharpe ratiosignals- Buy/sell signals based on indicator levelsearnings- Upcoming date and EPS history (if--earnings)
Multiple symbols returns:
results- Array of individual symbol results
Interpretation
- RSI > 70 = overbought, RSI < 30 = oversold
- MACD crossover = momentum shift
- 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 analyzedperiod- Time period usedcorrelation_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
numpypandaspandas-tayfinance
Source
git clone https://github.com/staskh/trading_skills/blob/main/.claude/skills/technical-analysis/SKILL.mdView on GitHub Overview
This skill computes a suite of technical indicators for stocks using pandas-ta, supporting single or multi-symbol analysis. It covers RSI, MACD, Bollinger Bands, SMA, EMA, and more, producing price data, indicators values, risk metrics, and buy/sell signals, with optional earnings data.
How This Skill Works
The tool fetches historical data, applies selected indicators via pandas-ta, and returns a structured result per symbol (price, indicators, risk_metrics, signals, earnings). You can control behavior with --period, --indicators, and --earnings, including multi-symbol analyses.
When to Use It
- When you want momentum guidance from RSI or MACD to confirm entry/exit points
- When assessing price behavior near Bollinger Bands for potential reversals
- When evaluating trend signals such as Golden Cross from SMA20/SMA50
- When measuring volatility and risk-adjusted performance with Sharpe ratio and annualized volatility
- When you need earnings data alongside indicators for a fuller picture
Quick Start
- Step 1: Run uv run python scripts/technicals.py SYMBOL [--period PERIOD] [--indicators INDICATORS] [--earnings]
- Step 2: Review the output fields: price, indicators, risk_metrics, signals, earnings (if requested)
- Step 3: Use the signals to guide entries/exits and re-run with adjusted indicators or period as needed
Best Practices
- Limit indicators with --indicators to reduce noise and focus on where you have edge
- Use multiple indicators for confirmation rather than relying on a single signal
- Cross-check RSI with MACD and moving averages to validate momentum
- Choose an appropriate period (--period) that matches your trading horizon (1mo, 3mo, 6mo, 1y)
- If using earnings, compare indicator signals before/after earnings announcements
Example Use Cases
- uv run python scripts/technicals.py AAPL
- uv run python scripts/technicals.py AAPL,MSFT --indicators rsi,macd
- uv run python scripts/technicals.py NVDA --earnings
- uv run python scripts/technicals.py TSLA --period 6mo --indicators bb,sma,ema
- uv run python scripts/technicals.py AAPL --indicators rsi,bb --earnings