Take the 2-minute tour ×
Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

I plan to develop a neural network to trade commodities futures, but while messing around with some code, a question came up. If I understand correctly, people use various technical indicators with their networks (moving average, MACD, etc.). However, how do these come into play in a machine learning context? Should I just give the values of these functions as inputs, along with the actual data, for each point in time?

share|improve this question
    
A machine learning approach to stock forecasting firstly involves evaluation of noise, stability, lags(autocorrelation), etc. I rarely use technical indicators as inputs, but rather wavelet coefficients and fractal dimensions as an alternative to performing an FFT on the time series. –  user5626 Jul 7 '13 at 17:01

3 Answers 3

The predictor variables would consist of the input layer to the neural network. The output layer would consist of your target. You need to specify the hidden layer, number of nodes per layer, the learning algorithm, and the learning algorithm stopping criteria. Typically inputs are normalized (first-differenced, z-scored, etc.) before inputting into the neural network so the model is training on relative changes as opposed to absolute levels. Neural networks have had mixed success in quant finance and in my view there are some more interesting non-parametric techniques worth looking at.

share|improve this answer
    
like what? HMM? –  RockScience Apr 26 '11 at 3:47
    
State-space models, decision trees, MARS –  Quant Guy Apr 29 '11 at 21:49
    
Do you first calculate the indicator and then normalize, or normalize and after that calculate TA on the normalized data? –  siamii May 6 '13 at 22:46
    
@QuantGuy State space models are far overrated (since everyone uses them now, they've been stripped of much opportunity), but agreed on decision trees. –  user2763361 Feb 9 at 7:57

Most contemporary NN systems are just made to use the raw price time series for input (maybe with some kind of simple normalization), but for my thesis I wrote a system which traded equities with an ANN with technical indicator inputs (MAs, MACD, even pattern matching for stuff like Head-Shoulders, support levels, etc.). So at least conceptually it's definitely possible.

One of the most interesting systems I saw when researching for my thesis, which actually got a lot of impressive results as well, used technical indicators with genetic programming to create a kind of dynamic decision tree to generate buy/hold/sell ratings. If I was to get into AI algo trading again, that's probably the direction I'd focus towards.

share|improve this answer
1  
Possible to share further information/reference about this system you mentioned? –  Flake Sep 27 '11 at 19:20

I will break up your question in to some parts to make answering easier.

"people use various economic indicators with their networks (moving average, MACD, etc.) However, how do these come into play in a NN context?"--the 'indicators' MA, MACD etc. come from the data. They are measures of the data capturing some aspect. You could try to capture/replicate these measures within the NN. In a way, your NN is also an 'indicator'. You can have 'indicators' made up of smaller 'indicators'. A NN approximates a functional form that fits your input-to-output targets. It obtains a shape that you train it to on past data.

"Should I just give the values of these functions as inputs, along with the actual data, for each point in time?"--yes. It is not straight forward though. a single perceptron (node) in the NN cannot handle a complex indicator's output even if it is scalar (1 dimensional but constraints usually appear alongside to work properly). The perceptron usually has a sigmoidal firing function, and many indicators require more sophisticated interpretations than a threshold bounding. It is context dependent without a general gauranteed solution.

My advice is that since you say that you are starting in the AI field, make some NN to approximate the indicators first, and then experiment, and with something breaking down; ask again.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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