2
$\begingroup$

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.

$\endgroup$

2 Answers 2

1
$\begingroup$

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.

$\endgroup$
0
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.