Homework for computational investment course