Learn R Programming

PortfolioTesteR (version 0.1.4)

calc_rsi: 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)

Value

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

Arguments

data

Data frame with Date column and price columns

period

RSI period (default: 14)

Examples

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

Run the code above in your browser using DataLab