Taking Neural Networks to the next level - page 27

 

I guess you're right, Alain. Yahoo Finance isn't free, either.

To answer your question and give a summary: it's not "one" neural network but a library allowing for many different network architectures including conventional Multilayer Perceptron with variable layer and neuron architecture, autoencoders and networks with memory cells (LSTM, GRU). It includes functions for data pre-processing, different weight initialization methods, learning optimizers (Vanilla, Momentum, RMSprop, Nesterov, ADAM, ADADELTA, AdaGrad), regulization (dropout, apoptosis, pruning) and result statistics with automatic reports. All popular loss functions and activation functions are supported. The implementation of softmax and binary + categorical cross entropy loss makes it possible to use the networks not only for regressors, but also classifiers. The main thing that's not supported (yet?) are convolutional networks (CNN). Regarding how powerful CNNs are, this is no minor issue...

Yes, I wrote it entirely in MQL5, which for sure was a lot of work, but I tried the combination Python(/Tensorflow,/Keras) plus Metatrader before and wasn't really happy with the workaround. But I'm aware that my method isn't for everyone! A Python solution has many benefits, too.

 

though @Marco vd Heijden's approach with tensorflow and image recognition-like applied to chart-pattern remain the best way to do it

It would be about find in current chart one of theses patterns.

Excuse it's Siraj Raval once again, we can say whatever about him, he has the advantage of having centralized & summed up everything on his youtube channel 


 

@Icham Aidibe Without knowing what @Marco vd Hejden is doing with machine learning, I think there is no reason to limit pattern recognition to an arbitrarily predefined set. There's an infinite number of possible other patterns. The chart doesn't care about our interpretations. Only because we believe that e.g. a head&shoulders pattern has a certain meaning or because decades of trading literature say so, this doesn't mean that there aren't slightly better patterns that we just didn't think about. Certain AI models are pretty good at finding such patterns.

Python with its AI libraries offers much more than any single person will ever be able to put into code. No doubt, I love Python and think it started a revolution for AI programming applications and it's exciting to witness this development.

If you're also able to combine Python's AI possibilities with a dedicated trading environment during real time trading: perfect.

It's easy with Python to take a file with a bunch of historical price data, put it into some machine learning model as a script and make a fancy a posteriori analysis. The internet is full of such quick&dirty examples. It's also great for data science, just like MatLab and R.

The harder part -in my opinion - is real time full automation with a good integration of the data analysis part and the trading part, not as a script but within an autonomous EA. I think MQL here has to offer what Python is missing, on the other hand, for MQL all that Machine Learning stuff is missing (or more precisely: Python by itself is rather primitive (in my opinion), the immense power comes with its libraries and for MQL there are just really rudimentary publically available code snippets when it comes to AI).

If somebody is a really good coder, maybe a Python solo solution is the way to go. I'm not going to discourage anybody.

Also: even if MQL has no native GPU support (without OpenCL), I think it can be incredibly fast (advantages of compiled over interpreted language), and speed is important with machine learning.

 
Chris70:

I guess you're right, Alain. Yahoo Finance isn't free, either.

To answer your question and give a summary: it's not "one" neural network but a library allowing for many different network architectures including conventional Multilayer Perceptron with variable layer and neuron architecture, autoencoders and networks with memory cells (LSTM, GRU). It includes functions for data pre-processing, different weight initialization methods, learning optimizers (Vanilla, Momentum, RMSprop, Nesterov, ADAM, ADADELTA, AdaGrad), regulization (dropout, apoptosis, pruning) and result statistics with automatic reports. All popular loss functions and activation functions are supported. The implementation of softmax and binary + categorical cross entropy loss makes it possible to use the networks not only for regressors, but also classifiers. The main thing that's not supported (yet?) are convolutional networks (CNN). Regarding how powerful CNNs are, this is no minor issue...

Yes, I wrote it entirely in MQL5, which for sure was a lot of work, but I tried the combination Python(/Tensorflow,/Keras) plus Metatrader before and wasn't really happy with the workaround. But I'm aware that my method isn't for everyone! A Python solution has many benefits, too.

Thanks Chris, I am just starting with machine learning and I appreciate your feedback.
 
Chris70:

@Icham Aidibe Without knowing what @Marco vd Hejden is doing with machine learning, I think there is no reason to limit pattern recognition to an arbitrarily predefined set. There's an infinite number of possible other patterns. The chart doesn't care about our interpretations. Only because we believe that e.g. a head&shoulders pattern has a certain meaning or because decades of trading literature say so, this doesn't mean that there aren't slightly better patterns that we just didn't think about. Certain AI models are pretty good at finding such patterns.

