Python based stock analysis