Mining of market data from the time series database