Page 1 of 1

Neural Networks

Posted: Mon Jul 07, 2003 10:48 am
by Vince
Does anybody have any comments, as to the merits, of the use of neural networks in the the development and testing of dynamic trading systems?

Re: Neural Networks

Posted: Mon Jul 07, 2003 1:08 pm
by gfullmer
Vince wrote:Does anybody have any comments, as to the merits, of the use of neural networks in the the development and testing of dynamic trading systems?
1. All systems are neural based. That is we use real neural networks! I think you were referring to Artificial Neural Networks! ;-)

2. They are, like the markets themselves and descretionary trading not understandable. Unlike, traditionally coded systems, figuring out the rules behind a decision can be difficult and changing that logic next to impossible without a number of counter examples. :(

3. They require a lot of examples that include data that is readily available. :)

4. They have yet to be shown (to me at least) to be more effective than rule-based systems. :(

5. They require large memory space to be at all effective. :(

6. They can be programmed automatically and by example. :)

All in all - :( for now.

Glen

Artificial Neural Networks

Posted: Mon Jul 07, 2003 1:16 pm
by Vince
gfullmer,

Thanks for your response. I am aware of their limitations. This is the start of an exploration, into how to build, fully dynamic trading systems. At the moment, my systems leave many of their indicators behind, in that they are fixed from the beginning of the test period. I need these indicators to be dynamic. I might be looking at doing an exhaustive search for optimum settings, in a dynamic way, such as the chess playing programs. If you have any ideas.....

Vince

Posted: Mon Jul 07, 2003 1:59 pm
by gfullmer
HI Vince,

There are a number of ways that systems play that game.

You can still have a rule-based system and have dynamic parameters. Wealth Lab's (wealth-lab.com) scripting language has the ability to build systems whose simulation use parameters that have a range for optimization and it basically loops through that range and runs a simulation on each parameter value and picks the best one. There is no reason, except compute time, that you couldn't do that yourself in traditional programming language.

I could be wrong here, but all of the good chess programs that I am aware use rule-based systems. Some of the ANN ones that I have seen are getting better, but do not compete well with the rule-based ones.

Perhaps a combination of both might be appropriate with market trading systems. The ANN would identify a pattern in a particular market and then the rule-based system could kick in and provide the specific trades for that market. I would be interested in seeing a good ANN system identify a trend. That is one task that it should be better at.

Are you writing your own ANN system or using some else's?

Glen

Posted: Mon Jul 07, 2003 2:09 pm
by Vince
Hi Glen
Are you writing your own NN system or using some else's?
Just exploring at the moment. If I can be convinced that they are of use, then I would have to write my own, to get the flexibility I would want.
Wealth Lab's (wealth-lab.com) scripting language has the ability to build systems whose simulation use parameters that have a range for optimization and they basically loop through that range and run a simulation on each parameter value and picks the best one.
This might be the route I take. Can I use the Wealth Lab scripting language like a traditional 3GL language, such as C or VB?

Posted: Mon Jul 07, 2003 2:16 pm
by gfullmer
This might be the route I take. Can I use the Wealth Lab scripting language like a traditional 3GL language, such as C or VB?
Yes, in one sense - it is a programming language, but in another sense - no, because it is interpretive and requires their system to run. It might be a way to verify your system, however.

Glen

Posted: Mon Jul 07, 2003 2:29 pm
by Vince
use parameters that have a range for optimization
Ideally, you need to put some kind of intelligence into this search, rather than a tour de force search of all the values....I wonder.....

The search is slightly bounded, in that you will know that many of the parameter settings are not relevant. For example, if you were looking for the optimum Leverage setting, based on the last X trades, then you couldn't exceed certain values, defined by margin requirement.

Its still a large search space.......hmmmmm.......

Any ideas?

Posted: Mon Jul 07, 2003 3:38 pm
by gfullmer
Ideally, you need to put some kind of intelligence into this search, rather than a tour de force search of all the values....I wonder.....
How many parameters are we talking about? How many do you know are mutually exclusive in the way they interact with the others?

A neat thing that ANNs do well is organizing large spaces. At Motorola the ANN group at the labs took all the movies and catalogued them all, by a number of parameters - rating, type, actors, date, director, etc. They you would navigate through the space (it was a 3-d graphic space) by choosing films you liked and it would show you films you might like based on the other films by where they were in the 3-d space. It was pretty good. They did evenutally use it to determine manufacturing problems that were not easily identified by the quality guys. It solved a number of issues that they couldn't figure out traditionally.

If you programmed a dynamic system and it has more than 7-10 parameters, I would bet that it would not be very robust. One thing I like about the Turtle Trading Rules and systems like it is that not only are they very simple and programmable, but they are robust over a number of different markets. I am still wondering whether TT works with stocks but that is another story.

You talked about ANN and your input to them? What output are you looking for? Do you want a trading system that is repeatable given the same data? One for multiple markets? I might argue that you could run the same program with the same data and in some instances even get different results. You are emulating a parallel process on a sequential machine and therefore, depending on the OS and a number of other factors your results might vary given the same input data!

Glen

Posted: Mon Jul 07, 2003 5:08 pm
by Vince
How many parameters are we talking about? How many do you know are mutually exclusive in the way they interact with the others?
There are 6 interacting indicators. But they can all be bounded by realistic settings so.........maybe its not that difficult.....
(it was a 3-d graphic space)
Seykota likes 3-d graphs.........yes....
They did evenutally use it to determine manufacturing problems that were not easily identified by the quality guys.
Do you have any reading material on this?
I am still wondering whether TT works with stocks but that is another story.
It does - I can prove it.

Thanks for your help

Posted: Mon Jul 07, 2003 5:24 pm
by Vince
If you programmed a dynamic system and it has more than 7-10 parameters, I would bet that it would not be very robust.
Thinking about it, I'm trying to achieve "regression to the mean", in recent history, time.

If I could achieve this, it would go a long way to stabilising the system.

I don't want to over/under trade, but rather, stay in the middle.

Posted: Wed Jul 09, 2003 8:45 am
by Vince
Commitment
"Do not look for magic systems. Do not look for the lazy man's way to riches...Read, study, listen, and think. Compare and compare. Make lists of pros ands cons. Make up scenarios. Make up opposite scenarios. Compare. When you get confused, back away. Start again. Watch. Listen. Compare. Never force a conclusion. Observe, compare, and wait."
-Trader's Manifesto, by Donald Worden, p.49

A different tack on NNs

Posted: Sat Jul 12, 2003 3:10 am
by blueberrycake
Here's an idea for a slightly different use of Neural Networks:

Instead of creating a black box neural network system, and using it as a trading system, you could instead use it as a discovery mechanism for a rule based system.

First, train your Neural Network on the sample data. Then reverse engineer it, and see which rules are "firing" on successful matches. Once you identify those rules, test them on their own without the neural network, and see if they are profitable and statistically stable. If they are, you've just built yourself a white-box rules based system, using the original neural network as an initial search algorithm.

-bbc

Re: A different tack on NNs

Posted: Sat Jul 12, 2003 10:05 am
by gfullmer
blueberrycake wrote:Here's an idea for a slightly different use of Neural Networks:
...
First, train your Neural Network on the sample data. Then reverse engineer it, and see which rules are "firing" on successful matches. ...
Isn't it the same as looking at a set of trades and trying to determine the rules behind those trades? From experience, that is not as easy as it looks.

Glen

Posted: Sat Jul 12, 2003 10:11 am
by gfullmer
Vince wrote:...
Without doubt, you have to work very hard to understand and program the TT rules (and all other rules), and I believe that they have been designed to be vague, on purpose, to get the brain ticking...

I hope this has been of some help.
Yes, I think it has. However, I think the TT rules are very easy to understand and not vauge at all. That is what is attractive about them. Or am I missing something here?

Glen

Posted: Sun Nov 16, 2003 10:44 pm
by Jason_L
bringing up an old thread like this may be a no-no, so I appologize in advance...

I burned many many hours trying to get an ANN that tested successfully, to no avail.. they either never trained, or those that did never tested well. I eventually put it on the back burner. However, I was thinking of working on using an ANN as a trade filter, training it on past rule generated trades and seeing if it could filter the bad trades..

Posted: Mon Nov 17, 2003 12:21 pm
by Forum Mgmnt
Reviving old threads is a good thing :) We often learn from fresh looks at old discussions, our perspective changes and so does our ability to understand given the new perspective.

Neural Nets seem pretty good at detecting patterns but are incapable of reason.

So provided there is a pattern to your bad trades before you entered them, you could theoretically use an ANN to find that pattern and help you filter your bad trades to have fewer of them.

The problem comes down to the training of the ANN. You'd need to have solved the problem yourself to train the ANN well because if you just fed it all the losers you would be training it with information that made it identify conditions that may actually lead to good trades. The filter might have the effect of reducing your profits as much as your losses, negating its value.

So you'd really want to feed it all the bad trades that you shouldn't have taken because of some other identifiable reason, meaning that you'd have to figure out a set of conditions to divide the trades into avoidable and unavoidable bad trades. Having solved the problem, you would probably find it easier to just directly change the algorithm not to take those trades by incorporating the same logic you used to make the division between avoidable and unavoidable.

I do think there are ways of using ANN's in trading but not to do what most people try to use them for. I think they'd have to be targetted to very specific situations that could be identified using, of all things, the human brain. I haven't put much time into this because I already know of so many things that work that I haven't got around to implementing yet. So work on ANN trading still sits in the middle of the priority list.

- Forum Mgmnt

Posted: Mon Nov 17, 2003 3:32 pm
by Jason_L
I'd use a multi-layer perceptitron with a training set that contained winners as well, and use a binary output. Then include input nuerons for things such as momentum, ROC, volume, etc.. let the ANN figure out the weightings of the inputs to arrive at the output. If there is any predicating signals in the input set, it should in theory be able to find them and ignore the rest. This sort of ANN doesn't really require you to know the pattern you're looking for, just that there's one somewhere in the input data and that you know the end result of the trade. <br><br>
You have a very good point on "avoidable" vs "unavoidable" - if there's not a preponderence of avoidable trades in the training set then the ANN probably would never train (and if it did, would not test). <br><br>
I gave up working on a complete ANN system a while ago though, and figured down the road if I had time i'd look at them for filters or simple pattern-recognition (for various reasons, I do prefer ANN pattern recognition over rules based where possible). My current rules-based signals and systems are now good enough that there just isn't enough bang-for-the-buck to give ANN's a higher priority, and like you I've pushed them down the list - but if I had a system with lower winning percentages I'd probably consider using them as filters again..