filter_threshold: Filter by Threshold Value

View source: R/filters.R

filter_thresholdR Documentation

Filter by Threshold Value

Description

Selects stocks above or below a threshold value.

Usage

filter_threshold(signal_df, value, type = c("above", "below"))

Arguments

signal_df

Data frame with signal values

value

Threshold value

type

"above" or "below"

Value

Binary selection matrix

Examples

data("sample_prices_weekly")
momentum <- calc_momentum(sample_prices_weekly, 12)
# Select stocks with positive momentum
positive <- filter_threshold(momentum, 0, type = "above")

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