Skip to main content

fava-portfolio-returns shows portfolio returns in Fava

Project description

Fava Portfolio Returns

Continuous Integration PyPI

fava-portfolio-returns shows portfolio returns in the Fava web interface. It leverages beangrow to categorize transactions and calculate the portfolio returns of a beancount ledger.

Portfolio Performance Returns Dividends Cash Flows Groups

More screenshots

Installation

pip install fava-portfolio-returns

Usage

Please setup beangrow first, using this guide: https://beancount.github.io/docs/calculating_portolio_returns.html.

Enable this plugin in Fava by adding the following lines to your ledger:

2010-01-01 custom "fava-extension" "fava_portfolio_returns" "{
  'beangrow_config': 'beangrow.pbtxt'
}"

Configuration

The plugin supports the following configuration options:

2010-01-01 custom "fava-extension" "fava_portfolio_returns" "{
  'beangrow_config': 'beangrow.pbtxt',
  'beangrow_debug_dir': 'path/to/debug/directory',
  'pnl_color_scheme': 'green-red',
  'language': 'en',
  'locale': 'en',
}"

Available options for pnl_color_scheme:

  • green-red: Green for profits, red for losses
  • red-green: Red for profits, green for losses

The default value is automatically selected based on the browser's locale: Chinese and Japanese regions use red-green by default, all other regions use green-red.

View Example Ledger

cd example; fava example.beancount

Contributing

This plugin consists of a Python backend and a React frontend.

Install uv and Node.js 22, run make deps to install the dependencies, and make dev to run the Fava dev server with auto-rebuild.

Before submitting a PR, please run make build to build the frontend in production mode, and add the compiled frontend to the PR.

Related Projects

Acknowledgements

Thanks to Martin Blais and all contributors of beancount and beangrow, Jakob Schnitzer, Dominik Aumayr and all contributors of Fava, and to all contributors of Apache ECharts.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fava_portfolio_returns-2.7.0.tar.gz (4.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fava_portfolio_returns-2.7.0-py3-none-any.whl (924.6 kB view details)

Uploaded Python 3

File details

Details for the file fava_portfolio_returns-2.7.0.tar.gz.

File metadata

  • Download URL: fava_portfolio_returns-2.7.0.tar.gz
  • Upload date:
  • Size: 4.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for fava_portfolio_returns-2.7.0.tar.gz
Algorithm Hash digest
SHA256 a3719fc2121011a8943964e77cd5fd2dedd1122bbec3e38b3b00f2020fae66c6
MD5 4e1ce4ae7c31ea27bb34295e4b8f3265
BLAKE2b-256 c121d4757ff00186f1b6d7c149c8bc3f5a25100d35576f7f650c0edff9618d9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for fava_portfolio_returns-2.7.0.tar.gz:

Publisher: release.yml on andreasgerstmayr/fava-portfolio-returns

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fava_portfolio_returns-2.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fava_portfolio_returns-2.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e81cf10d72d203892d5688107f49951955b6ee426f0b47a169cadad77f8baa2
MD5 41897298c7beac5ce2ed5efff16bdc51
BLAKE2b-256 6589c9b79a59ad245734552be701521ee05f3f595bff9c76407c0138cf06fdb0

See more details on using hashes here.

Provenance

The following attestation bundles were made for fava_portfolio_returns-2.7.0-py3-none-any.whl:

Publisher: release.yml on andreasgerstmayr/fava-portfolio-returns

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page