Coder Social home page Coder Social logo

fava-portfolio-summary's Introduction

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,
    }"
  • metadata-key: Name of key used to group accounts
  • account-groups: Either a string or a dictionary with the name key identifying the name of the group
    • If specified as a dictionary, the internal, mwr, twr, and 'cols' keys can be specied on a per-group basis
  • internal (optional): List of regex patterns denoting 'internal' accounts that should be ignored for cash-flow purposes during MWRR/TWRR calculation. More information about selecting internal accounts can be found here
  • mwr (optional): Enable MWRR calculation for all accounts (can be overridden at the group level). Possible values: (True, False, 'children') Defaults to True
  • twr (optional): Enable TWRR calculation for all accounts (can be overridden at the group level). Possible values: (True, False, 'children') Defaults to False
  • cols (optional): Ordered list of columns to display. Available columns: units, cost, balance, pnl, dividends, change, mwr, twr, allocation

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

fava-portfolio-summary's People

Contributors

clsacramento avatar phracturedblue avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.