Offline PME quickstart¶
Author: Artur Sepp / First recorded: 2026-09-08.
Implemented in privateassets. Software citation: CITATION.cff.
Reproducible released workflow¶
The tested support floor for this CPU workflow is privateassets 0.7.1 on Python 3.12. This is a verified floor, not the historical introduction version. Install core without extras; save the existing package-owned script and run it outside synchronized folders:
python -m pip install "privateassets==0.7.1"
python -c "from importlib.metadata import version; import privateassets as p; print(version('privateassets')); print(p.__file__)"
Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/ArturSepp/PrivateAssets/871c7f330fbbf86d496a8f716db57b4c17cd0fa6/examples/first_success.py' -OutFile first_success.py
python first_success.py
Installation and saving the script need internet; execution is offline. Measure installation separately from execution and allow any first Numba compilation to finish. There is no universal time-to-first-result promise.
The input is entirely synthetic: a contribution of 100 on 1 January 2020, a distribution of 110 on 1 January 2021, zero terminal residual NAV and a benchmark growing from 100 to 110. Cash-flow signs are negative for contributions and positive for distributions. PME is dimensionless; this first task does not estimate annualised alpha or factor exposures. The script checks for a finite positive PME and prints the installed version and a success line. It writes no files, opens no GUI and needs no vendor, client/LP records, credentials or optional extras.
The MIT core consumes qis. The optional factors extra adds FactorLasso; it is not needed
for this path. Preserve its separate dependency/licence boundary when choosing later workflows.
Stable documentation is the release channel;
latest follows main and may describe unreleased
changes. Check the build’s source version rather than inferring it from a stable alias.
Run the canonical example¶
Install the core package as described in Installation. The deterministic example below calculates PME on synthetic cash flows without files, network access, or optional extras.
From a source checkout, run:
python examples/first_success.py
The script prints the installed package version followed by
core PME calculation succeeded. The examples/ directory is not shipped
in the wheel; wheel users can copy the complete script below.
"""Exercise a minimal offline PME calculation using only core dependencies."""
# packages
from enum import Enum
import numpy as np
import pandas as pd
# qis / project
import privateassets
from privateassets.matf import ks_pme
class Locals(Enum):
"""available local example workflows."""
CORE_PME = 1
def run_local(local: Locals) -> None:
"""run one finite core calculation without files, network, or optional extras."""
if local != Locals.CORE_PME:
raise ValueError(f"unsupported local case: {local}")
dates = pd.Series(pd.to_datetime(['2020-01-01', '2021-01-01']))
amounts = pd.Series([-100.0, 110.0])
benchmark = pd.Series([100.0, 110.0], index=pd.DatetimeIndex(dates))
pme = ks_pme(
cf_dates=dates,
cf_amounts=amounts,
rvpi_nav=0.0,
rvpi_date=dates.iloc[-1],
bench_idx=benchmark,
)
if not np.isfinite(pme) or pme <= 0.0:
raise RuntimeError(f'core PME calculation returned {pme!r}')
print(f'privateassets {privateassets.__version__}: core PME calculation succeeded')
if __name__ == '__main__':
run_local(local=Locals.CORE_PME)
Read Conventions before applying the Core workflows to empirical inputs.