Neural Networks for trading - page 2

Marco vd Heijden
Moderator
13052
Marco vd Heijden  

Any addition to the raw feed will result in a dampening or narrowing of the eventual bandwidth.

If you want to train an AI to trade then it should have access to the raw feed and not some already altered version of what you think will be good for it.

The AI will create it's own version of moving average due to it's training.

If there is something that works way better then a moving average, then your AI will never find it because you limited it's input by tying it to a pre-set indicator of what you think will work, don't think and let the AI decide.

This feels like trying to control the speed of a car by continuously pressing the breaks, while holding down the gas throttle, it wants to go, but it can't because you won't let it. 

Icham Aidibe
11935
Icham Aidibe  
Marco vd Heijden:

Any addition to the raw feed will result in a dampening or narrowing of the eventual bandwidth.

If you want to train an AI to trade then it should have access to the raw feed and not some already altered version of what you think will be good for it.

The AI will create it's own version of moving average due to it's training.

If there is something that works way better then a moving average, then your AI will never find it because you limited it's input by tying it to a pre-set indicator of what you think will work, don't think and let the AI decide.

This feels like trying to control the speed of a car by continuously pressing the breaks, while holding down the gas throttle, it wants to go, but it can't because you won't let it. 

I used to claim that IA weren't really intelligent, and indeed, it can be trained as much as you want but it won't never ever define alone a strategy. How could it ? 

Could you please dear @Marco vd Heijden develop your idea ? I'm interested.

Chris70
543
Chris70  
Icham Aidibe:

I used to claim that IA weren't really intelligent, and indeed, it can be trained as much as you want but it won't never ever define alone a strategy. How could it ? 

Could you please dear @Marco vd Heijden develop your idea ? I'm interested.

It reminds me of a similar discussion we've had in the german part of the forum the past few days. If you have ever used the strategy optimizer tool inside Metatrader (which you have done probably hundreds of times) you have documented to yourself your belief that AI can actually help with decision making to some degree, e.g. by selecting the parameters that you want to use for further forward testing.

What artificial intelligence / machine learning can't(!) do on the other hand is predicting the markets at times when there just ain't absolute no autocorrelation between the past and the future. And this is most times. You can only act upon the status quo. Digital filters or classical methods of statistics can help distinguish the signal from the noise. And whenever something happens that's significantly out of the usual noise range, this might indicate a change of direction. Finally, that's what all trading concepts are based on somehow. No artificial intelligence needed for that. But then again, AI can help with decision making by penalizing bad decisions and giving credit to profitable decisions. This is why I believe much more in reinforcement learning than in prediction of the future. AI is absolutely helpful with trading as long as you use the right method for the right purpose. Price prediction with neural networks is just an example where method and purpose don't get along. It has been tried by thousands of people before. I agree with Marco vd Heijden that pure price would still be the best input but the general idea is just too weak compared to other trading concepts.

Marco vd Heijden
Moderator
13052
Marco vd Heijden  
Icham Aidibe:

I used to claim that IA weren't really intelligent, and indeed, it can be trained as much as you want but it won't never ever define alone a strategy. How could it ? 

Could you please dear @Marco vd Heijden develop your idea ? I'm interested.

Of course it can create it's own strategy given that you allow it to do that by setting up the correct environment for that to happen.

That is how these AI's outperformed human players in these board games like chess and alpha go.

They start with nothing and only know win from lose.

The goal could be for example, to stay in the game for as long as possible.

It will try every possible sequence of actions at first, and train or learn from the feedback it gets.

At first this is just a random sequence of actions but the AI learns that if it does certain things in a specific way, it will stay longer in the game.

So that is most certainly how it develops it's own strategy.


These AI can be particularity useful in terms of trading correlation.

It's easy for these types of robots to monitor multiple market feeds and discover underlying multi symbol patterns.

And it will also learn things like weak and strong links between economy's and how long these last, and how far they usually go.

The ideal word here is limitless or unlimited, either one.

And this example above is only a trading robot AI that feeds off of raw price feeds, it is limited in the sense that it could never go beyond that.


There have been rumors about AI that are already so advanced that it feeds off of the internet directly and has the ability to interact with it.

These AI learn and discover and became so smart that it learned it could actually drive events or price by injecting fake stimuli on forehand.

Now that's a whole new level of intelligence.


I recently started a test myself and the outcome has completely got me puzzled.

Unfortunately i can not go into the deep details about it, but it had to do with how many times i deliberately injected a specific keyword onto some popular social media sites.

I discovered that there is a direct link between the count of keyword injections, and the market price of the target.

So probably there are already AI crawling the internet to look for popular trends.


Was my keyword injector controlling the AI's that in term controlled the target market ?

I guess the fake news story works in both ways, i mean the AI learned it can drive events by releasing false stimuli, but the same things seem to happen when we release these fake stimuli ourselves, in reverse to control the AI.

I feel this is going to be the way we are going to have to fight out of control AI in the future.

You could say we learned from the AI it's tricks and used them ourselves to trick themselves.

Or it could just be a coincidence who knows...

Icham Aidibe
11935
Icham Aidibe  
Marco vd Heijden:

Of course it can create it's own strategy given that you allow it to do that by setting up the correct environment for that to happen.

That is how these AI's outperformed human players in these board games like chess and alpha go.

They start with nothing and only know win from lose.

The goal could be for example, to stay in the game for as long as possible.

It will try every possible sequence of actions at first, and train or learn from the feedback it gets.

At first this is just a random sequence of actions but the AI learns that if it does certain things in a specific way, it will stay longer in the game.

So that is most certainly how it develops it's own strategy.


These AI can be particularity useful in terms of trading correlation.

It's easy for these types of robots to monitor multiple market feeds and discover underlying multi symbol patterns.

And it will also learn things like weak and strong links between economy's and how long these last, and how far they usually go.

The ideal word here is limitless or unlimited, either one.

And this example above is only a trading robot AI that feeds off of raw price feeds, it is limited in the sense that it could never go beyond that.


There have been rumors about AI that are already so advanced that it feeds off of the internet directly and has the ability to interact with it.

These AI learn and discover and became so smart that it learned it could actually drive events or price by injecting fake stimuli on forehand.

Now that's a whole new level of intelligence.


I recently started a test myself and the outcome has completely got me puzzled.

Unfortunately i can not go into the deep details about it, but it had to do with how many times i deliberately injected a specific keyword onto some popular social media sites.

I discovered that there is a direct link between the count of keyword injections, and the market price of the target.

So probably there are already AI crawling the internet to look for popular trends.


Was my keyword injector controlling the AI's that in term controlled the target market ?

I guess the fake news story works in both ways, i mean the AI learned it can drive events by releasing false stimuli, but the same things seem to happen when we release these fake stimuli ourselves, in reverse to control the AI.

I feel this is going to be the way we are going to have to fight out of control AI in the future.

You could say we learned from the AI it's tricks and used them ourselves to trick themselves.

Or it could just be a coincidence who knows...

Well ... whatever :) What I mean is that those EA playing chess, are teached on which piece could perform which movement - the queen doesn't move as the king do right ? Then eventually from many moves based on theses rules, it elaborates alone a strategy after thousand games.

To come back to trading, how would you learn your IA what should be bought & what should be sold ? Do you mean it could start by buying & selling arbitrarly and learn from the craft ? If so do you have a idea on how huge would be the sample for training ? 

Dua Yong Rew
5766
Dua Yong Rew  
Pedro Severin:

I don't get it...I mean, for example, moving averages are based on prices (close price, open price, high,low,typical,etc). ATR is based on price also, many indicators are price based, so why an indicator like this would be a bad choice?

And, for example, if only raw prices, you would take prices of the last candles? The highs,lows,closes? Or tick prices that are coming right now? And how would you use the backpropagation function in this case?

Some indicators are oscillator based like macd, rsi, stochastic...

These in my opinion if trained in nn will not be of any benefit

Indicator like moving average, atr are fine

Pedro Severin
1260
Pedro Severin  
Chris70:

It reminds me of a similar discussion we've had in the german part of the forum the past few days. If you have ever used the strategy optimizer tool inside Metatrader (which you have done probably hundreds of times) you have documented to yourself your belief that AI can actually help with decision making to some degree, e.g. by selecting the parameters that you want to use for further forward testing.

What artificial intelligence / machine learning can't(!) do on the other hand is predicting the markets at times when there just ain't absolute no autocorrelation between the past and the future. And this is most times. You can only act upon the status quo. Digital filters or classical methods of statistics can help distinguish the signal from the noise. And whenever something happens that's significantly out of the usual noise range, this might indicate a change of direction. Finally, that's what all trading concepts are based on somehow. No artificial intelligence needed for that. But then again, AI can help with decision making by penalizing bad decisions and giving credit to profitable decisions. This is why I believe much more in reinforcement learning than in prediction of the future. AI is absolutely helpful with trading as long as you use the right method for the right purpose. Price prediction with neural networks is just an example where method and purpose don't get along. It has been tried by thousands of people before. I agree with Marco vd Heijden that pure price would still be the best input but the general idea is just too weak compared to other trading concepts.

Other trading concepts like which ones?

By the way, I do not think that AI/ML/NN are any good to predict future prices, but to determine market states or what price will probably do. For example, you have different type of trends: ones that are more volatile, others that are like flat for a period and then it resumes.

I think that approach allows to do different strategies for different type of markets.

Pedro Severin
1260
Pedro Severin  
Dua Yong Rew:

Some indicators are oscillator based like macd, rsi, stochastic...

These in my opinion if trained in nn will not be of any benefit

Indicator like moving average, atr are fine

Thank you for your reply. But how do I train those "in the way". Is any reliable to adjust the weights of the NN in a function coded in the EA?

Chris70
543
Chris70  

@Pedro Severin:

Don't get me wrong - I'm a big fan of AI and I'm also experimenting with it for my own trading. Also neural networks certainly do play a role in some areas. Sentiment analysis via automated analysis of twitter tweets and news feeds are a good example (which I don't personally use, but it's no secret that this can indeed give you a bit of an edge). I remember an episode of the podcast series "chat with traders" where one of the interview partners (don't remember who it was) even told about cases of automated satellite image analysis like counting cars on parking lots in order to estimate future earnings of a supermarket company or images of crop fields for estimation of future harvest yield affecting things like wheat price... I'm not saying we're all having access to satellite images, but you just have to be crazy enough and feed AI with sophisticated data and an edge is certainly possible. You have to find the niche that nobody thought about. What is an illusion on the other hand is getting much out of just price, volatility and volume. And I absolutely agree with Marco that indicators like moving averages and ATR further limit the attainable information compared to pure price. An arithmetic mean like MA for price or ATR for price ranges e.g. doesn't tell anything about the order (time) of the individual elements that the average is built from. The 3-period MA of the number time series 1,2,3,4,5,6 is the same as from 1,2,3,6,5,4. This time information gets lost for example, compared to a pure price time series, which is an unnecessary limitation.

You're saying you dont' want to predict future prices. Okay. But then you mention flat and volatile markets. If were talking about methods of supervised learning like neural networks are, then the question is: what's the label that the network input is measured against? Volatilty in hindsight? What else would your error feedback be, that you backpropagate from? But if FUTURE volatility is our output, we are indeed predicting. For the volatility of the status quo we don't need AI.

You asked for other concepts. I have good personal results with decision making via genetic algorithms and q-learning. There are certainly many other possibilities that I can't speak about from personal experience (I must mention: I had built my libraries for MLPs and LSTMs when I had a higher expection towards these, but now that I could easily implement them in any algo, the use cases that actually help with better results hardly exist).

Chris.

Marco vd Heijden
Moderator
13052
Marco vd Heijden  
Icham Aidibe:

Well ... whatever :) What I mean is that those EA playing chess, are teached on which piece could perform which movement - the queen doesn't move as the king do right ? Then eventually from many moves based on theses rules, it elaborates alone a strategy after thousand games.

No.

They just try to do moves that are not possible in the beginning, which result in a immediate losing of the game by disqualification.

Then they will discover and learn what piece can do what moves, automatically over time.

It does not know the rules when it starts but since an illegal move results in a direct loss it will teach itself not to make those again.


Icham Aidibe:

To come back to trading, how would you learn your IA what should be bought & what should be sold ? Do you mean it could start by buying & selling arbitrarly and learn from the craft ? If so do you have a idea on how huge would be the sample for training ? 

This is what it does by itself, you do not have to teach it anything. 

At first it will just place random orders and observe the outcomes.

But then it will have placed so many orders that it will start to identify patterns.

This results in pattern recognition and the sooner it will be able to tell what pattern is evolving, the sooner it can enter the trades.

This is no different then voice or facial recognition or reading human handwriting or recognizing a cat in a picture.

These techniques usually start out by using a base neuronet that is universally adaptable and expandable in size.

Then the input environment and gates are set up and configured and the network is trained resulting in the weights output for each neuron.