4
$\begingroup$

I am working on building a Neural network for technical analysis of stocks. The input I have is the open price and two (so far) technical indicators : RSI and William's R - for the past 2 years. I can include more data points and features going ahead but as of now I just need to test the concept. I have the following questions on this:

  1. I had decided to classify stocks into 3 categories : BUY, SELL and HOLD using this model. Is this formulation appropriate ? If yes, is there a way to generate these target labels for training ? If no, what should be the appropriate target ?

  2. The neurons fire after a certain threshold but many indicators require a different interpretations than just a threshold limit. Does this need to be corrected for in the model or will it not have any impact ? If yes, what approach should be used to correct for it ?

Any help would be much appreciated.

$\endgroup$
2
  • $\begingroup$ how much data do you have? I'm very skeptical of this without being presented with more intended design. Is two years worth of data supplied as input, i.e. 252 X 2yrs X 3indexes for each stock. Is this a single stock predictor or a multi stock predictor? The RSI is a function of the stock price, as is Williams R so this is technical just a reexpression of the basic stock prices. They might not contribute to the performace of the neural network at all. $\endgroup$
    – Attack68
    Commented Dec 10, 2019 at 17:44
  • $\begingroup$ If I am not wrong, the indicators can give an idea of whether a stock is overbought or oversold. This would help in taking a position in that stock. This was basic idea behind the design. I can get more data - like around 10 years or so - so that's not a problem. It's a single stock predictor. My main concern was regarding the target labels. I read some of the papers where this methodology was used to buy and sell stock but it wasn't clear how did they generate the target labels. Also, if you feel this is incorrect, it would be great if you could recommend some other approach. Thanks! $\endgroup$ Commented Dec 11, 2019 at 4:44

1 Answer 1

2
$\begingroup$

Q1: Moving to a classification setting, is to date the most common technique in the literature. Most typically is to predict the direction of a move over some defined horizon, say 1 day or 1 month. An advanced technique is to apply triple barrier labeling and drop the rare class labels.

Q2: Jigar Patel, et al wrote a good paper on trend deterministic data preparation which transforms technical indicators into an expectation of trend Paper. You may find this type of feature engineering useful.

Additional: If you are using only price data and price-related indicators then it is highly likely that your model will pick up on well-known factors, namely momentum and trend reversal. That will help you to engineer features that would be explanatory of exploiting those market anomalies. (Also note that you are unlikely to be able to exploit other factors without the correct explanatory variables)

I don't think your current feature set will be able to provide much value given:

  1. Can't use open price, its non-stationary. Most typical is to use the first order log difference of price which would be the log returns. Returns are assumed to be stationary and normally distributed, prices are log-normally distributed.
  2. Daily returns are very very difficult to forecast, try to shift to monthly or weekly returns.
  3. Add volume data as well as the market factor (S&P500), you may have some good success with a nonlinear CAPM style model.

The following is a good paper from the Journal of Financial Data Science: Neural Networks in Finance: Design and Performance

$\endgroup$

Your Answer

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

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