PhracturedBlue / fava-portfolio-summary

Fava extension to display a portfolio summary
MIT License
23 stars 8 forks source link

Fava Portfolio Summary

This is a Fava extension to display a grouped portfolio view in Fava for a set of Beancount accounts.

It can also calculate MWRR (Money-Weighted Rate of Return) or TWRR (Time-Weighted Rate of Return)

The display is similar to the Balance Sheet in Fava, however it allows grouping accounts, and calculating partial balances.

The MWRR (and especially TWRR) calculations can be very slow to calculate. By default, MWRR is enabled, and TWRR is disabled

Screenshot

Installation

Assuming Fava is already installed, use:

pip install git+https://github.com/PhracturedBlue/fava-portfolio-summary

Configuration

In the beancount file, configure via:

2000-01-01 custom "fava-extension" "fava_portfolio_summary" "{
    'metadata-key': 'portfolio',
    'account-groups': (
        { 'name': 'cash', 'cols': ['balance', 'allocation'] },
        { 'name': 'investment', 'mwr': False },
        'retirement-pretax',
        'retirement-roth'),
    'internal': (
      '.*:PnL',
      'Income:Investments:Dividends',
      'Income:Bank:Interest'),
    'mwr': 'children',
    'twr': False,
    }"

Additionally each top-level account (that is to be displayed) needs to be marked with the appropriate group:

2000-01-01 open Assets:Investments:Fidelity401k:PreTax
  portfolio: "retirement-pretax"

For each top level account, all transactions of the account and any child accounts will be considered (I.e. for the example above, Assets:Investments:Fidelity401k:PreTax and any accouunt matching Assets:Investments:Fidelity401k:PreTax:.* will be summarized)

Related Projects