# Synthetic loss-tail example

Package version: 1.0.0 · prepared 2026-09-05.

## What this checks

Checks mean loss, empirical left-quantile VaR, upper-tail CVaR, and mean + lambda * CVaR for two invented ten-scenario loss distributions.

Paper DOI: https://doi.org/10.1109/SEEDA-CECNSM68644.2025.11329752

No external full-paper code archive is linked by the portfolio.

## Run locally

Prerequisite: Python 3.10 or later, CPU only. No third-party packages, GPU, network, credentials, or dataset download is required.

Extract the complete ZIP, open a terminal in its folder, and run:

```sh
python check.py
```

An assertion failure exits nonzero. A successful check prints the numeric result and a scope-specific PASS message. The equivalent notebook contains the same Python code; open notebook.ipynb with its working directory set to this extracted folder. A notebook environment is optional and is not bundled.

## Expected output

Both means are 13.2. With worst tail 20% and lambda 0.5, CVaR is 29.5 versus 45.5; the teaching objective is 27.95 versus 35.95.

Numeric reference values are in expected.json. The scripts check them deterministically; there is no random seed or stochastic training.

## Inputs and provenance

source.json contains synthetic losses authored for this portfolio; none are measured or published market outcomes.

provenance.json records the source, scope, package version, and SHA-256 hashes of the executable check, input data, and expected output. README, Python, equivalent notebook, source JSON, expected JSON, and provenance are included together in the ZIP.

## Limits

Teaching example only. These are not market returns, backtest results, trained policies, or investment advice. No public full-paper reproduction package is claimed.

Fresh network verification of the external archive was unavailable during package preparation. These small checks use the portfolio's existing sourced transcription, not a newly downloaded archive. A successful check must not be described as reproducing the full paper.
