You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
You can also run it in the optimizer --> should be faster in non-visual mode; just set the "training counter" to e.g. 1-100 and optimize "slow and complete" with all but one threads disabled; the weight matrix will be saved to the common file folder and re-used upon the next training cycle. But be aware that if " every tick" is chosen, you get as many iterations per cycle as there are ticks, so then it's probably better to not chose "years" of training history. Shorter time per cycle means you get more preliminary reports (also in the common file folder).
Ok. Did that now, using only OHLC data from M1 charts and a single day.
Now, I see some dots plotted in the "Passes/Custom max" window.
What do the dots represent? They seem to be moving somewhere between 60k and 59k at the moment.
Ok. Did that now, using only OHLC data from M1 charts and 1 day of training. Now, I see some dots plotted in the "Passes/Custom max" window. What do the dots represent?
That's the loss, i.e. 1/2 squared error times 10^6. Ideally, it should go down between the passes. If not, usually the learning rate is too high (depends both on initial rate and time decay value) or we're stuck in a local minimum (then momentum (setting: ~ 0-0.9) can help or an optimizer that has built-in momentum functionality like Nesterov or ADAM).
Because the function results are not scaled and can be as high as y, the MSE will have pretty high values with this concrete function example, too.
The "10^6" is a relict of other applications, cause if I have e.g. outputs 0-1 and an average absolute error of let's say 0.01, the MSE is sometimes too low to be shown with the few digits after the decimal points (2? 3?) that the custom results graph can show, so better too high indications than too low.
That's the loss, i.e. 1/2 squared error times 10^6. Ideally, it should go down between the passes. If not, usually the learning rate is too high (depends both on initial rate and time decay value) or we're stuck in a local minimum (then momentum (setting: ~ 0-0.9) can help or an optimizer that has built-in momentum functionality like Nesterov or ADAM).
Ok. I've changed it now to use 5 days of M1 OHLC data from EURUSD per training pass, with the "train counter" input parameter starting at 1 and stoping at 10000 (10k steps). That should be enough to run through the night. But the "Custom max" output doesn't look like it's going down. It just keeps moving up and down between 60k and 59k. Except for the "train counter", all the input parameters are at your default settings. Do you want me to change something and restart?
Btw ... looking at input parameters, "MLP optimizer method" is set to "Nesterov Accelerated Gradient (NAG)"
I'd upload the image, but I don't see any options to do it on this Forum. Hmmm.
Here it is, as an attachment.Nesterov is pretty robust (I think it was the preset in the uploaded file; can't you change it in the input settings?); you can go with that. The Nesterov algorithm has "look-ahead step" for the weight update built into the formula, which serves as a neat momentum adaption. I would only stay away from ADADELTA; although this one has the advantage, that no learning rate needs to be set, it requires other fine tuning cause it's e.g. pretty sensitive to a good weight initialization or you deal with vanishing or exploding gradients very quickly.
As a starting point for the learning rate: go into visual mode; for test purposes set a very high learning rate just to see what I mean, e.g. 0.2; then you'll probably see the loss curve graph skyrocketing almost immediately. From there go down with the learning rate in ~ factor 0.1 increments. If you found a value with decreasing loss curve, take about 10-50% of this value to start the training (this will usually be somewhere in between 0.0001-0.01). Time decay is not obligatory, but can help with fine-tuning at the later stages of the training. Another method would be setting the highest tolerated learning rate in the beginning, but combined with a quicker decline using a higher time decay value (time decay means nothing else but learning rate: *=1/(1+decay*iterations), so if for example you set a value of 0.0001, this means that the learning rate will have reached half the original value after 10.000 iterations.
But if the loss still fails to improve after many thousand iterations (I almost expect this to happen with this formula! The challenge was to force the network to fail and your example might do a very good job!), it is quite possible, that we just have proven, that your function actually is a pretty close approximation to ideal randomness (although it will technically still be pseudo-random).
If (!!) the neural network still is able to reveal some non-random principles, we should (in theory) over time at least see that 0.5*sqrt(2*MSE) < y
By the way: I set the range for y only to 0-100.
Okay... enough looking at computer screens for today...
For something that is supposed to be capable for finding the best formula for given inputs and outputs, it sure has a lot of parameters that need to be manually tweaked.
Anyway ... points printed on the chart keep going up with each new training iteration (now at 60369), but I am going to let it run as-is until tomorrow, then I'll post a new screenshot.
Good Night!
I've stopped training in the optimizer, because the results weren't getting any better and I wanted to see details. As you can see in the attached Screenshots, the ANN already went through more than 14 million iterations, but the average error is still very high and it's NOT improving with new iterations.
Here are the reports from the 1st test, using 3 hidden layers with 100 neurons each, which was running through 14170063 iterations before I've stopped it:
And these are the results of a new test, using an ANN with 10 hidden layers and 500 neurons each ...
Attached are screenshots taken from the Strategy Tester showing the "Passes/Custom max" chart, raw data from the last couple of iteration, and a detailed view of the ANN training in visual mode.
I've switched to visual mode now, to see how the ANN looks like. From what I can see, the larger ANN, after 210k iterations, thinks that all the outputs are somewhere between 49 and 51, with "predicted result" slowly moving up or down with each iteration. It looks almost like the large ANN is updating the weights to find the average value of all possible outputs (range of outputs is between 0 and 100 in this testset).
Ok. I think, after these two tests, it is fairly safe to say that the ANN is useless when the output is as far away from being linear as possible, as is the case with this pseudo-random generator.
This was fun. The outcome was kind-of expected, but it was fun getting there.
So ... Chris, would you accept another challenge? ;)
No random numbers this time. Now, I'd like to use price data. No trading, just training and prediction.
For input neurons, use the Open price of the last 100 bars (completed bars, not the current unfinished bar).
For output neurons, use the Close price of the exact same Bars. That's 100 inputs and 100 outputs.
In this scenario, once the ANN is fully trained, the only thing it would actually have to "predict" is the last Close price, since the first 99 outputs are always going to be identical to last 99 inputs. The challenge is to find out how good the ANN will be in predicting the result of the last output neuron when presented with previously unseen data for input neurons. But ... I'm also curious to see if the ANN can "figure out" that the first 99 outputs are just copies of the last 99 inputs and get to a state where it would always produce correct results for the first 99 outputs.
Feel free to increase or decrease the number of input and output neurons, if you think it can improve the results. I've used 100 here only as an example.
PS. I'll try to do the same with my very simple ANN (source code I've posted earlier in this thread).