Feature Extraction of Time Series Data?

Depending on the source, the common understanding between the difference between AI, ML, and Deep Learning is one of a Venn Diagram. AI is the ultimate blanket term and most happily abused by marketers. Under this umbrella comes machine learning vs deep learning. A quick google will tell you the difference is Feature Extraction, in which deep learning – typically represented by a Neural Network, magically determines important features for itself.

This is a fundamental misunderstanding – while a Neural Network will make associations between inputs and the consecutive layers and eventual outputs on it’s own, this does not mean that feature extraction is irrelevant to Neural Network design. This concept can be boiled down to periodicity. In terms of the project this blog focuses on, let’s turn our attention to our price data – which is essentially a time series data.

Much akin to the weather, it is possible that patterns in trading emerge. Think of the weather. Is today’s weather much different than yesterdays? Likely the answer is no – these changes are usually not a simple overnight development. How about the seasons? The average temperature every winter may change slowly year to year – but in general, winter is always colder than summer. If you had to bet on a day that was colder – a day in mid-August, vs mid-January, which would you bet?

Trading data is also time series data, though not nearly as predictable as the weather. But let’s think for a second… you need to bet on the movement of prices. A neural network model will need to train to a certain amount of time, and predict to a certain amount of time in the future – this is what you are betting against. If you train on 10 seconds of price data, and predict one second of the future – is there a sufficient pattern for a model to see a trend and predict a likely outcome? Or are the changes sufficiently random? How about if you train to 5 years of data and try to predict tomorrow’s trading result – every unpredictable swing, market upset, gradual development, etc. will get factored into that measly 1 day prediction – averaging out any significant pattern. What is needed for the best model, is picking a training window and a prediction window that are not overly sensitive to the random nature of second by second trading, or trying to learn against multiple market trends that blur the pattern.

So how do we handle this? By taking our data and extracting the “stationary” component – and then using tools like the Fast Fourier Transform (FFT) to look for peaks that indicate periodicity. To really understand what this means – I will now refer you to an excellent source that explains this process: https://medium.com/analytics-vidhya/the-hidden-secrets-of-the-bitcoin-price-201c52d0f11d

The reality is – if cryptocurrency prices were as predictable as the weather, I’d be writing this post from my yacht – scratch that , I wouldn’t be sharing with anyone. But we can still apply this concept to at least pick reasonable time frames to teach our AI crypto-trading model so that it at least is not trying to predict completely random inputs.

Print Friendly, PDF & Email

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *