Neural Networks Revisited

Discussion in 'Automated Trading' started by maninmoon, May 24, 2016.

  1. Hi,

    I see a lot of old posts on NN for trading, but most of them are quite old. There has been a lot of advances in deep learning (AlphaGo!) and I am researching NN for trading FX and Stocks.

    I would like to discuss with others also actively involved.

    As a starter, I have created a simple NN with 1 hidden layer and 1 output.

    BOTH the input and output data are the SAME. In this case the 5 day forward Delta.

    Delta = Price[i+5] - Price

    My thoughts are that I should be able to match the input pretty exactly!

    Oddly, the output does NOT match input exactly even with various Learning Rates and large numbers of iterations.

    Anyone like to discuss this with me?
     
  2. userque

    userque

    Not really sure of what you're saying, but you haven't said how much data you're using...try more data.

    You also haven't said what type of validation you're using, if any...try k-fold cross validation.
     
  3. NNs aren't smarter than us, and thus won't magically uncover something that you haven't already figured out. But you can use Machine Learning to uncover patterns if you tell it what to look for. They're really good for testing stuff out in mass amounts that would otherwise take us months / years to do. Use ML / NN to extract rule sets for building a system, not to trade the system itself.
     
    louis_w likes this.
  4. userque

    userque

    Well, some of us (or at least, I) do extremely well trading with ML...though not NN's specifically.
     
    lucysparabola likes this.
  5. I probably worded my response very poorly. my point was for readers to not simply think "oohh, plug in price data to Generic ML algorithm and create ATM Machine!" kind of thinking. :)
     
    userque likes this.
  6. userque

    userque

    Lol...Gotcha! Good advice.
     
  7. Surgo

    Surgo

    What's the size of the hidden layer? What's the size of the input? It's implied as 1 but it's not entirely clear from your post. If hidden layer < input, you can't expect the output to be the same (this is also what's known as an autoencoder).

    How did you implement the network? Maybe you have a bug in your NN implementation.
     
  8. A bit lack of information regarding NN architecture and hyperparameters.
    Let's say you have X_t-n, X_t-n+1,... X_t-2, X_t-1, X_t as inputs. If you want to predict Delta on 5 days, the target output during training should be (X_t+5 - X_t), not the input sequence.
    Also pay attention to the activation function on the output layer - sometimes people do not tell between classification and regression, and use sigmoid as an output activation for the regression task.
    Also may be you have too little neurons in the hidden layer and a very long input sequence - may be NN could not generalize on it.
    Do you coded everything up by yourself or used some library?
    And more general things:
    • simple and shallow MLP are not well suited for the time series - they do not organically catch temporal relationships, RNN could be better, but have a lot of traps
    • I think it's a generally not very good idea to jump to 5 days delta - it assumes that days t+1, t+2, t+3, t+4 have no direct influence on the t+5 (or all their influence is fully contained in the previous sequence). I doubt that this assumption is viable.
    Actually there're a lot of places there things could go wrong with NN, so it's hard to tell w/o source code and problem setup.
     
    Baron likes this.
  9. Surgo, I have 1 input neuron, 1 hidden layer with 1 neuron, and 1 output neuron.
    I am using the AForge library.
     
  10. Surgo

    Surgo

    How much data? What's the activation function for the output? What sort of regularization? For that matter, what type of neuron is it in the hidden layer?
     
    #10     May 24, 2016