Skip to main content

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.

Overall attribution by economic sector chart Overall contribution by economic sector chart Sub-period attribution effects chart Sub-period portfolio and benchmark returns Active contributions heatmap Total attribution effects heatmap Cumulative attribution effects Cumulative portfolio and benchmark returns Cumulative attribution table Overall attribution table by economic sector Overall attribution table by security Ex-post risk statistics table

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

ppar-0.4.0-py3-none-any.whl (746.3 kB view details)

Uploaded Python 3

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

Hashes for ppar-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e3e6839875db8df3dc473a57c0600ebe54f3223d20b9999be55b22b88d01d52
MD5 6d16fe0514f32786801434779450e4ea
BLAKE2b-256 d2b3b74aca76491adde420a2cce291e9d3f00d9dabff3ae46fc4d5dd83c9f8b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for ppar-0.4.0-py3-none-any.whl:

Publisher: publish.yml on JohnDReynolds/ppar

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

Release history Release notifications | RSS feed

This release

0.4.0 This release

1 file

0.3.1

1 file

0.3.0

1 file

0.2.1

1 file

0.2.0

1 file

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page