calc_rsi: Calculate Relative Strength Index (RSI)

View source: R/technical_indicators.R

calc_rsiR Documentation

Calculate Relative Strength Index (RSI)

Description

Calculates RSI for each column. RSI ranges from 0-100. Above 70 indicates overbought, below 30 indicates oversold.

Usage

calc_rsi(data, period = 14)

Arguments

data

Data frame with Date column and price columns

period

RSI period (default: 14)

Value

Data.table with RSI values (0-100 range)

Examples

data("sample_prices_weekly")
rsi <- calc_rsi(sample_prices_weekly, period = 14)
overbought <- filter_above(rsi, 70)

PortfolioTesteR documentation built on Nov. 5, 2025, 5:23 p.m.