Live data from Hacker News

LSTM Neural Networks for Time Series Prediction

jakob-aungiers.com

11–20 of 23 posts

Re: LSTM Neural Networks for Time Series Prediction

#12
post #2

So... can you or can you not, predict the stocks with ANN's... haha, guess I won't be quitting my job any time soon. >A stock time series is unfortunately not a function that can be mapped.

You most certainly can, just not with such naïve approach. Jane Street is a company that does it, and they are quite open about their tech approach (just not about their specific models):

https://www.youtube.com/watch?v=hKcOkWzj0_s

Jane Street went from zero to trading $1 trillion in volume in just 15 years.

Re: LSTM Neural Networks for Time Series Prediction

#13
I'm unclear - aren't you showing results for training data anyway? The network might just be compressing the trends in the training data into its function. The question should be if the same network works on another time series, right?

I.e. I can build a look up table looking at the last k data points predicting the next and you're going to need a massive training dataset to make that not work well on the train set (something like O(exp(k)*k/N) time series).

Re: LSTM Neural Networks for Time Series Prediction

#14
post #8
post #2

So... can you or can you not, predict the stocks with ANN's... haha, guess I won't be quitting my job any time soon. >A stock time series is unfortunately not a function that can be mapped.

> So... can you or can you not, predict the stocks with ANN's... haha, guess I won't be quitting my job any time soon. Not sure about "predicting" the stocks with ANNs, but how do you explain the Medallion Fund averaging about 30%/y (ballpark) without a single loss year since 1990 ? https://www.bloomberg.com/news/articles/2016-11-21/how-renai...

Except these firms don't use LSTMs at their core. They do tons of feature engineering combined with statistical models and very simple machine learning models (think linear/logistic regression). Some firms will use more complicated black box models (which would include LSTMs), but only as one additional signal to combine with all their hand engineered features and financial models.

Re: LSTM Neural Networks for Time Series Prediction

#15
post #8

Earlier quoted context omitted.

> So... can you or can you not, predict the stocks with ANN's... haha, guess I won't be quitting my job any time soon. Not sure about "predicting" the stocks with ANNs, but how do you explain the Medallion Fund averaging about 30%/y (ballpark) without a single loss year since 1990 ? https://www.bloomberg.com/news/articles/2016-11-21/how-renai...

Or Virtu having a single losing day in a six year period? https://www.bloomberg.com/news/articles/2015-02-20/high-freq... I wonder what the Sharpe Ratios of the trading systems these funds run are.

Virtu does high frequency trading so it makes sense that they don't have many down days. Also HFT strategies can have ridiculous sharpe ratios of like 100

Re: LSTM Neural Networks for Time Series Prediction

#16
post #13

I'm unclear - aren't you showing results for training data anyway? The network might just be compressing the trends in the training data into its function. The question should be if the same network works on another time series, right? I.e. I can build a look up table looking at the last k data points predicting the next and you're going to need a massive training dataset to make that not work well on the train set (…

No time series analysis doesn't work like that. You can't train on one series then predict another series outcome. When training time series, you are basically looking for a signal which is not portable to some other subject.

It's more than just compressing the training set, a human can use a training set to learn seasonality, volatility, streak durations, moving averages, etc. which are learnings that can be used to infer future movement. The LTSM is learning it's own observations to predict the next tick.

Re: LSTM Neural Networks for Time Series Prediction

#17
post #16
post #13

I'm unclear - aren't you showing results for training data anyway? The network might just be compressing the trends in the training data into its function. The question should be if the same network works on another time series, right? I.e. I can build a look up table looking at the last k data points predicting the next and you're going to need a massive training dataset to make that not work well on the train set (…

No time series analysis doesn't work like that. You can't train on one series then predict another series outcome. When training time series, you are basically looking for a signal which is not portable to some other subject. It's more than just compressing the training set, a human can use a training set to learn seasonality, volatility, streak durations, moving averages, etc. which are learnings that can be used to…

Timeseries can 100% work like that. If you expect your timeseries data to be coming from a similar distribution that is what you do to train your LSTM. It's not just a magic box - you have to train it to encode useful features in the gate.

Sure, you can prefer to use subsets of a single time series instead of multiple time series. The issue remains that it doesn't matter what your performance on training data is. You still need to partition your dataset into training and test data - otherwise you could just be storing a lookup table for all you know. It looks like the author has trained on the entirety of the dataset, and then is just considering that performance...

Let me put this another way. You do this with a random walk. Train on your entire timeseries - every length 50 window. Say that there's only 8 unique values at each timestep. That means that there's 8^50 possible input sequences into the neural network. A sufficiently complex neural network can fit an arbitrary function, so if you just have a couple thousand windows there's ~(8^50 / 1000) possible functions that can predict the correct output exactly - and this is on noise! And in all likelihood the neural net will learn that noise: https://arxiv.org/abs/1611.03530 Without comparing training and test results there's no way to know that neural network learned anything of value - it can get perfect accuracy on training data that's pure noise!

This stuff is really critical to get right if you're doing machine learning.

Re: LSTM Neural Networks for Time Series Prediction

#18

Earlier quoted context omitted.

Or Virtu having a single losing day in a six year period? https://www.bloomberg.com/news/articles/2015-02-20/high-freq... I wonder what the Sharpe Ratios of the trading systems these funds run are.

Virtu does high frequency trading so it makes sense that they don't have many down days. Also HFT strategies can have ridiculous sharpe ratios of like 100

>HFT strategies can have ridiculous sharpe ratios of like 100

Yeah, I've heard similar and it explains their basically linear equity curves...

Re: LSTM Neural Networks for Time Series Prediction

#19
post #17
post #16

Earlier quoted context omitted.

No time series analysis doesn't work like that. You can't train on one series then predict another series outcome. When training time series, you are basically looking for a signal which is not portable to some other subject. It's more than just compressing the training set, a human can use a training set to learn seasonality, volatility, streak durations, moving averages, etc. which are learnings that can be used to…

Timeseries can 100% work like that. If you expect your timeseries data to be coming from a similar distribution that is what you do to train your LSTM. It's not just a magic box - you have to train it to encode useful features in the gate. Sure, you can prefer to use subsets of a single time series instead of multiple time series. The issue remains that it doesn't matter what your performance on training data is. You…

When doing train/test splits in a time series context like this, would forward chain backtesting (train on steps 1:n, predict n+x) be enough validation, or would you advocate for further sampling of the training set?

Re: LSTM Neural Networks for Time Series Prediction

#20
post #17
post #16

Earlier quoted context omitted.

No time series analysis doesn't work like that. You can't train on one series then predict another series outcome. When training time series, you are basically looking for a signal which is not portable to some other subject. It's more than just compressing the training set, a human can use a training set to learn seasonality, volatility, streak durations, moving averages, etc. which are learnings that can be used to…

Timeseries can 100% work like that. If you expect your timeseries data to be coming from a similar distribution that is what you do to train your LSTM. It's not just a magic box - you have to train it to encode useful features in the gate. Sure, you can prefer to use subsets of a single time series instead of multiple time series. The issue remains that it doesn't matter what your performance on training data is. You…

What I was interpreting the parent comment to mean two different subjects. For example, I can't train on weather data from Paris France and then expect it to be able to predict tomorrow's weather in Portland Oregon. Am I wrong on that?
Post reply on HN