add CAGR columns to Investment Lots report #1956
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds Compound Annual Growth Rate (CAGR) columns (realized and unrealized) to the Investment Lots report.
Currently, the report shows investment gain/loss percentages via the Return on Investment (ROI) columns (both realized and unrealized). This can be useful in some situations, but ROI has its limitations. It does not recognize the time value of money. But CAGR does. It is useful for the report to support both ROI and CAGR.
For example, suppose there are two investment lots, [A] and [B]. Both were purchased for $100 and sold for $110. At first glance, it might seem that they performed equally. The ROI for each is 10% (gain divided by basis). But suppose [A] was held for only one year before being sold while [B] was held for 10 years. Clearly [A] grew at a much faster rate than [B], which ROI does not reflect. The CAGR is 10% for [A] but only 0.96% for [B], which is much more illustrative of how much [A] has outperformed [B].
See https://www.investopedia.com/terms/c/cagr.asp for CAGR description and formula.
Bug: https://bugs.gnucash.org/show_bug.cgi?id=799335
New options:
New table columns:
TODO: Update report documentation for the new columns