Encoding RSI Thresholds and Neutral Values for Machine Learning
Summary
The document asks whether RSI should be converted from continuous values into directional labels for a machine learning model. It describes the familiar interpretation of readings above 70 as overbought and below 30 as oversold, and considers assigning opposite signs to those extremes while treating the middle range as neutral or missing. One answer characterizes the middle band as a period without clear bull or bear control and suggests other indicators for trend confirmation. Another points to research comparing continuous technical-indicator inputs with a trend-based representation, reporting that the latter improved model performance in the cited study.
The discussion does not establish a universally appropriate encoding or validate the proposed labels for a particular prediction target. RSI thresholds are interpretations, and replacing continuous inputs with discrete categories may discard information. The cited research is mentioned only through its abstract, so the document gives no experimental details, markets, or evidence about whether its findings generalize. Label design should be tied to the target and evaluated out of sample.
Key ideas
- RSI values above 70 and below 30 are treated in the discussion as overbought and oversold conditions.
- The middle RSI range is proposed as neutral or unclassified rather than forced into a directional label.
- The document mentions research suggesting trend-based representations of technical indicators can improve prediction performance.
- It provides no general rule for encoding RSI or evidence that one representation works across datasets.
Tags
Full text
# Appropriate Encoding for Stock Technical Indicators ? RSI # Appropriate Encoding for Stock Technical Indicators ? RSI happy new year and i am new to machine learning + python.. so recently i am doing a project on my own to use machine learning models on technical indicators.. I have my technical indicators data ready.. and the next step is to label the technical indicators features as +1 or -1. Just wondering for technical indicators such as RSI where >70 means overbought and <30 means oversold, how do i label my technical indicators ? Technically, change the RSI value > 70 to -1 and < 30 to 1. How about values between 30 to 70 , what is the approriate way to label them or is the labeling even needed ? My data is a time series data and it is a data frame where the row is the date and the columns are the technical indicators. Thank you everyone for your help. ## Answer by shantanujoshii (score 1) https://quant.stackexchange.com/a/69942 what RSI really is it will tell you the overbought(>70) and oversold(<30) zone. What comes in between is the general sideways market for the timeframe it is between 70 and 30 bands. It means that neither bulls or bears have taken control of the movement and it is stable. Although I would highly recommend you to use other indicators like MACD, Bollinger bands etc to confirm trends. So if you are using pandas in python, just use this. section = None sections = [] for i in range(len(rsi)): if rsi[i] < 30: section = -1 elif rsi[i] > 70: section = 1 else: section = None #or zero sections.append(section) sections then you may also concatenate the list into the existing dataframe which you are using. ## Answer by Jacques Joubert (score 0) https://quant.stackexchange.com/a/50945 The following paper provides a solution to the technique you are employing: Predicting stock and stock price index movement using Trend Deterministic Data Preparation and machine learning techniques The abstract reads: > ...The first approach for input data involves computation of ten technical parameters using stock trading data (open, high, low & close prices) while the second approach focuses on representing these technical parameters as trend deterministic data...he experimental results suggest that for the first approach of input data where ten technical parameters are represented as continuous values, random forest outperforms other three prediction models on overall performance. Experimental results also show that the performance of all the prediction models improve when these technical parameters are represented as trend deterministic data.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.