portfolio-performance / portfolio

Track and evaluate the performance of your investment portfolio across stocks, cryptocurrencies, and other assets.
http://www.portfolio-performance.info
Eclipse Public License 1.0
2.94k stars 606 forks source link

[Discussion] Inflation adjustment #3215

Open RomanLangrehr opened 1 year ago

RomanLangrehr commented 1 year ago

I want to implement a new feature that allows for inflation adjustment (or adjustment to any other index) for the dashboard (and possibly more views), which is currently only possible with the heatmap widget.

The idea is basically what @chirlu suggested in #2975, namely to use a fictitious currency, but I want this currency to be invisible for the user.

Concretely, I want to add an UI element that allows the user to select "no inflation adjustment" or one benchmark index (e.g. tracking consumer price inflation). If a benchmark is selected, a fictitious currency (invisible to the user) is created that has a 1:1 exchange rate at the end of the reporting period (or the current day, I don't know what is better) and has the same performance as the index. That currency is then used as reporting currency, which effectively adjusts all widgets according to the selected benchmark.

Pros:

Cons:

It think this inflation adjustment is also helpful for the statement of assets diagram and the performance diagram.

Any other ideas to realize adjustment for inflation or feedback are welcome. Are there any other places where inflation adjustments would be useful?

funnym0nk3y commented 1 year ago

Without knowing the inner workings of portfolio modeling such a feature as currency seems to introduce quite some technical debt. As you said there are already issues with showing adjusted and unadjusted values side by side. In my opinion each widget should just use a time series of numbers for calculation. That time series could then be adjusted by a set of transformations like currency conversions and inflation adjustments, but also for course differences (for security comparison) and much more. Each transformation consists of a mathematical map for the values and a symbol map (transformation from EUR to USD consists of the exchange rate time series and the resulting symbol USD, inflation adjustment consists of inflation time series and USD-PPP as a symbol). Regarding the UI/UX I'm not sure what the best approach is. Setting the "inflation adjusted" checkbox for every widget is tedious, defining multiple different time series for one security (e.g. MSCI world in EUR, USD, EUR-PPP, USD-PPP, etc.) seems confusing too.