Neural network trading

 

Hi all,

 

I am working on building an EA based on the neural network. The biggest problem I think is processing power. The time taken to complete calculations on one instance is huge. I am looking for contributions of ideas on how to improve calculations performance. You all are invited to share your success and problems faced while coding a neural network trading system.

 

Regards to all,

 

Amit 

 
AmitJamuda:

Hi all,

 

I am working on building an EA based on the neural network. The biggest problem I think is processing power. The time taken to complete calculations on one instance is huge. I am looking for contributions of ideas on how to improve calculations performance. You all are invited to share your success and problems faced while coding a neural network trading system.

 

Regards to all,

 

Amit 

Hi Amit,

Very good point to discuss in this forum.

In my opinion you must separate the execution process from the setup and training (as training neural networks can really need hard processing).

Probably you have read this article (https://www.mql5.com/en/articles/497) but if not I recommend you do it before any effort.

Regards.

Neural Networks: From Theory to Practice
Neural Networks: From Theory to Practice
  • 2013.01.18
  • Dmitriy Parfenovich
  • www.mql5.com
Nowadays, every trader must have heard of neural networks and knows how cool it is to use them. The majority believes that those who can deal with neural networks are some kind of superhuman. In this article, I will try to explain to you the neural network architecture, describe its applications and show examples of practical use.
 
figurelli:

Hi Amit,

Very good point to discuss in this forum.

In my opinion you must separate the execution process from the setup and training (as training neural networks can really need hard processing).

Probably you have read this article (https://www.mql5.com/en/articles/497) but if not I recommend you do it before any effort.

Regards.

Hi Figurelli,

 

Thanks for the link, great article! yes training neural network takes a lot of time.

The point is if I train it and run, it performs good for few days. This happens because the market dynamics change every few days and whatever the Neural Network learned is outdated in few days.

The solution arrived is the Neural Network should keep on learning and update its database as the market moves. Now ongoing learning is a problem as it takes a lot of time to learn and when data is crunched, we are too late to catch the market movement.

The amount of time taken to learn is very much dependent on the input variable size. for an array of 2000*20 it takes about 2 minutes to learn in a system with XEON processor and 2 GB shared memory. I found out that the larger the input data set the better results we can get. However, increasing the array by just 1 row 2001*20 the time taken to learn increases exponentially. eg: 5000*20 takes about 10 minutes.

 

This becomes a deterrent if I want to use the Neural Network(ANN) to trade in 1 minute time frame. Trading in 1 minute time frames gives me more number of trading opportunities even if that opportunity means 1 pip.

Though I have a few successful non neural network trading models, I am very much interested in ANN trading. I have been researching in this ANN models since 2010 and yes we can makes a lot of money by ANN trading model as it will try to catch every opportunity in market. I think the biggest drawback of ANN models as of now is processing time, if we can reduce the time a lot of improvement can be made and very soon we will have a different breed of EAs. EAs THAT HAVE BRAINS.

 

 

Hi Amit

just to share, i implement neural network by 4600 nod re-train and run which take less 2 minute. Every 15 minutes NN will be destory, create, re-train and run again

I test several brokers using NN (my seller section).  Difference brokers diferent results.

 

Hi Dreamers,I have  worked for two years  with NN implementation in Fx trade 

Conclusions:

- not better results than simply trades using moving average

- NN only for people who like math very much but you do not expect good resuls

- generally it is waste of time 

I suggest to  find simpler methods of  trades with autoadaptive function

Toyota

Edited by moderator : please don't use "aggressive" fonts unnecessarily

 
Toyota:

Hi Dreamers,I have  worked for two years  with NN implementation in Fx trade 

Conclusions:

- not better results than simply trades using moving average

- NN only for people who like math very much but you do not expect good resuls

- generally it is waste of time 

I suggest to  find simpler methods of  trades with autoadaptive function

Toyota

Edited by moderator : please don't use "aggressive" fonts unnecessarily

Hi Toyota, you are right if the sense here is that there is no foolproof strategy.

Note that NN is hard based in past history, and market are uncertain.

Anyway, my mantra is no strategy or trading paradigms, so study, discuss and researchs in this fields, as proposed by Amit, are for me always welcome.

In this sense, for certain instruments and market scenarios, even a single moving average strategy with a killer setup can build a winning strategy (the big problem is discover it). 

 
figurelli:

Hi Toyota, you are right if the sense here is that there is no foolproof strategy.

Note that NN is hard based in past history, and market are uncertain.

Anyway, my mantra is no strategy or trading paradigms, so study, discuss and researchs in this fields, as proposed by Amit, are for me always welcome.

In this sense, for certain instruments and market scenarios, even a single moving average strategy with a killer setup can build a winning strategy (the big problem is discover it). 

Exactly! NN are still in research stage, you never know when someone hits gold in it. NN is not a strategy, it is combination of strategies. Where the NN software builds the strategies itself and applies the correct strategy as per market conditions. The problem is depending on the data size and complexities of the NN code the calculations might take lot of time. It's like breaking the DNA sequence of the market.

Further due to lots of lines of code, a simple logical error in the code can make the NN behave much differently than you initially thought of and it is very difficult to identify such errors as there no manual trading or strategy that you can compare it to.

Some might feel it is a lot of hard work and no immediate results. Well, research is a pretty tedious job, however I believe, if we can build a NN that can find out the strategy to catch every pip the market moves, trading will be a different ball game. However it seems a distant reality as of now, but I am still walking.

Note: I did not have a strategy when I entered the market and lost money. I researched for a few years and today I can say "yes I am making money ". So it's a matter of time and continuous effort in the right direction, the destination will be reached.

 
jelam:

Hi Amit

just to share, i implement neural network by 4600 nod re-train and run which take less 2 minute. Every 15 minutes NN will be destory, create, re-train and run again

I test several brokers using NN (my seller section).  Difference brokers diferent results.

His Jelam,

 the time take for complete calculations is dependent on a lot of design factors. Big question is..... Is it making money? If yes what did you do right and what did you get wrong. What are the other challenges you faced or are currently facing? 

If you are designing the NN using bars there will be a difference in performance due to quote feed difference. I have seen brokers with so much quote lag that the quote price on the chart and trade price will be a big difference specialty for market orders. Then there might be requotes, which might delay or deny a trade to be executed. 

Documentation on MQL5: Timeseries and Indicators Access / Bars
Documentation on MQL5: Timeseries and Indicators Access / Bars
  • www.mql5.com
Timeseries and Indicators Access / Bars - Documentation on MQL5
 

Neural Networks(NN) are good way to identify indicators and their settings which give best results for a particular pair.

 

I myself have found setting that make money using NN. 

 
AmitJamuda:

Neural Networks(NN) are good way to identify indicators and their settings which give best results for a particular pair.

 

I myself have found setting that make money using NN. 

I think the strategy (setting, method) of using NN to discovery trading strategy could be a traded result of "How to train". Seems the current NN still stuck in the manual setting of how to train status, by inserting the NN of "how to train", that would become the real AI.

So that's why NN is not identical with AI.

 

is there a signal which is based on NN trained network?

or an example which works.

i am asking because i would like to see realistic results. i understand the the theory, but i don't have time to develop and test models

Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Running MQL5 Program Properties
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Running MQL5 Program Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Running MQL5 Program Properties - Documentation on MQL5
Reason: