Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
I can't tell anything looking at the pictures because there might by a "shadow effect" and the pictures are to small to tell that.
But I can tell you how to check if the NN is ok. Export /there is an export and an import wizard in Matlab/ the testing output to a XLS or CSV file /Excel file/. Then put the real values next to the NN output and in the next column put a formula that checks if the NN predicted the correct direction of price movement.
By counting how many "1" you get you'll know the accuracy of the network.
The you may write a formula that calculates the profit and loss for every step. Look at he picture below /I'm using Polish version of Excel so I don't know if I got the formulas right /. Skip the spread for now.
Looks like it might be okay, I ran the formula through Open Office spreadsheet and it returned 73% accuracy on trade direction. Still got a few more inputs to give the network that I think will improve accuracy. Here's the spreadsheet, I saved it in xls format, you should be able to read it.
Looks like it might be okay, I ran the formula through Open Office spreadsheet and it returned 73% accuracy on trade direction. Still got a few more inputs to give the network that I think will improve accuracy. Here's the spreadsheet, I saved it in xls format, you should be able to read it.
Good...In sample or Out of sample?
Big difference it will make in your account,73% In sample is an account killer,73% out of sample is a maybe...
Try to believe only the out of sample results,and the less inputs you have ,the less overfitting you will get...so,if you add new inputs,think about deleting some of the old ones ..or expand the out of sample dataset on which you will forge your beliefs
As a rule of thumb: Less inputs,less connections,more out of sample points...better generalization.
There's an example of how to use DLL functions in Metatrader.
mrwobbles
It's either the training data or you got something wrong - the results are to good .
If one could get an accuracy of 73% with a simple back propagation network no one would give a shit about more complicated stuff
SIMBA
You're right. Choosing the proper input is a the most important thing in the process of creating a NN /there's a rule "trash goes in, trash comes out" /.
But you can always use data mining tools to analyze many different variables and choose those that affect the one you want to predict.
There's a nice book about data minig /and about genetic algorithms, Bayesian classification etc./ - "Data Mining Methods and Models." by Daniel T. Larose. It also shows how to use WEKA /a free, open source software for machine learning/.
My preferred way is to use GA - for the propose of time series prediction I usually allow them to choose from 15-40 previous steps.
PS
I've mentioned using Bayesian probability for the classification tasks but it can also be used for time series prediction
Simba what do you mean by out of sample? I tried building another network with about 6 more inputs and that reduced the accuracy. I think I've got a good set of inputs. It's based on my trading strategy which works well in trending markets and poorly in ranging markets. This makes sense with the predictions as well. The two long ranges at the top and bottom of the chart are where the predictions start to falter. I think some work on ranging strategies could turn up some useful inputs.
Kazam, this is the code used to create the network. To me that says create a new feed-forward back prop network. I'm not sure why it's churning out good results either it seems a little too good to be true. I summed the values of correct pips minus incorrect pips and over that period (about 30 months) it would have profited 294873 pips... I'm scared
numHiddenNeurons = 13;
net = newff(p,t,numHiddenNeurons);
I also decided that in 3-4 weeks time I'll try to build a ENN capable to predict exchange rates at the D1 and maybe H4 time frames. I think I'll tart with combination of FNT, GEP and PSO and then try to improve the ENN using PIPE instead of GEP, EPSO, Simulated Annealing etc
Thats what I figured but no it was trained on a 7 year chunk from 1999 to 2006 and then simulated on data from then till now. So it was out of sample.
But that might explain it. It could well be trying to predict the current high/low and close rather than the next hour . I'll have a look at the date stamps and see. Thanks for the links will have a look see.
Yeah turns out I was feeding it input and target data from the same hour rather than input from current hour and target from the next. I trained the network on the same inputs but with the targets from the next hour and the results are more what I was suspecting. It was accurate on direction about 51% of the time and recorded about 10,000 pips over 30 months. I normalized the inputs to [-1,1] and this improved the performance marginally. Gonna try a few different network model. Have been looking at time-delayed networks, thou the flexible neural tree approach does seem more and more appealing.
You should be only interested in 3 types of networks:
- Flexible Neural Trees - designed with the use of either GP, GEP, PIPE or ECGP and fine tuned with the use of Simulated Annealing, PSO, EPSO, Ant Algorithms, Artificial Immune System Algorithm etc.
- Bayesian Networks - either for time series prediction or for building a trading system
- HONN's
For building a trading system you may also find useful:
- RIPPER algorithm - someone used it an EA made for Automated Trading Championship if I remember correctly
- C4.5/C5.0
You don't need anything more and anything less /as for now/