Skip to content

feat(samples): realistic month-end files generated from fictional funds - #35

Merged
karlkauc merged 2 commits into
mainfrom
feat/realistic-samples
Nov 16, 2026
Merged

karlkauc merged 2 commits into
mainfrom
feat/realistic-samples

Conversation

@karlkauc

Copy link
Copy Markdown
Contributor

Adds four realistic month-end FundsXML 4.2.9 files of fictional funds, and the generator that writes them. The existing small samples stay unchanged as teaching samples and CI fixtures.

File Net assets (EUR) Positions Share classes Transactions
Global-Equity-Fund_2025-10.xml 602,060,878.93 123 (112 equities in 7 currencies, index futures, FX hedges, accounts, fee accrual) 3 incl. USD hedged 67
Euro-Bond-Fund_2025-10.xml 838,581,814.97 207 (200 bonds, interest rate futures, IRS) 2 56
Multi-Asset-Derivatives-Fund_2025-10.xml 278,791,093.07 81 over 12 asset types (options, futures, FX forwards, IRS/CCS/CDS/TRS, warrants, certificates, ETFs …) 4 incl. CHF/USD hedged 56
Fund-of-Funds_2025-10.xml 155,706,556.38 38 target funds + look-through (PositionsDecomposed) 2 30

They include fund static data (companies, managers, benchmark, costs, SFDR), daily prices and benchmark values, distributions, fees, flows, performance with data series, breakdowns, risk codes, exposures, dividends with withholding tax, coupons, accrued interest, ratings and durations. Together they use far more of the schema than the small samples (about 250 distinct elements per file, against 148 across all of today's 4.2.9 samples).

Consistency (the generator asserts it before writing):

  • Positions add up to the net assets to the cent, and percentages to exactly 100.
  • The share classes add up to the fund, and NAV × shares equals each class's net assets.
  • The 1-month performance follows from the daily prices.
  • Every flow has a CASH transaction, and trades settle T+2 within the month.

Synthetic identifiers with valid check digits: ISIN = country + XMPL + 5 characters + Luhn digit, LEI = XMPL00 + 12 characters. --verify-online asked GLEIF and ESMA FIRDS: none of the 205 LEIs and 400 ISINs is registered. Company, fund and issuer names are fictional.

Also in this PR

  • basic_checks.sch: the share-class ISIN rule now only checks the fund's own share classes. It used to warn on every share-class holding, which gave 35 warnings on the fund of funds. The canonical sample now has 8 advisory warnings instead of 12; the docs are updated.
  • CI:
    • regenerates the files and fails if they differ;
    • lints every ISIN and LEI under FundsXML_Files/ and tests/fixtures/;
    • validates the new files against 4.2.9;
    • runs Schematron (must pass), the custom DQ check (no fail), the factsheet and the CSV export;
    • checks the fund-summary.xq reconciliation (NavDelta = 0.00, percentages OK).

Checked locally (FreeXmlToolkit fxt-cli, Saxon HE 12, Xerces):

  • All four files are XSD-valid and Schematron reports 0 errors and 0 warnings.
  • The custom DQ check passes 4 of 4 rules on each file.
  • All four XQuery examples and the reports run.
  • Generating twice gives byte-identical files.

🤖 Generated with Claude Code

karlkauc and others added 2 commits November 16, 2026 23:55
…sses

The rule matched every element named ShareClass, including share-class
holdings (Position/ShareClass, AssetDetails/ShareClass) that are
identified on their Position/Asset; it warned on each fund-of-funds
holding. The canonical sample now has 8 advisory warnings instead of 12.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FundsXML_Files/4.2.9/realistic/ holds four month-end files at production
scale: a global equity fund (123 positions, 3 share classes), a euro bond
fund (207 positions), a multi-asset fund with listed and OTC derivatives
(81 positions over 12 asset types) and a fund of funds with look-through.
They carry a month of transactions, income, flows, daily prices,
performance, breakdowns, risk codes and exposures; positions add up to
the net assets and share classes to the fund, to the cent.

make_realistic.py (standard library, deterministic) writes them;
identifiers are synthetic with valid check digits (ISIN CC+XMPL...,
LEI XMPL00...). CI regenerates and compares the files, lints every ISIN
and LEI, validates them against 4.2.9 and runs Schematron, the custom DQ
check, the factsheet, the CSV export and the fund-summary reconciliation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@karlkauc
karlkauc merged commit a4d299d into main Nov 16, 2026
4 checks passed
@karlkauc
karlkauc deleted the feat/realistic-samples branch November 16, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant