This is a simple neural network, much of which is taken from here
It uses the Hurst Exponent and the Sharpe Ratio as inputs and trains for a small amount of days before actually using stock data. If the output of the neural network is < 0.2 there's hope that it's mean-reverting and if it's greater than 0.8, there's hope that it's momentum trending.
Things to note:
- From my testing, it doesn't seem to be detecting momentum trending data when used with actual S&P
- Bias with the S&P as it's been on-rise since the last three years
- After a while, the output of the neural network seems to converge to -1, almost indefinitely, so limiting the amount of training days would be a good idea.
The algorithm definitely needs a lot of work so please feel free to play around with it and post back your suggestions.
Edit** The output seems to converge to -1 regardless of training depth, if anyone has some input on this, please feel free to contribute!
Much credit goes to Tom Starke