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.96k stars 606 forks source link

Add a widget for custom formulas #3158

Open CanePlayz opened 1 year ago

CanePlayz commented 1 year ago

Is your feature request related to a problem? Please describe. I want some other metrics to be displayed on the dashboard which currently aren't available.

Describe the solution you'd like A widget where you can create your own formulas with things like earnings, capital gains, taxes etc. and basic mathematic operations such as addition and multiplication.

Describe alternatives you've considered Adding more individual metrics. However, different people potentially need many different metrics, which might not be useful at all to others.

Additional context Add any other context or screenshots about the feature request here.

ndsvw commented 1 month ago

I like the idea.

In a minimal implementation, the widget could allow to evaluate basic math with variables that represent "global" values...

E.g. there is a field that allows entering a formula (1000 + 200) and when saved, the widget just shows 1,200.

Variables could look like this (and could always evaluate to the current value):

$TotalPortfolioValue

If you set yourself a goal of (for example) 987.654 € in total, this would allow displaying a progress (in %) via:

$TotalPortfolioValue / 987654 * 100

This would also allow specifying something like FIRE formulae:

$TotalPortfolioValue * 0.04

In later versions, this could be extended to allow querying specific account data, data from specific years, ...

$TotalAccountValue["Account1"]

Implementing such a widget would probably resolve some current and future widget requests, because it's very generic..