# Portfolio data quality — evidence version 1

Article: https://investingstack.ai/research/portfolio-data-quality

## What ran

Twelve exact fictional input-state cases and eight boundary tests. Every case
proposes a EUR 3,000 stock purchase from cash. The base holdings total EUR 100,000.
No market data, AI model or authenticated order feed is used.

`cases.json` defines mutations of the base fixture. `fx-and-orders.json` supplies
an invented USD 50,000 position, EUR 0.80 per USD conversion and EUR 8,000 order
reservation. `policy.json`, `holdings.csv` and `fund-holdings.json` hold the
reference data. `results.json` is the published observed output.
`data-checklist.csv` and `data-checklist.de.csv` are reusable review worksheets.
The base case declares a complete, empty order feed. The illustrative open
order is applied only to cases that select an `order_status` in `cases.json`.

## Reproduce with the standard library

Unpack the archive and enter its directory. Python 3.9 or newer:

```bash
python3 -m unittest -v test_evidence
python3 reproduce.py --verify --output observed-results.json
```

The whole result is compared exactly. `--output` writes a separate observed file.
The fictional review date is 2026-11-12 and the arbitrary freshness limit is
0–7 calendar days. This does not establish intraday synchronization or that a
feed reflects its most recent event.

Incomplete fund coverage leaves the full issuer check unresolved. Stale
holdings retain conditional arithmetic but cannot clear freshness. Missing,
stale or future FX prevents a known EUR total; known EUR cash can still be
calculated. Reservations constrain uncommitted cash without reducing NAV.
`pending_cancel` retains the reservation; `canceled` releases it in this fixture.
A missing order feed is not treated as an empty order list.

The script does not implement a broker buying-power model, partial fills,
reconciliation, tax, leverage, settlement restrictions, FX fees or market moves.
Alpaca documentation is cited for the public distinction between open orders,
buying power and cancellation states. It is mutable documentation, not evidence
of a tested account or an immutable historical service snapshot.

## Integrity and reuse

`manifest.json` records SHA-256 for every other packet file and does not hash
itself. The companion `.zip.sha256` identifies the archive bytes. Verify the
manifest with Python:

```bash
python3 - <<'CHECK'
import hashlib, json, pathlib
root = pathlib.Path('.')
for name, digest in json.loads((root / 'manifest.json').read_text())['files'].items():
    assert hashlib.sha256((root / name).read_bytes()).hexdigest() == digest, name
print('Packet files verified')
CHECK
```

Original prose and fictional data: CC BY 4.0. Original Python: MIT. See
`LICENSE.txt`. Linked third-party sources and installed dependencies retain
their licenses. Cite InvestingStack, the article URL, packet version and manifest.

Prepared with AI assistance and executed offline on 2026-11-12. The exact
reference checker was extracted from the previously published investment-policy
worked example; its provenance is in `sources.json`. The format is a teaching
fixture, not an investing.md standard or an Investboard export. David Bartas
operates InvestingStack and founded Investboard. No authenticated product,
real portfolio, AI response or broker action was tested.
