Just enough to pass the Quiz for homework 3 of Computational Investment - caution: non-optimized code!!!