ppar
Portfolio performance attribution, contribution, and ex-post risk analytics.
ppar compares a portfolio with a benchmark, explains active return by classification, and produces reviewable HTML tables and PNG charts. It runs locally and accepts vendor-neutral CSV files or Axys/APX exports.
Start here
ppar supports Python 3.11.9 through Python 3.14.
ppar is available under a 45-day, single-user internal evaluation license.
Production, commercial, multi-user, or continued use requires a separate agreement;
contact jjjkreynolds@gmail.com. Review the license before installing.
python -m pip install ppar
Then choose one demonstration.
Vendor-neutral (the default):
ppar setup ./my_ppar
python ./my_ppar/ppar_demo.py
Axys/APX:
ppar setup ./my_ppar --axys-apx
python ./my_ppar/ppar_demo.py
Either setup command creates a demonstration directory:
my_ppar/
README.md
ppar_demo.py
input/
output/
The extensively commented ppar_demo.py is both a tutorial and the executable
workflow. Edit its Python values to choose input paths, calculation assumptions, and
reports, then replace the demonstration files under input/ with your data.
What it produces
The standard demonstration writes security and classification attribution tables, attribution and contribution charts, cumulative return charts, heatmaps, and an ex-post risk-statistics table.
The gallery below shows examples of available output, including reports that can be
selected by editing ppar_demo.py.
Python
This prints the overall portfolio, benchmark, and active returns as decimals:
from pathlib import Path
from ppar import Analytics
from ppar.attribution import View
performance_input_directory = Path("./my_ppar") / "input" / "performance"
analytics = Analytics(
performance_input_directory / "Mega-Cap Alpha Portfolio.csv",
performance_input_directory / "Mega-Cap Benchmark.csv",
)
overall_returns = (
analytics.attribution()
.to_polars(View.OVERALL_ATTRIBUTION)
.tail(1)
.select("Portfolio_Return", "Benchmark_Return", "Active_Return")
)
print(overall_returns)
The generated ppar_demo.py is the complete reporting example. Results are available
as Polars DataFrames, HTML text, PNG bytes, or CSV files.
Documentation
Downloading, installing, accessing, copying, or using ppar constitutes acceptance of the license.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
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 ppar-0.4.0-py3-none-any.whl.
File metadata
- Download URL: ppar-0.4.0-py3-none-any.whl
- Upload date:
- Size: 746.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e3e6839875db8df3dc473a57c0600ebe54f3223d20b9999be55b22b88d01d52
|
|
| MD5 |
6d16fe0514f32786801434779450e4ea
|
|
| BLAKE2b-256 |
d2b3b74aca76491adde420a2cce291e9d3f00d9dabff3ae46fc4d5dd83c9f8b4
|
Provenance
The following attestation bundles were made for ppar-0.4.0-py3-none-any.whl:
Publisher:
publish.yml on JohnDReynolds/ppar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ppar-0.4.0-py3-none-any.whl -
Subject digest:
4e3e6839875db8df3dc473a57c0600ebe54f3223d20b9999be55b22b88d01d52 - Sigstore transparency entry: 2716447653
- Sigstore integration time:
-
Permalink:
JohnDReynolds/ppar@ec278f882235a502bededcd1fe2659d1153f5fd1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/JohnDReynolds
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ec278f882235a502bededcd1fe2659d1153f5fd1 -
Trigger Event:
workflow_dispatch
-
Statement type: