powered by
Selects stocks above or below a threshold value.
filter_threshold(signal_df, value, type = c("above", "below"))
Binary selection matrix
Data frame with signal values
Threshold value
"above" or "below"
data("sample_prices_weekly") momentum <- calc_momentum(sample_prices_weekly, 12) # Select stocks with positive momentum positive <- filter_threshold(momentum, 0, type = "above")
Run the code above in your browser using DataLab