Are the neural networks the ultimate Holy Grail?

Are neural networks the ultimate Holy Grail? Because they look to me like that, if you are able to predict the market with just 51% accuracy and limit your RR to 1:1 you have a holy grail.

So the neural networks do nothing more than just learn past data (lucky if you have 20 year historic data), and learning the mini fluctuations they calculate what is the probability of X movement will generate Y outcome, and output the most likely ,according to my understanding.

That means if you have a huge database of historical data ,which i have, you can compute with atleast 51% accuracy the market , a.k.a the Holy Grail :slight_smile:

Anyone here expert in neural networks, im trying to learn more about them.Maybe any useful links where to learn to program them (im expert in C++,C#,MQL4)?

Or did any one of you guys used any neural network, i`m really curious about your performance, please respond guys.Thanks! :smiley:

Any ideas?

I don’t think there will ever be a holy grail and if you need all that for just 51% accuracy and call that a holy grail than that is a bit low in my book. Either way good luck with your idea.

The question seems to be the wrong way around. I would say the technique for measuring the opportunity is not the most important thing, it is the factors input into the model that are.

Realistically a neural net is a set of logistic models with either univariate or multivariate parameters for each neuron. The power of the net comes from connecting them so the output of one is the input of another. The variations of NN type are methods of connecting the neurons and how to calibrate parameters i.e. (feed forward, back propogation, recurent etc).

They are incredibly useful and I believe cannot be matched for things like hand writing recognition. They are however very, very non linear (you have no idea why they work) and are very suseptable to over optimisation due to their flexablilty.

There is another mathematical issue that i would like to highlight. When you take the number of trades that you win vs. total trades that is an estimator of your mean accuracy, not the true population mean. i.e all trades you will ever do. Any estimator, in this case percentage accuracy is pointless unless associated with a varaince by which it is possible to work out the statistical likelihood of the null hyphotesis H0: that your accuracy is < 50% being true.

As to languages, if you want to play new techniques the try it in a higher level language like R.

Yes atleast 51%, 51% with 1:1 RR is already profitable, but the winrate is not a constant it’s a variable, so you would need probably higher winrate than that, JUST IN CASE.

As for neural nets, i`ve seen this is the new sensation.Many hedge funds already use them and some say they can predict market swings with 70% accuracy.If that’s the case i would sign up too :smiley:

So my question would be, how big does that buffer need to be and how do you work it out?

I would not fall into that trap, i know that you should not train the net on more than ~20% of your data.Higher than that will exponentially lower your prediction capability.

Yet many HF’s use them and make millions of $ with them.There must work or else nobody would bother.The smart guys at the top pick up faster quality trading methods than a casual trader.

Of couse its the mean of the sample, but what are you trying to say, the forex market is an infinite sized population, you can always add another candle to it so the best you can do is estimate the mean WR of your database.Which i can do very well since i have 20 years historical data on 25 forex pairs :wink:

No ty im fine, im already pro in C based languages, R seems to me less object oriented and similar to Pascal, which i hated always.I can do the same in C based - even more efficiently than in other languages :slight_smile:

What buffer?

I seriously dont understand you. Sometimes you say some really interesting things then you say stuff like this.

If you flip a coin 100 times and you get 51 heads and 49 tails is the coin fair? If so then how many heads vs. tails do you need to see for you to deem the coin to not be fair?

Define pro in c languages just so i know what you mean.

What are you talking about man.I dont know how you define a winrate, but i do it as the following:
nr of winner trades / total nr of trades * 100 (mean WR of the entire sample)
But thats still the estimate.Since after 100 more trades fill follow, they will change the prev number.So the population size is infinite, because you will trade continuously.

But i dont understand what this has to do with NN?

As for pro in c language, well i meant C++,C# and normal C, and since MQL4 is C based, i`m also good in that.I have 10 year experience in C, i program it since my teen years.

I have a big database, if i run a backtest on the whole database, the estimate becomes pretty accurate.Also if the standard deviation of the winrate’s step by step calculated are less than 0.5 σ , i find that also a good sign of accuracy.I dont like too much distorted peaks which dont follow the mean WR.

Yes, I know several hedge funds who are kicking out accuracy like that but the investment is usually several million dollars.

Absolutely agree, i wonder if these HF’s use neural networks:

  1. Senvest Partners, LTD - Class A has returned 46.44% in 2013

  2. Marilyn Fund LP is up 45.21% this year

  3. Andurand Commodities Fund has a return of 44.44%

  4. Perceptive Lifesciences Offsh fund, Ltd has returned 44.22%

  5. SR Global Fund H - Japan (Real Perf) is up 36.80%

  6. The return of Blue Sky Japan Ltd - Class A is up 36.77%

full list here:
Hedge Fund Returns in 2013: The Top 20 - Insider Monkey

But anyway let me know your opinion about NN, for example if you know that are so good do you use one Rambo?

20% is a very aribtrary number so I don’t really have a reponse for that. IMO its based on the strategy type and one size fits all doesnt work. I do get your point that you shouldnt fit on all your data but why 20%? Why not 25% of 40%?

I think you are confusing logical implication

A=>B i.e. fund => uses NN
A=>C i.e. fund => good pnl
does not mean B=>C i.e. NN => good pnl

This is something that is abused massively in politics to make incorrect transitive assumptions about minority groups.

Also another point the big funds are heaviliy diversified. Its like saying i am a plumber and i only use a hammer. I will say NN might be a good thing to have in the toolbox but its far from a “holy grail”.

You might find some advantage from prototyping in one language and then coding properly in another. I was suggesting R or actually python for prototyping. Their library support is really good for these things so if you just want to try something out then there are some toolkits libraries that mean you can do something that would take you a week in c, but a few hours in python. Either way scikit-learn: machine learning in Python — scikit-learn 0.14 documentation is worth a look for a few different models.

Yes it was an arbitrary number and it was only mean to suggest that overoptimization is bad.Training the NN on a small data is much much more effective than on the entire database.

I think you are confusing logical implication

A=>B i.e. fund => uses NN
A=>C i.e. fund => good pnl
does not mean B=>C i.e. NN => good pnl

This is something that is abused massively in politics to make incorrect transitive assumptions about minority groups.

Also another point the big funds are heaviliy diversified. Its like saying i am a plumber and i only use a hammer. I will say NN might be a good thing to have in the toolbox but its far from a “holy grail”.

Maybe, but i have to use all tools to beat the market.The hammer is just not enough i also want the skewdriver , the wrench and the pliers to have maximum edge over the market.

Forex is not a kid’s game you have to use all the advanteges here,to beat the market, you cant just hold the aces under your sleeve, its all-in ,friend! :53::53::53::53:

Do you think hedge funds dont care about their performance ? I believe they use all their tricks to beat the market.

And how do you define a holy grail.I also mentioned in another topic, to me a holy grail is nothing more than a working strategy thats will always work and bring good $$$.

And apparently a self adapting dynamic algorithm is just the definition for that.It never gets out of date as long as you have fresh data.

Thanks fur suggestion , but i would like it to build it from level 0 , neuron by neuron so that i can learn more that way.Using custom functions and libraries not really known by me is not a very good way to learn.I`m already familiar with most of the C based functions so there is no point to start playing with custom libraries.It can be programmed very well with the net framework 4.5 functions so i dont need any custom junks.

Running a portfolio of strategies, some that are doing well some that are ok and some that are losing money. Diversification is the key, that and managing your losers well i.e. knowing when they should be turned off as opposed to are statistically having a drawdown.

In regards to doing it from scratch i respect that if you want to do it that way.

To understand a single neuron look at this Logistic function - Wikipedia, the free encyclopedia. The function 1/(1+exp(-x)) is the important one. Your neuron tuning parmeter should be say a. so you get 1/(1+exp(-a*x)). In this case x would be something you are looking at such as the price change. This nueron will then output a number within [0,1] you can say it “fires” if the output is greater than 0.5. this might for instance trigger a trade.

To connect them together you simply modify this logistic function. If you have a nureon W and a nueron Z both with outputs in the range [0,1] the you would make the final nueron 1/(1+exp(-aW -bZ)). then you are using a nueron to combine and tailor the output of other layers of nuerons. you thus in the 3 neron case have 2 in the first layer and 1 in the final layer with 4 tuning
paramters. 1 for W, 1 for Z and 2 for the final nueron.

The power comes from how you connect the inputs in to each other and later them. But you should be able to see for the formula that writing a class that takes N inputs and has N parameters and outputs the logistic function output should be simple. You can then play with how you connect them.

I would also recomend reading around here.

Artificial neural network - Wikipedia, the free encyclopedia
Feedforward neural network - Wikipedia, the free encyclopedia
and my favourite
Recurrent neural network - Wikipedia, the free encyclopedia

The other thing to note is they are a complete ***** to train. Its an art in itself and they are very unstable. You add one more day of data and get a completely different NN calibration. I know a lot about them but i dont use them for this reason.

To optimise them you should look into generic algorithms since the optimisation is non linear and highly dimensional.

Thanks bro, i will read them, but I already found a great series of tutorials how to build one in C#,which is exactly what i want :slight_smile: :

Yep i thought of this, that is why i though of an additional code which will inject all combinations of data into it.Then check the correlation between the market line and the prediction line of the NN and pick the one combination which is the most correlated with the price :slight_smile:

Of course there could be billions of combinations, but “Rome wasn’t built in a day”, becoming a millionaire is not something you achieve in 1 night.But once you find a good combination, it will be a Holy Grail.

BTW i already have a good strategy to start with, i only need my neurons now.

No it’s not.

Yes it is.But only if the standard deviation of the winrate is smaller than 0.5 σ :slight_smile:

+It depends on the size of the sample.If you backtest on 10 years data and come up with 51% WR and 1:1 RR, that doesnt necessarly mean that in 2012-2013 you had a positive profit.It means that if you’d traded from 2001 to 2013 youd have a positive profit.Its not the same.The 51% WR is the mean, and the smaller the deviation the better chance of having positive results each year :wink:

Answer these: Will your stops and t/p sizes always be a consistent static number i. e. 100 pips? And will you only ever trade one pair?