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.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Technical Analysis?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/staskh-technical-analysis)
---
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.
```bash
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)
- `bars_ago` - Bars since the crossover (0 = happened on the most recent bar); trading days on the default daily bars
- `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.bars_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
```bash
# 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
```
---
# Intraday Technical Analysis
Same RSI/MACD/ADX-DMI math as above, computed on intraday (sub-daily) bars instead of daily closes. Daily-period indicators barely move within a single session — a whole trading day can pass with ADX unchanged to two decimal places — so they're the wrong tool for monitoring a position you plan to hold hours, not weeks. Use this for same-day/next-day position checks (day-trade or 1-3 day scalp monitoring); use the daily version above for swing/multi-week positions, or once at the start of a monitoring series as slower-moving regime context.
## Instructions
```bash
uv run python scripts/intraday_technicals.py SYMBOL [--interval INTERVAL] [--period PERIOD]
```
## Arguments
- `SYMBOL` - Ticker symbol
- `--interval` - Bar size: `1m`,`2m`,`5m`,`15m`,`30m`,`60m` (default: `5m`)
- `--period` - History to compute on: `5d` or `1mo`. Default: `5d` for `1m`–`15m`, `1mo` for `30m`/`60m`
Indicators carry across sessions, as on charting platforms: the script always computes on several prior sessions, so RSI/EMA/MACD/ADX are warmed up at the open instead of restarting from scratch each morning.
## Output
- `bars` - Bars the indicators were computed on (all sessions in `period`).
- `price` - `current`; `prev_close` (the prior session's official close from daily bars; falls back to its last intraday bar); `change`/`change_pct` vs. `prev_close`; `session_date` and `session_bars` for the current session.
- `warnings` - Names each indicator that doesn't yet have enough bars: RSI 15, EMA21 21, ADX 28, MACD signal 34. With the default `period` this only fires on thin history (new listings, long halts).
- `indicators.rsi`, `.macd` (`macd`/`signal`/`histogram`/`prev_histogram`), `.adx` (`adx`/`dmp`/`dmn`) - same fields and interpretation as the daily version.
- `indicators.ema` - `ema9`, `ema21`, and `crossover` with `direction`, `bars_ago` and `crossed_at` (timestamp of the crossover bar, ET). Use `crossed_at` for elapsed time across session gaps.
## Examples
```bash
# Default: 5-minute bars, computed on the last 5 sessions
uv run python scripts/intraday_technicals.py MU
# 15-minute bars for a slightly steadier read
uv run python scripts/intraday_technicals.py MU --interval 15m
# Hourly bars (computed on a month of history)
uv run python scripts/intraday_technicals.py MU --interval 60m
```
## Gotcha
`compute_raw_indicators` returns `null` for an indicator until it has enough bars (RSI and ADX from 15, EMA21 from 21, the MACD signal line from 34), so a null-check catches the missing ones. It does not catch ADX between 15 and 28 bars: `pandas_ta` emits a number there, but ADX smooths twice and that value is still warm-up noise. `warnings` covers that range — read it, not just the nulls.
---
# Correlation Analysis
Compute price correlation matrix between multiple symbols for diversification analysis.
## Instructions
```bash
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
```bash
# 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.