Python with its AI libraries offers much more than any single person will ever be able to put into code. No doubt, I love Python and think it started a revolution for AI programming applications and it's exciting to witness this development.

If you're also able to combine Python's AI possibilities with a dedicated trading environment during real time trading: perfect.

It's easy with Python to take a file with a bunch of historical price data, put it into some machine learning model as a script and make a fancy a posteriori analysis. The internet is full of such quick&dirty examples. It's also great for data science, just like MatLab and R.

The harder part -in my opinion - is real time full automation with a good integration of the data analysis part and the trading part, not as a script but within an autonomous EA. I think MQL here has to offer what Python is missing, on the other hand, for MQL all that Machine Learning stuff is missing (or more precisely: Python by itself is rather primitive (in my opinion), the immense power comes with its libraries and for MQL there are just really rudimentary publically available code snippets when it comes to AI).

If somebody is a really good coder, maybe a Python solo solution is the way to go. I'm not going to discourage anybody.

Also: even if MQL has no native GPU support (without OpenCL), I think it can be incredibly fast (advantages of compiled over interpreted language), and speed is important with machine learning.

Gotta admit that is also true

 
Icham Aidibe:

though @Marco vd Heijden's approach with tensorflow and image recognition-like applied to chart-pattern remain the best way to do it

It would be about find in current chart one of theses patterns.

Excuse it's Siraj Raval once again, we can say whatever about him, he has the advantage of having centralized & summed up everything on his youtube channel 



This is really good post with many passionate people about math and trading.

It is probably worth note that there is X3 Pattern framework for the purpose of automatic pattern recognition by machine.

I do not know how one can digest this X3 pattern framework though but it is universal pattern recognition framework very close to programming language or code.


If you are discliplined in Statistics and Math, you would immediately recognize its structure resembling the comtemprary math something like ARIMA and SARIMA, etc.

But it is all up to you how to digest and how to interpret this X3 pattern framework from your own perspective.

If you are mathematician, it would have the value as a applied math (like ARIMA).

If you are a trader, it would have the value as a trader.

If you are neither matchematician and trader, you would sill find some value from this X3 pattern framework.

Of course, you can use this pattern framework in neural networks including deep matchine learning and any kind.

When I develope this pattern framwork, the neural network approach was one of the possibility of expanding the practical application of X3 pattern framework.

This pattern framework was motivated by many theories. One of them is multiverse theory by Stephen Hawkings.

https://www.cam.ac.uk/research/news/taming-the-multiverse-stephen-hawkings-final-theory-about-the-big-bang


I am particulary careful at posting anything on this forum since one might overeact on some stuffs.

But I have to say that it took me nearly 3 years on building on this pattern framework, finally I had a chance to write one piece of paragraph in public.

Find the attached zip file with title of "X3 Pattern Framework for the Day Trader in the Financial Market".

Hopefully this sharing will trigger some genious development benefitting many of us in future.

Kind regards.

Taming the multiverse: Stephen Hawking’s final theory about the big bang
Taming the multiverse: Stephen Hawking’s final theory about the big bang
  • www.cam.ac.uk
The theory, which was submitted for publication before Hawking’s death earlier this year, is based on string theory and predicts the universe is finite and far simpler than many current theories about the big bang say. Professor Hertog, whose work has been supported by the European Research Council, first announced the new theory at a...
 
Young Ho Seo:


This is really good post with many passionate people about math and trading.

It is probably worth note that there is X3 Pattern framework for the purpose of automatic pattern recognition by machine.

I do not know how one can digest this X3 pattern framework though but it is universal pattern recognition framework very close to programming language or code.


If you are discliplined in Statistics and Math, you would immediately recognize its structure resembling the comtemprary math something like ARIMA and SARIMA, etc.

But it is all up to you how to digest and how to interpret this X3 pattern framework from your own perspective.

If you are mathematician, it would have the value as a applied math (like ARIMA).

If you are a trader, it would have the value as a trader.

If you are neither matchematician and trader, you would sill find some value from this X3 pattern framework.

Of course, you can use this pattern framework in neural networks including deep matchine learning and any kind.

When I develope this pattern framwork, the neural network approach was one of the possibility of expanding the practical application of X3 pattern framework.

This pattern framework was motivated by many theories. One of them is multiverse theory by Stephen Hawkings.

https://www.cam.ac.uk/research/news/taming-the-multiverse-stephen-hawkings-final-theory-about-the-big-bang


