- Blogs
- EA Expert Advisors and Speculative Opportunities
- Neural net EA Warning by mbkernel

- Public
- 1 like
jaguar1637 liked this 2769 days ago

By JohnLast 2770 days ago Comments (6)

On the net I found a very interesting post. It is a warning by mbkernel. I want to cite it here because it matters.

Hi traders. I know I will not be particularly popular by saying this, but I don't think that developing trading methods with neural networks, at least at the level of knowledge I see them here, is likely to be long-term successful.

Before you hit "reply" with an angry message, please consider. You'll have to take this on faith, but I am a reasonable expert on machine learning & neural networks. I have a PhD in physics, and specialized in nonlinear data analysis. In my day job I create statistical models, including neural networks for a technology company which sells the software to banks--application is commercial banking not trading. For work I wrote a pretty state-of-the-art neural network trainer & analysis program in C++ over the last few years, which includes some features I haven't yet seen in the academic literature. I am not an expert in quant trading but I do have some mathematical and financial understanding.

Anyway, what I see now as the problem is the classic GIGO -- 'garbage in, garbage out'. Much more important than the statistical classifier/regression model (of which artificial neural networks are one popular form) is understanding of the fundamental data. What is most important is "what variables should I be using, are they reliably predictable, is my model stable, etc, etc."

My recommendation is simple: before going to a neural network model, you need to have a simple regression model working, i.e. capable of predicting the phenomenon in question with statistical confidence. I love complex nonlinear methods, but I'm recommending linear regression (logistic regression if you are predicting a categorical variable instead of a continuous variable).

Of course this ought to include significant variable selection, and very importantly cross-validation and regularization (i.e. "ridge regression"). You ought to think about the inputs and target variable, and try various nonlinear transformations of the input and output, i.e. manual ones.

Fitting a single regression model can be done in one deterministic step, unlike neural networks (problem is called "convex" in optimization-speak), but then you ought to be doing it over random resamples of the population and folds in cross-validation. At first, bypass the complexity and heuristics of fitting neural networks (yes, it really is a "black art" unfortunately) and work on more important data and statistical issues with a simple, linear model first.

A former colleague of mine did work in a quantitative hedge fund and he asserted that anything which worked had to work with simple regression. After that, then yes, fancier stuff might be able to extract a bit more performance, but basic research starts with simplicity.

I'd much rather trade a linear model with 4 inputs (possibly derived themselves with some fundamental insight) which was crafted from well bootstrapped and bagged models (look up "boosting" and "bagging") with enough out of sample analysis to convince me there really is some phenomenon there. Even in our products we can often get 80% of the performance of the neural network with regression models (there is lots of secret sauce in the input variables).

I really do like neural networks---in the right application they do kick ass.

## Comments

Yep

I agree with him. I noticed, strong linear and non-linear regression algorithm helps to gain a few % winning trades, but that's all. That's why I am thinking about clearing the input data in timeseries, before feeding any neuronal net. Also, as we talked before, the market is blind and as you wrote before, got no memory from the past. It's like a red fish w/ just 2 seconds of memory brain.

The answer is NOT in neuronal net, but somewhere else. and the FGDI/Hurst/Lyapunov shows a good start of thinking about the nature of the current market. Whatever is your strategy, if the market is chaotic, the strategy can not work and becomes to be a gambling strategy.

If there is any success, it's just pure luck

Someone wrote it was possible to open trades at FGDI entry signals and being successfull

I got from him one important idea, that the neural net is a kind of a turbo charger. It would help to squeeze more pips from already profitable strategy.

And the idea that you start from something simple in the beginning.

For example the idea behind the fractal scalper is workin without any kernel tricks. The kernel tricks we deploy would help to squeeze more pips.

So that is why I consider those functions a an add-on to any good idea and not an end in themselves.

I was experimentig today from the simple Moving average EA available as the default EA in MT4.

In the default EA I was training from 16.02.12 to 24.02.12. And as you can imagine there were a lot of good answers. But when out of sample (from 25.02. 12 until today 21.02.12) most of those good settings did not perform. Several were really goo. But how to know which one are good and which one are bad.

Is there anything that will tell you from the good settings which one are really good and which one are deceptive.

This is a central question after all for all trading algorythm.

The to this basic strategy I applied a string equation, and I let the genetic optimizer choose the best lenght of the moving average.

I was very surprised it worked quite well.

And the first 10 results they all worked.In the normal Moving average EA it produce also profitable in sample results but out of sample there os no way to know beforehand which settings to use some proftable some not at all.

The string equation looks like this:

The string parameters are:

extern double n=1;//

nth harmonicextern double f=1;// frequency

extern double T=1;// is the tension

extern double M=1; is the linear density

extern int x1=1

extern int x2=1

extern int x3=1

check this link:

With the genetic optimizer we are looking for the Lenght of the string.

And then ma=stringMA() that is how it is used in the expert

John and Anyone,

How can I use iVeryCoolSpectrometr indicator http://codebase.mql4.com/ru/5989 for neural network purpose?It says''the intensity of yellow color corresponds to the amplitude: the more intense the color, the higher amplitude''.Should it be used as input for market state regime?For example '' we tell NN to look for higher amplitude?

I think this is more related with the determination of the dominant period and based on that information to adapt the oscillators on the half of the period of the dominant cycle.

According to Ehlers MESA is far better than Fourrier.

Once you get an adaptation over the filter itself you can put into an AI.