⇄ConnectorFinanceFree
stockstats — Technical Indicator Library
Lightweight BSD-licensed Python library providing 80+ stock technical indicators (RSI, MACD, Bollinger Bands, ATR) as simple DataFrame column lookups.
stockstats — Technical Indicator Library
stockstats wraps pandas DataFrames to auto-compute 80+ technical indicators via simple column-name magic — df["close_20_sma"], df["rsi_14"], df["macd"] — making it trivial to build feature matrices for ML trading models, backtests, and screening pipelines.
Key Features
- 80+ indicators: SMA, EMA, RSI, MACD, Bollinger Bands, ATR, ADX, CCI, Stochastic, Williams %R, and more
- Zero-boilerplate API: computed on-demand as DataFrame columns
- Works with any OHLCV data source (Yahoo Finance, Alpha Vantage, Binance)
- Minimal dependencies: only pandas and numpy
- BSD-3-Clause licence — safe for commercial use
Quick Start
import yfinance as yf
from stockstats import StockDataFrame
raw = yf.download("TSLA", start="2023-01-01")
df = StockDataFrame.retype(raw)
print(df[["close_14_rsi", "macd", "boll"]])
npx ai-supply add stockstats-technical-indicators
Curated mirror of the open-source stockstats (BSD-3-Clause). Get it from the source.