Computational investing homework for week 7