Homework 6 from the Computational Investing I course on Coursera.