This is my version of the source code for this homework.
For those who wanted to compare results, here is what I have as the expected output for the four required problems and the extra credit.
Opening price on 1932/08/01 was 54.26.
Closing price on 1932/08/31 was 73.16.
That is a gain of 34.83%.
Found 13 consecutive days of gain
starting on 1987/01/02 and continuing through 1987/01/20.
High price on 1929/09/03 was 386.10.
Low price on 1932/07/08 was 40.56.
That is 10.51% of the previous high.
Day type Geometric Mean
------------- --------------
first of year 1.001118
last of year 1.001787
typical 1.000119
Best historic date is 10/20 with geometric mean 1.005743.