tsfresh time-series clustering of stock data

1k Views Asked by At

How would we use "tsfresh" for time-series clustering of stock data, where we do not have a vector of target values?

The select_features function requires a vector of target values.

1

There are 1 best solutions below

0
MaxBenChrist On

First calculate a set of features from your stock time series (e.g. take price and volume data). To do that, you will have to convert your stock data into dataframe in one of the tsfresh input formats (https://tsfresh.readthedocs.io/en/latest/text/data_formats.html).

tsfresh will return a feature matrix that you can then feed to clustering algorithms, e.g. from scikit-learn (http://scikit-learn.org/stable/modules/clustering.html). So, by use of tsfresh you move your problem from the time series domain into the feature matrix domain.