Live data from Hacker News

Using a Keras Long Short-Term Memory Model to Predict Stock Prices

heartbeat.fritz.ai

1–10 of 178 posts

Re: Using a Keras Long Short-Term Memory Model to Predict Stock Prices

#3
The problem with these types of systems are it's difficult to do backtesting on a single continuous data stream... I write about that here:

https://blog.projectpiglet.com/2018/01/perils-of-backtesting...

I recommend doing something similar to the original post. Neural networks tend to produce valid looking output for a stock price easily, a random walk does too. You have to find correlations, causations, and then review the results carefully.

For reference, I wrote my own financial advisor (not directly utilizing deep learning, that functions relatively well):

http://projectpiglet.com/

It works relatively well when checking the "causality" which also has it's limits: https://blog.projectpiglet.com/2018/01/causality-in-cryptoma...

EDIT: Added some evidence:

* 2016 stocks: https://imgur.com/a/j8YWR

* Early 2018 crypto: https://blog.projectpiglet.com/2018/01/30-weekly-returns-usi...

* Early 2018 stocks: https://twitter.com/AustinGWalters/status/976347632439209985

* All 2018 on Robinhood only: https://imgur.com/a/2CxEFqI

* Also (I am lettergram on HN), created: https://hnprofile.com and https://redditprofile.com

Re: Using a Keras Long Short-Term Memory Model to Predict Stock Prices

#5
post #2

Pretty underwhelming. From the very limited experiment demonstrated, the LSTM seems to be playing catch up rather than actually predicting trends.

You say that because the prediction line lags the price line?

That’s not playing catch up, if the prediction was made at time 0.

Re: Using a Keras Long Short-Term Memory Model to Predict Stock Prices

#6
post #3

The problem with these types of systems are it's difficult to do backtesting on a single continuous data stream... I write about that here: https://blog.projectpiglet.com/2018/01/perils-of-backtesting... I recommend doing something similar to the original post. Neural networks tend to produce valid looking output for a stock price easily, a random walk does too. You have to find correlations, causations, and then rev…

Interesting but i am a non believer can you provide figures that show gains through years?

Re: Using a Keras Long Short-Term Memory Model to Predict Stock Prices

#7
post #3

The problem with these types of systems are it's difficult to do backtesting on a single continuous data stream... I write about that here: https://blog.projectpiglet.com/2018/01/perils-of-backtesting... I recommend doing something similar to the original post. Neural networks tend to produce valid looking output for a stock price easily, a random walk does too. You have to find correlations, causations, and then rev…

This type of scam has been done many times for years...

Re: Using a Keras Long Short-Term Memory Model to Predict Stock Prices

#8
These types of experiments pop up from time to time. You have to compare the performance relative to the single lag error. So the baseline is to use the previous time step to predict the current time step. Ultimately, it's not worthwhile to attempt to predict stock timeseries the SNR is far too low. It's more valuable to attempt to predict a trend, e.g., +1 is there will be upward movement in time window x, -1 if downward, 0 is within some epsilon of the current price.

Re: Using a Keras Long Short-Term Memory Model to Predict Stock Prices

#9
I preliminarily did the same thing as in this article a while back (with crypto data, since it's easily accessible), just as a way to learn keras.

Somehow my network always learned to output a delay of the input no matter how hard I tried to shape it. I've searched through literature briefly and some examples. Some blog posts even claimed they had good time series prediction when I clearly saw they were having the same problem.

What I mean to say is, be critical of what you find online, and be critical of your results. This is definitely not an easy problem, and some argue that it's unsolvable all together :)

Re: Using a Keras Long Short-Term Memory Model to Predict Stock Prices

#10
I'm skeptical of any system that proves it can predict stock prices vaguely.

I would be less skeptical if it was more humble, and specific in its constraints. For example, could it predict the % probability a stock would up X% if it had N consecutive negative days? Or, how many minutes/hours after earnings are announced is the after-hours price usually indicative of what the price will be the next day?

You can't predict everything, but you might be able to have a probabilistic prediction of specific scenarios. though even then I'll still be skeptical.. daily stock movements are totally random.

Post reply on HN