Re: Proof that neural nets work



4x(1-x) starting with 0.80 rounded to two places =
0.80
0.64
0.92
0.29
0.82
0.59
0.97
0.12
0.42
0.97
0.12

And then it starts to repeat the same sequence (0.12,0.42,0.97) due
to the rounding. As a "random number generator" it sux (rounding off
at six places rather two would give it a much greater "period"), but
..>here's the thing. You can indeed use a neural net to PERFECTLY
predict a sequence of apparently "random" numbers, after some
amount of "training", if indeed those numbers are generated by
some unknown, but continuously and precisely applied discrete
function.

OK I'm with you so far....

But what happens if the function is both unknown and only applied
sometimes and not precisely? Or for that matter, what happens to
your "training" if, for example, you are currently perfectly predicting the
sequence of an unknown "random" number generator and then they
re-seed the generator?

Yes, in fact, here's a very specific example: if the random numbers
are the result of RSA encoding the sequence 1,2,3,4,5,6,7....
(which are, in fact, an example of a type of pseudo random number
sequence similar to what computer
programs put out),
we KNOW it cannot be predicted by any existing computer algorithm. So
certainly
a neural network couldn't predict that, even though it's in principle
predictable.

The point is, no one could predict even one function, but since the
four functions entered are related to each other (but not linearly) the
neural network was able to figure out and predict all of them
perfectly.


This is what makes nueral networks "neat".


What does that prove? Not that neural networks can predict the stock
market. It proves this particular one does what neural networks can do
best: when there is a relation between graphs, it will find it, and use
that to its advantage to predict one into the future.


Again, that's "neat".

yeah...


This is very different from linear algebra, or linear regression. The
relation between these functions is very complicated and indirect. Only
a neural network could do this.


I must again say "neat".

Yeah, I wish I'd invented neural nets. I think I could have but maybe
that's always the case with
a great idea, it is so simple you think, 'I could have thought of
htat!'


Now, a net like Stock100 that just runs automatically cannot really do
anything useful. You have to have human cognition first, to imagine a
.relation between various tickers and volumes. Then, a neural net can
tell you whether that relationship is real, and quantifiable.


Yes, which is why I fooled around with neural nets a LONG time
ago to try to "predict" the stock market...


That works in GoldenGem because, when you set sensitivity to zero, the
net is blinded to the blue curve (the present day stock values) and
only sees the red curve (the historical prices and volumes). So if the
green curve it produces is matching the blue curve, this means, it HAS
found a mathematical relationship.


Well, did it? Has anybody done this (knowing that I did this almost
twenty years ago, and many others claim to have done it)? If you, or
anybody did it, how closely did the "blue curve" (actual values) match
the "green curve" (predicted values)? How much price/volume data
did you feed it, what was the period of the data?

Well, I am starting from knowing little about the stock market, going
back to that big drop in
Microsoft a few weeks ago, and trying to see what tickers I can load
alongside Microsoft that
match the graph. I have a description on my university website of the
attempt, which proved
that the shares I loaded did not have anything to do with that drop
(disappointing). It is
http://www.maths.warwick.ac.uk/~moody/goldengem.html


But let's start with price data alone, and look at it from some other
angles. If we look at daily data (or really any period of data), we
"discover" that there IS a simple mathematical relationship, a
STATISTICAL relationship, between today's data and yesterday's
data, because if we plot a histogram of the change between the
two days, we get something sort of resembling a "normal curve",
with a lot of data points clustering around a very small change,
and very few for a large change.

OK I'm with you so far.


Likewise, from chaos theory, our first pass at "attractor reconstruction"
(n vs. n-1), shows a little fuzzy but easily discernable "attraction" of
today's stock prices to yesterday's stock prices. But just plain old
logic and common sense and any amount of experience says that
of course traders base their bids and asks in the market on the most
recent sales prices, just like people believe that if their next door
neighbor sold their house for $1,000,000, THEY should also get
$1,000,000...and they'll stick to that unless there are other factors
that cause or allow them to raise or lower the price.


This is making perfect sense to me so far...

Now, as a practical matter, after running the neural net on the
same amount of data as was required to come to the above
conclusions, can it actually provide a more profitable prediction
than from what we learned (or already knew) above? If not,
then we're actually a step behind with the neural net, because
we haven't LEARNED anything, due to the "black box" nature
of the predictions...

