Building a stock analysis tool in Python