Figure 2:
Random investment subroutine.