Compute Returns
This directory contains code which computes investment returns on a variety of assets, as recorded by Beancount, fed directly from a Beancount file.
See this document for details: https://docs.google.com/document/d/1nPsMIunLnDvdsg6TSsd0PZb7jngojNpFlqnaX36WRp8/
Scripts
There are three related scripts:
-
configure.py: This attempts to automatically infer and generate configuration to compute returns from an existing Beancount ledger.
-
compute_returns.py: This extracts data for each of the investments defined in the configuration and computes the returns and generates output for each requested returns report.
-
download_prices.py: The compute_returns.py script outputs a list of missing (or inadequately dated) price directives to properly do its job as a side-product. This script can read that file and fetch those missing dates, which you can insert in your ledger and then rerun compute_returns.py for a more precise calculation.
Example
To run the example:
cd example
uv run beangrow-returns ledger.beancount config.pbtxt ./reports
The reports are available at example/reports/groups.
Metadata
Release files for beangrow 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| beangrow-1.0.1.tar.gz | 31.1 kB | Without provenance | Details for beangrow-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| beangrow-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for beangrow-1.0.1-py3-none-any.whl |
Total release size: 59.9 kB
Release files / beangrow-1.0.1.tar.gz
| Download URL | beangrow-1.0.1.tar.gz |
|---|---|
| Size | 31.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22fc0b9771e801cefc20ce1c3e3d856d6d6f0e5e50c91673cec72a6cc4a162b0
|
|
BLAKE2b-256 checksum How to use checksums |
5e85a4745287bc09e662cca071404d628eca6b65a4f077df3aff5ddec4af0297
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.24
|
Release files / beangrow-1.0.1-py3-none-any.whl
| Download URL | beangrow-1.0.1-py3-none-any.whl |
|---|---|
| Size | 28.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe97967515ce70f9b7d80db8d2cedba2a23d9d50a5ebcf9d12d5e3fe9403a941
|
|
BLAKE2b-256 checksum How to use checksums |
9f6e0389989b4d10ea993fe6f38e107c0e6e3fcbe4d91510b084a7160af75642
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.24
|
Security for beangrow 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.