Functional cluster analysis of financial time series