Homework Solution to Computational Investment Part 1