I am particulary careful at posting anything on this forum since one might overeact on some stuffs.

But I have to say that it took me nearly 3 years on building on this pattern framework, finally I had a chance to write one piece of paragraph in public.

Find the attached zip file with title of "X3 Pattern Framework for the Day Trader in the Financial Market".

Hopefully this sharing will trigger some genious development benefitting many of us in future.

Kind regards.

If Young Ho - the best pattern traders here around - didn't found any convenience in using neural network for his tools, I doubt even more :/

We should invite Siraj Raval on the thread, for sure he would be an added value for your project @Chris70

 

@Young Ho Seo

Thank you for this contribution. I really appreciate you sharing this book chapter; it was a quick and understandable read and think that it has many useful insights, so first of all: thank you!

If I will say any words of critique, please accept this as a personal opinion and by no means as a discredit.

You basically present a fractal based notation system that can describe an infinite number of patterns, rather than limiting oneself to a fixed set of patterns. This is already a big advantageous step opposed to the above shown chart patterns. The "automation" part relies on the defining rules of the underlying fractals (or "EFWs").

I think it can be very helpful as a clear language to objectively describe any pattern, as long as it's fractal-bound (with the latter being the first limitation!).

It also seems useful for data reduction, because complex shapes with as many datapoints as there are ticks can be described by just a handful of numbers. I suppose this can be a valid alternative to what I did with the autoencoder model in the early posts of this thread.

However: as helpful as data reduction can be for solving computation performance problems or for simplification/summarizing to an easier form for better human understanding, by nature this always goes along with data loss. This can be a good thing if we're talking about signal/noise decomposition, but there also is a risk of losing valuable data. If we then use this reduced dataset as an input for a prediction model, it's obviously impossible, to gain more information (less in --> less out).

My personal experience with the autoencoder approach shows that computers nowadays are so fast, that it's not really necessary to filter price into fitting patterns that can be described with fewer numbers.

Finally, I think that your pattern notation has a high value for the manual(!) trader who wants to introduce more objectivity and a more systemized approach into his/her trading. On the other hand I think that for machine learning there are nowadays much better methods: I think that the feature maps concept within convolutional neural networks is far superior and "state of the art".

About ARIMA models: I guess the days for calling them "contemporary math" are gone. I mentioned them myself several times as examples for time series prediction, be we need to be aware of them being limited to uninterrupted repetitive(/cyclic) patterns like e.g. a sine wave, seasonal weather phenomena, monthly sales etc. ARIMA related models don't work for long term dependencies, but recurrent neural networks with memory cells do (still more if skip connections are introduced or e.g. bidirectional sequence-to-sequence models like "attention" models.

I also don't think you're doing yourself a favor with the frequent mentioning of Fibonacci ratios and Elliot Wave Theory.

The Elliot Wave Theory first of all is a theory. It imposes a hypothetical concept onto the market and price shall obey  ...only: price doesn't care ;-)

It has never been scientifically proven - beyond the hypothesis - that price actually behaves in Elliot waves. If anybody has differing information please quote the scientific paper. Until than - although many will hate me for this - I will consider Elliot waves as esoterical chart voodoo.

The same accounts for Fibonacci ratios: while we find Fibonacci ratios in nature and math over and over again and while it intuitively seems like a good idea that perfectly makes sense to transfer this elsewhere mathematically proven concept into the realm of price behavior, to my knowledge it has never been proven that price finds its turning points (or support/resistance) any more frequently at Fibonacci levels than at any other level in between. Again: if anybody has differing information please provide the scientific paper. Until then I will consider them as "a good idea, but empirically wrong". [edit: this is easily debunked by just looking at (cumulative) distribution functions (histograms) of price retracements --> they show smooth curves without any local spikes! Therefore: Fibonacci numbers are real thing in nature, but a myth in trading!]

My view about Elliott and Fibonacci doesn't make your system any less valuable of course. I just think you shouldn't have mentioned the two that often in that context and just present the pattern notation system independently (Elliott and Fibonacci are no prerequisite for your system to "work").

 
Icham Aidibe:

If Young Ho - the best pattern traders here around - didn't found any convenience in using neural network for his tools, I doubt even more :/

We should invite Siraj Raval on the thread, for sure he would be an added value for your project @Chris70

Data science wasn't invented for being convenient ;-)

 
Chris70:

@Young Ho Seo

Thank you for this contribution. I really appreciate you sharing this book chapter; it was a quick and understandable read and think that it has many useful insights, so first of all: thank you!

