fava-portfolio-returns shows portfolio returns in Fava
Project description
Fava Portfolio Returns
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.
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',
'pnl_color_scheme': 'green-red',
'beangrow_debug_dir': 'path/to/debug/directory'
}"
Available options for pnl_color_scheme:
green-red: Green for profits, red for lossesred-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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fava_portfolio_returns-2.3.0.tar.gz.
File metadata
- Download URL: fava_portfolio_returns-2.3.0.tar.gz
- Upload date:
- Size: 2.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54b490fd56e1f50717016ef1fbbeabcec2c0eebfad7a46d1788df1276f1414ae
|
|
| MD5 |
be881cac044041305d2b0f5289aa8181
|
|
| BLAKE2b-256 |
fb313272ad009d1ecad7b6c87046697577e6c274cdf73b6183fb23478380ba0c
|
Provenance
The following attestation bundles were made for fava_portfolio_returns-2.3.0.tar.gz:
Publisher:
release.yml on andreasgerstmayr/fava-portfolio-returns
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fava_portfolio_returns-2.3.0.tar.gz -
Subject digest:
54b490fd56e1f50717016ef1fbbeabcec2c0eebfad7a46d1788df1276f1414ae - Sigstore transparency entry: 787325357
- Sigstore integration time:
-
Permalink:
andreasgerstmayr/fava-portfolio-returns@74fbf3c3c6600acfa8e4e17941f96369dbc1b7eb -
Branch / Tag:
refs/tags/v2.3.0 - Owner: https://github.com/andreasgerstmayr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@74fbf3c3c6600acfa8e4e17941f96369dbc1b7eb -
Trigger Event:
push
-
Statement type:
File details
Details for the file fava_portfolio_returns-2.3.0-py3-none-any.whl.
File metadata
- Download URL: fava_portfolio_returns-2.3.0-py3-none-any.whl
- Upload date:
- Size: 824.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4d947eb809041371650ebf95318cf3488771f7aebb9a14da59e1682c261d88c
|
|
| MD5 |
98509706f67bc71876173a463aa1f7d0
|
|
| BLAKE2b-256 |
1a76dceb7148ae20be4aa0f7709c14ebe59ec190288b139117643a73d64ff079
|
Provenance
The following attestation bundles were made for fava_portfolio_returns-2.3.0-py3-none-any.whl:
Publisher:
release.yml on andreasgerstmayr/fava-portfolio-returns
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fava_portfolio_returns-2.3.0-py3-none-any.whl -
Subject digest:
e4d947eb809041371650ebf95318cf3488771f7aebb9a14da59e1682c261d88c - Sigstore transparency entry: 787325358
- Sigstore integration time:
-
Permalink:
andreasgerstmayr/fava-portfolio-returns@74fbf3c3c6600acfa8e4e17941f96369dbc1b7eb -
Branch / Tag:
refs/tags/v2.3.0 - Owner: https://github.com/andreasgerstmayr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@74fbf3c3c6600acfa8e4e17941f96369dbc1b7eb -
Trigger Event:
push
-
Statement type: