A Java program to simulate investment strategies