Source: https://www3.nd.edu/~jstiver/FIN30210/Problem%20Sets/Solutions/PS4_Solutions.pdf