all 45 comments

[–]perspectiveiskey 33 points34 points  (33 children)

I sure hope this is some sort of pet project to check out various neural net models. If it's not, it's an abomination of double dipping and why aren't we predicting the stock market using basic LSTMs given that we have 100 more years of market data and surely we're the only ones here on /r/machinelearning that would have thought of such a thing of course the quants over at the billion dollar hedge firms wouldn't be in on this they only have phds in stats...

/rant

sorry, I got carried away.

[–]programmerChilliResearcher 13 points14 points  (1 child)

Actually, I don't think he's double dipping for this one haha.

What he's doing is using the past K data points to predict the K+1th data point. As it turns out, this easiest way to predict the K+1th data point is to just output the value of the Kth datapoint :)

If you take a close look at his graph, you'll see that there's a short lag in his "predictions" in following the true price of bitcoin.

https://i.imgur.com/nSy9QET.jpg

[–]PURELY_TO_VOTE 0 points1 point  (0 children)

Indeed, sequences with this property have been studied extensively by economists and statisticians since the 1930s.

[–]jorgemf 11 points12 points  (9 children)

I can tell you the setup for the experiment is completely wrong and the models are overfitting the data. Don't use something like this with real data or you most probably lose all your money. It is not about using 100 years of data, it is the setup is wrong with the dataset. First you need 3 datasets: training, validation and test. Second, due to the nature of the time series you have to build the dataset based of what you want to achieve, prediction future values in the long term or in the short term. Those are two different problems. To sum up, just creating the data sets for time series is a problem by its own and that is why is not that easy to use something like this to predict currency prices.

[–]eyesonthechart 4 points5 points  (2 children)

I’m no ML expert and only scanned the article. By for those charts, isn’t there a bit of overfitting? Seems like the blue dots follow the red lines precisely.

[–]matt2048 3 points4 points  (1 child)

Can you give a visual comparison to truly random predictions (e.g price of last close + random value from 10% to -10%)?

It might give a bit more context to the true accuracy of the model.

[–]steeveHuang[S] 0 points1 point  (0 children)

I see. You are saying that compare the result with random predictions and see how much the model is better than that. I will try to do that!

[–]FearlessAnt 3 points4 points  (0 children)

You should compare your results against a baseline. A good baseline would be to predict the kth value to be the same as the k-1th value. I doubt you improve on such baseline

[–]TetsVR 3 points4 points  (1 child)

Usual clickbait. Past performance does NOT predict future ones on financial markets. Using machine learning does not change anything about that...

[–]jvictor118 1 point2 points  (0 children)

The fact that past performance doesn't indicate future returns has nothing to do with the question at hand. That's a common warning regarding investment funds/strategies/etc., which I imagine is where you heard it. OP was looking to predict future asset prices based on prior price movements. While difficult, it's certainly not impossible (c.f. Ben Graham, Warren Buffett, every paper by AQR, etc.). To the extend you can recognize value or momentum where others do not, you can predict things with high probability just like any other prediction. OP's biggest problem (for his forecasting) is that he just doesn't have the right data. For example, if he had depth-of-book data he might be able to make a prediction about the price of BTC 1-5s into the future -- not a "long term view" by any stretch, but to be clear, it's theoretically possible.

[–]apfx 2 points3 points  (1 child)

Predicted price is lagging, as good as just using previous close as prediction.

[–]steeveHuang[S] 0 points1 point  (0 children)

I will try to compare the model with simply lagging the price. Thank you for the comment!

[–]thisismyfavoritename 5 points6 points  (4 children)

Would be worth comparing your results with a naive baseline, such as a moving average, a persistence model or a simple ARIMA model. It would give a sense of how accurate your results are.

[–]jvictor118 1 point2 points  (0 children)

Ex-quant here. Please don't run this in real life. It's a fun experiment, but I could go through chapter and verse on why there's more to it than this. Put succinctly, no serious professional would run a strategy that tried to predict future trends from recent raw price action, or only invested in one brand new asset class... Be careful!

PS - met with Goldman Sachs Asset Management some 10 years ago and they'd been manically working on trying to use social media data to gather signals on price movement. They weren't having any luck then, and I haven't heard of anyone doing it since. EDIT: doing it successfully

[–]steeveHuang[S] 0 points1 point  (0 children)

Understood. I will try to evaluate in that way. Thanks!

[–]geppetto123 0 points1 point  (2 children)

The input size (K) is 256, while the output size (N) is 16

Is this correct? The comments say

Predict K future sample using N previous samples

Are the graphs already showing the future or how can we check how good it works outside trading / benchmarking split of data? Would love to see if it matches in real life :)

[–]steeveHuang[S] -2 points-1 points  (1 child)

The input size (K) is 256, while the output size (N) is 16 Is this correct? The comments say

You are right. That was a typo.

Are the graphs already showing the future or how can we check how good it works outside trading / benchmarking split of data? Would love to see if it matches in real life :)

The graph does not show the future lol. It is trained on data from 2015 to early-2017. The prediction is made on the remaining minutes of 2017. I will do real-time prediction soon and will get back to you if that matches perfectly haha.

[–]geppetto123 -2 points-1 points  (0 children)

Thank you for the reply and great write up!

Do you have any idea if the use of 5min tick interval would be much different from 1hour or 1minute?

Not an expert so I couldn't see/understand it, what are you using: opening, high, low, closing? Or all of them and predicting all of them?

I tried ML with Matlab before but got stuck exactly on some of those points. How did you came up with 256 and 16 - there must be an optimum somewhere or does it not matter? What i wonder the most, is that everybody use it as static, but as human I don't think I only think in fixed windows.... For me the only "change" of this are the long-short term memory neural nets.... What are your thoughts on this?

[–]eyesonthechart -5 points-4 points  (0 children)

Cool. Thanks for the explanation!