Skip to content

Latest commit

 

History

History
10 lines (6 loc) · 1004 Bytes

File metadata and controls

10 lines (6 loc) · 1004 Bytes

k-means clustering for financial time series

Humans can easily tell by looking at a chart whether a trend is up or down. A computer cannot. So, one needs a way to put in an input and get a consistent output back out.

In this project, I analysed the time series of stock prices. Using a forward-backward filter, I smoothed the data, and then used a k-means clustering algorithm to break it down into three trends: bullish, bearish and steady. The analysis is summarised in the IPython notebook, while all the relevant function are defined in the helper_func.py module.

As an example, this is the time series for RACE, the Ferrari stock.

RACE stock