Given a set of stock prices over several days, how would you programmatically identify a specific trend?