It might be imagined that geometric mean calculations would be superior, but alas, no. Because with a little thought we see that the geometric mean is simply the average growth rate that transforms the first data point into the last! So it's the same result as CAGR, but arrived at by different means.
For my own purposes, I've generally used a method known as logarithmic linear least squares (LLLS), which uses all the data points, and calculates a linear regression growth coefficient. I first used this publicly back in the TMF days, which resulted in Gengulphus getting lots of PMs to pronounce on it. I passed the test, fortunately! But I was reluctant to repeat the exercise.
Recently, I've begun sharing LLLS growth rates occasionally on the HYP board. An example is here:
![Image](https://i.imgur.com/h2OhNZH.jpg)
The reaction has been mostly favourable. The chart makes it more intuitively obvious. Several people have remarked that it's something that they learned at university, but haven't pursued (or had the tools to do so) since.
But I have several tools that I use for producing LLLS calculations, and I'm getting quite close to sharing them with interested Lemons on this board (where I hope they might fall on fertile soil).
For reasons of my own I'm leaning at the moment towards doing this via Github, rather than Kiloran's and IAAG's software repository. Nothing sinister, it just means that on the odd occassion when I change anything, there's only one piece of source code to change.
Basically, I have:
1) Code in BASIC. I developed this to expedite LLLS calculations in back 1981, when I was doing my PhD. It runs under Microsoft QuickBASIC 4.5, QBasic, and Microsoft BASIC PDS 7.1. As a result, it also runs under the modern, well-maintained, free, open-source, 64-bit Windows version of BASIC, QB64. Two versions are available: a version which accepts data from the keyboard, and a version which pulls it in from a file. Porting to Python would be relatively straightforward, and I might do it one day.
2) An "empty" spreadsheet with LLLS capabilities coded as functions using Excel's VBA. (It's the same code, basically.) You get the growth rate, R-squared, correlation coefficient, and t-statistic -- but no charts. (I did it like this because despite the admirable IAAG's help, I couldn't build a transferable Excel macro library. YMMV.)
3) The ability to produce charts like the one you see above, which comes from code written for R and ggplot2, both of which are free and open source. You'll want R Studio, as well, as an easy-to-use IDE. Again, free and open source. Basically, you copy from a spreadsheet, and the code automatically picks up the data from the clipboard.
The next stage in the project is to do a LibreOffice version, which will require turning Excel's VBA into LibreOffice BASIC. If anyone knows of any handy LibreOffice BASIC training/ user resources, now is the time to holler.
Watch this space. Obviously, if anyone is desperate to try it out now, just ask. Everything referred to in (1) to (3) above is stable and has been for some years -- decades in some cases!
Thanks again to IAAG, and also TJH, for sharing some real-world dividend data.
MDW1954