OK it is REALLY GREAT that you raised this point and I hope you'll be
happy with my answer. On
my goldengem website, I have a practise exercise. The practise exercise
is to first get used
to training the net with the days slider at zero (so it is predicting
TODAYS price, based on
all prices and shares. You get to see the net realize "Hey, you're just
asking me for one of the
prices you yourself have input!" and it matches perfectly.

Then, you ease the slider to the right and let it settle again. So,
it's starting from a point of
being trained to know that today's price of the share you are looking
at, probably is going to
have a lot to do with today's price, and then you move it a little.

If there is no relationship, what you see is the same graph shifted to
the right. In other words,
if it cannot do better, usign other loaded volumes and shares (and the
loaded volume of the target share)
than just to say 'it is probably going to be the same price as last
time you checked,' it will do exactly
that.

But, sometimes it does a lot better...throughout historical time it is
able to match tomorrow's price knowing
todays prices and volumes.

BUT there is still another thing that can go wrong. Since you are
teaching it as it goes along, it may
be just doing what you tell it it should be doing (match the future
target price).

BUT if you set sensitivity to zero, and it still matches throughout
historical time, this means that there WAS
a mathematical relationship, it CAN throughought historical time,
determine tomorrow's price from today's data.

STILL there is a possibility of a further problem: the match throughout
historical time may have been an
unlikely coincidence. To minimize probability of that, use a minimum
number of loaded shares.

Finally, there is always the possibility that circumstances will change
(ie oil wil lbe discovered, a press
story will come out) and a valid existing relationship will change.

---------------

I am sort of proud of what I just wrote there, because I think I may
have really nailed your
question. Let me know if not, I think it was a great question anyway.




We are not expert investors, we are providing a mathematical service
here. To check that we have not made any mistakes,we can use GoldenGem
to predict very complicated mathematical functions. We ourselves are
not using it in the stock market, and we do not know how.


Yeah, that's one of the keys to fooling around with neural nets, or
really doing anything to try to "predict" the stock market. You gotta
first know what data is important, and the question is, how do you
come to THOSE conclusions? It's kind of like a chicken and egg
thing...

Yes, I guess it also must come down to some people having an intutiive
idea what to do and using the net to extend it just a little, to handle
more capacity for calculation than their own mind. But the creativity
etc comes from the human mind....


It is very clear if we entered too many stocks, or entered just all of
then, it would get a fit, but for the wrong reasons (essentially because
with enough input data there will be enough random connections for it
to find a fit).


A>h yes, this is where "artificial intelligence" turns neatly into
"artificial
stupidity", where a computer can even more efficiently find "patterns"
in the market that are ridiculously non-existent.

However, I still believe that "natural stupidity" is the best stupidity of
all. At least a computer can't talk itself into a completely retarded trade
the way a human can, which is why I do like to take the advice of
my computer as much as possible, if only to "avoid mistakes"...

Yes. I was thinking, you know how they say averages (like S&P average)
do
better than investors and trusts? One reason could be that when
a share price bottoms out it gets replaced by a share at the top,
whereas
an actual fund manager has to produce funds to cover the difference.
Another
reason might be humans buy when something is fashionable (hence
overpriced).

But if a person has an idea that a connection might
exist, that certain share activity might predict certain other, the way
to make that rigoruos, and quantify it, and get a prediction based on
that would be defniitely to use a neural net.


Yeah, that's the general drill, more specifically you're gonna have to
quantify any results you get statistically, and then ponder why the results
are the way they are, and after you've done all that, you might have
been better off taking a different tack.

I DID get "interesting" results from neural nets in trying to "predict" the
market, but did feel that I needed to try different approaches to really
r>efine effective strategies. One of the problems I haven't even
addressed
i>s the quality of a lot of the relevant data (or the data I "think" is

relevant),
and how well does a neural net work when fed a diet of politically
motivated BS.



And I can certainly
promise that GoldenGem would be the one to use.


Well, since I've used neural nets in the past, I'd recommend them
to everybody, on the basis that if I've done something it must be brilliant
and useful. Hell, I've thought about digging out my old neural net
software and running some tests on the data sets I currently use for
market "predictions" and see how closely the numbers match up
against my money-flow model algorithms...


We're curious to learn about your algorithms.

Wow I really loved this thread, hope it's OK if I copy it onto my
website?

J Moody

.



Relevant Pages

  • Re: Proof that neural nets work
    ... so would it be fair to say that if there is an input to stock prices ... that you are not using as an input to the neural net, ... Well, I am starting from knowing little about the stock market, going ... that cause or allow them to raise or lower the price. ...
    (misc.invest.stocks)
  • Re: Proof that neural nets work
    ... that you are not using as an input to the neural net, ... price and volume data only. ... There's an old saying in the stock market, ...
    (misc.invest.stocks)
  • Re: Volume-Price Chart
    ... Charting, not to you personally. ... about the market...ALL market "investments" of ANY length or purpose ... Perhaps, 'predicting' future outcome ... 'predicting' (like Price and Volume) isn't the ONLY ...
    (misc.invest.stocks)
  • Re: Volume-Price Chart
    ... about the market...ALL market "investments" of ANY length or purpose ... "predicting" is a simple concept: ... if it does, I ABSOLUTELY WILL LOSE MONEY, and vice versa. ... volume is even better...I hope we can cut the "price only" people ...
    (misc.invest.stocks)
  • Re: Andrews Ideal World
    ... Mark Borgerson wrote: ... stock market rose over the last 30 years. ... For me, the price ... that they weren't moving to an area with even greater increases. ...
    (soc.men)