Calculate compound annual growth rate for any investment over a period.