If I will say any words of critique, please accept this as a personal opinion and by no means as a discredit.

You basically present a fractal based notation system that can describe an infinite number of patterns, rather than limiting oneself to a fixed set of patterns. This is already a big advantageous step opposed to the above shown chart patterns. The "automation" part relies on the defining rules of the underlying fractals (or "EFWs").

I think it can be very helpful as a clear language to objectively describe any pattern, as long as it's fractal-bound (with the latter being the first limitation!).

It also seems useful for data reduction, because complex shapes with as many datapoints as there are ticks can be described by just a handful of numbers. I suppose this can be a valid alternative to what I did with the autoencoder model in the early posts of this thread.

However: as helpful as data reduction can be for solving computation performance problems or for simplification/summarizing to an easier form for better human understanding, by nature this always goes along with data loss. This can be a good thing if we're talking about signal/noise decomposition, but there also is a risk of losing valuable data. If we then use this reduced dataset as an input for a prediction model, it's obviously impossible, to gain more information (less in --> less out).

My personal experience with the autoencoder approach shows that computers nowadays are so fast, that it's not really necessary to filter price into fitting patterns that can be described with fewer numbers.

Finally, I think that your pattern notation has a high value for the manual(!) trader who wants to introduce more objectivity and a more systemized approach into his/her trading. On the other hand I think that for machine learning there are nowadays much better methods: I think that the feature maps concept within convolutional neural networks is far superior and "state of the art".

About ARIMA models: I guess the days for calling them "contemporary math" are gone. I mentioned them myself several times as examples for time series prediction, be we need to be aware of them being limited to uninterrupted repetitive(/cyclic) patterns like e.g. a sine wave, seasonal weather phenomena, monthly sales etc. ARIMA related models don't work for long term dependencies, but recurrent neural networks with memory cells do (still more if skip connections are introduced or e.g. bidirectional sequence-to-sequence models like "attention" models.

I also don't think you're doing yourself a favor with the frequent mentioning of Fibonacci ratios and Elliot Wave Theory.

The Elliot Wave Theory first of all is a theory. It imposes a hypothetical concept onto the market and price shall obey  ...only: price doesn't care ;-)

It has never been scientifically proven - beyond the hypothesis - that price actually behaves in Elliot waves. If anybody has differing information please quote the scientific paper. Until than - although many will hate me for this - I will consider Elliot waves as esoterical chart voodoo.

The same accounts for Fibonacci ratios: while we find Fibonacci ratios in nature and math over and over again and while it intuitively seems like a good idea that perfectly makes sense to transfer this elsewhere mathematically proven concept into the realm of price behavior, to my knowledge it has never been proven that price finds its turning points (or support/resistance) any more frequently at Fibonacci levels than at any other level in between. Again: if anybody has differing information please provide the scientific paper. Until then I will consider them as "a good idea, but empirically wrong".

My view about Elliot and Fibonacci doesn't make your system any less valuable of course. I just think you shouldn't have mentioned the two that often in that context and just present the pattern notation system independently (Elliot and Fibonacci are no prerequisite for your system to "work").

@Chris70


I really like your comment.

I am also data scientiest of some sort as well as financial trader, I guess :).

Here is my table of outlining five important price patterns in the financial market.

From the table, you will see the price pattern from simple (left) to complex (right).


Also the complexity of these price patterns are roughly matching with number of cycle period we can describe in Fourier transformation or some sort of cycle study (You can see this in the top of the price pattern table).


Importantly, many traders and investors are trying to capture these patterns to make money.

With many math model and the trading strategy, the problem comes to model the fifth regularity, the fractal wave because they posses the infinite number of cycle (i.e. repeating patterns).


In this end, I will elaborate just short comment here.

The value of X3 pattern is not just data reduction side.

X3 Pattern framework is one of few scale indepenent tool, including Wavelet transformation, which means you can properly model the repeating patterns inside price series using X3 pattern framework.

Many other scale dependent tool will break down with forex and stock market data in this end.


There are only few scale indepent tool out there. X3 pattern is one of them.

In this ends, wisdom of financial trader goes back nearly 100 years ago.  Even before the  personal computer become popular, they including Elliott Ralph Nelson and H.M. Gartley and other Fibonacci trader knew how to deal with the market.

If you are doubt about my comment, I will recommend to calculate fractal dimention of Forex and stock market.


How precisely the fractal dimesion describe the market and why you need scale indepdent tool for your trading.

You will find a lot of meaningful information from there. But it could be just starting point, I guess.


https://en.wikipedia.org/wiki/Fractal_dimension




Reason: