Deep Learning, AI, Neural networks in SQ4
14 replies
Mark Fric
6 years ago #233156
I’d like to open a discussion about this, what and how exactly to integrate it / use it with SQ4.
Our current plan is to develop a custom Neural Network module that will be able to train NN to produce trading signals.
How it will work from users point of view:
- User configures inputs – list of signals/indicators to be used in NN, some NN properties, backtest data etc.
- SQ4 will train NN on the historical data using genetic evolution
- The result will be a strategy with complete source code that uses TRAINED Neural Network that produce signals to buy/sell/hold/exit. The strategy can be used in Mt4 or other trading platform
We have it about 50% ready, it should be quite simple to use.
I’m open to discussion about what are your expectations about Deep Learning, and your idea of how it should work with SQ4.
Our implementation described above is a “fixed” solution with not many customizations possible. We are not against integrating SQ with TensorFlow or similar solution, to provide more flexibility to the deep learning process.
We should just determine how to integrate it – what should be done on SQ part to make it work and be as flexible as possible.
Mark
StrategyQuant architect
FILIPE BONALDO ACERBI
6 years ago #233195
Hello Mark,
This is a very good topic. I want share my experience about NN.
Last year I implement a supervised multi layer perceptron in mql4 with error backpropagation learning method. My inputs is the last X bars highs, lows and closes prices plus another price indicator like moving averages. So, for example, each new bar, the EA gets the last 10 bars highs, lows and closes prices as input for NN. The expected result will be 1 if the future price reach TP (+2 ATR from the last open price) and -1 if the future price reach the ST (-2 ATR from the last open price) .
The NN run for each bar and I tested for long period but the final result is that the NN didn´t train and don´t have any edge.
After some research, I discovered that the NN won´t train due the market has multiple patterns or candle patterns and, in this model that I built, I was presenting multiples patterns for NN and it is the why NN was not training. Because each pattern has your edge. The ideal world, is present only one pattern for each NN and try to train this specific pattern.
So we first must classify similar patterns and input one specific pattern to NN and see if it could be trained.
So, I find a new approach to implement and I´m working on it for now. First task, is a clustering similar patterns. I found a good algorithm called BIRCH clustering (balanced iterative reducing and clustering using hierarchies) for classify patterns. With BIRCH clustering, I can filter similar patterns like the graph attached.
As we can see, each rectangle box is a specific pattern and I think that is the best way to implement NN.
After we have classified the patterns, we presented to a NN and see if could train this specific pattern.
devonkyle
6 years ago #233221
Tensorflow would be interesting or one of the variations of .i.e Tensorflow Lite or Keras. Would much rather see an integration other Python packages like scikit-learn. Random Forest and Ensembles methods I think would work well with GP. Pymc3 for Bayesian modeling would be a nice addition (for version 5 or 6 :))
Any discussion on what the upgrade path pricing for version 3 to 4 yet or is that more of a – wait and see for now?
Globegains
5 years ago #233481
I think with current state of so called AI it is better to integrate it into strategy finding process rather than trading decision making.
I have not seen any proof of machine learning, deep learning etc to make any profit on real accounts.
drayzen
5 years ago #233629
Hi Mark,
I recently found this EA Generator from BJF (http://eagenerator.com/) which it appears is just the Hlaiman (http://hlaiman.com/) product repackaged for a much higher price…
There’s a demo EA and Indicator on MQL5.com, as well as some articles by the creator about it usage: https://www.mql5.com/en/search#!keyword=hlaiman
Here’s their documentation: http://hlaiman.com/download/EA%20Generator/Using%20EA%20Generator%20EN.pdf
I noticed theres also quite a few articles covering Neural topics on there: https://www.mql5.com/en/search#!keyword=neural
Probably a better use of time than just rolling dice… 😉
... the alien does not concern itself with the opinions of humans ...
developeralgo222
5 years ago #235124
why do you think that DL in SQ4 would not work. What AI experience do you have. It all depends on how and what algorithms you use to implement your architecture. AI in itself requires an depth knowledge of what you are actually doing and what you want to accomplish.
Simply throwing together some half-baked AI algorithms ( usually supervised shallow algorithms ) to solve the Trading domain issue is a novice idea.
AI works if you have the right knowledge and use it correctly otherwise its like firing a machine gun while blind folded and hoping to hit your target.
ytu
5 years ago #234129
Hi Mark,
Have you considered ENCOG Machine Learning? It has JAVA library with it (look at this link – https://github.com/encog).
Since SQ is also JAVA based, perhaps the two can blend and complement each other better than Phyton, or other packages.
ENCOG has been there for many years and proven very stable and fast. As for time series, it has RNN.
clonex / Ivan Hudec
5 years ago #235145
notch 😀 😀 😀 😉
mikeyc
5 years ago #235350
My view is that effort is better spent on getting SQ4 to be totally reliable and bug free as it is.
NN and other non-linear ML techniques will just add more curve fitting in many cases.
tightpips
5 years ago #235364
This is a great idea and a conversation. I would love to see how the implementation of this module will work with SQ4, the utilization and UI of MS Azure ML is something to look into.
mattedmonds
3 years ago #268795
Has this progressed in the last couple of years?
Aram Mohammed
2 years ago #274233
I am very curious to see this feature implemented in SQX. Has there any progress happening for this feature lately?
Arvid Mock
1 year ago #279615
Hi Strategyquant Team,
did you finished the development of Neural Network integration in SQ?
Thanks for your reply.
Greetings Arvid
tom
1 year ago #279799
Yeah, any update on this would be much appreciated.
Keelan Brettner
1 year ago #280238
I can’t wait !! Is it done ? How do I get it, I’m trying to get somet going for mt5 as my broker has amazing custom conditions
tomas262
1 year ago #280250
Hi,
neural networks / multiple layers deep learning is not a part of SQX now but we have plans to implement this in future. We cannot promise any date now when this could be available though
Viewing 15 replies - 1 through 15 (of 15 total)