Identifying trends and patterns in stock prices