brinsons
Polars-based portfolio performance attribution for single-period and multiple-period Brinson analysis, multi-account attribution, currency and factor methods, and an independently specified Behavioral Alpha Frontier.
Python 3.11+ · Polars is the only core runtime dependency · Matplotlib is optional for charts.
Install
python -m pip install brinsons
# With plotting tools:
python -m pip install "brinsons[plot]"
Start with Brinson attribution
import polars as pl
from brinsons import calculate_single_period, calculate_multiple_period
from brinsons import bhb, fachler, link_carino
facts = pl.DataFrame({
"period": [1, 1, 2, 2],
"segment": ["Equity", "Bonds", "Equity", "Bonds"],
"portfolio_weight": [.6, .4, .55, .45],
"benchmark_weight": [.5, .5, .5, .5],
"portfolio_return": [.12, .04, .03, .01],
"benchmark_return": [.10, .06, .02, .015],
})
single = calculate_single_period(facts, period=1, attribution=bhb)
multiple = calculate_multiple_period(facts, attribution=fachler, linking=link_carino)
print(single.summary)
print(multiple.linked.summary)
Input column names are configurable through column_... parameters; source
columns do not need to be renamed. Returns and effects use decimal units:
0.01 is 1% or 100 basis points.
Explore
The Behavioral Alpha Frontier calculations are independently defined. The source papers do not disclose every proprietary decision algorithm or the official score mapping; this package does not claim to reproduce Essentia's scores.
Metadata
Release files for brinsons 0.1.0
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 |
|---|---|---|---|---|
| brinsons-0.1.0.tar.gz | 137.1 kB | Without provenance | Details for brinsons-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| brinsons-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for brinsons-0.1.0-py3-none-any.whl |
Total release size: 176.9 kB
Release files / brinsons-0.1.0.tar.gz
| Download URL | brinsons-0.1.0.tar.gz |
|---|---|
| Size | 137.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
249a948bcae5990d485c0c18b639bbfa74e74240e15b9e060012d01cac733a50
|
|
BLAKE2b-256 checksum How to use checksums |
d59f7572595275d26ca5b50dfb11dd6ac9f7fc2697ad8172952fd72dc0c416d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.9
|
Release files / brinsons-0.1.0-py3-none-any.whl
| Download URL | brinsons-0.1.0-py3-none-any.whl |
|---|---|
| Size | 39.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d9aa0ff409b90d6e20b2b07539c1523ec83cc888cb8041fbdb3808332a89967
|
|
BLAKE2b-256 checksum How to use checksums |
1a86d08c81f2a87a41cdeaa6781d7ab1f577295cbc5681b11817f72200c7157d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.9
|
Security for brinsons 0.1.0
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.