Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions FundsXML_Files/4.2.9/realistic/Global-Equity-Fund_2025-10.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9347,8 +9347,8 @@
<NavDate>2025-10-31</NavDate>
<TotalAssetNature>OFFICIAL</TotalAssetNature>
<TotalNetAssetValue>
<Amount ccy="USD">90430748.14</Amount>
<Amount ccy="EUR">78267914.26</Amount>
<Amount ccy="USD" isShareClassCcy="true">90430748.14</Amount>
<Amount ccy="EUR" isFundCcy="true">78267914.26</Amount>
</TotalNetAssetValue>
<SharesOutstanding>628340.385</SharesOutstanding>
</TotalAssetValue>
Expand Down
2,406 changes: 2,402 additions & 4 deletions FundsXML_Files/4.2.9/realistic/Multi-Asset-Derivatives-Fund_2025-10.xml

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion FundsXML_Files/4.2.9/realistic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ warnings (checked in CI).
|---|---|---|---|---|---|---|---|
| `Global-Equity-Fund_2025-10.xml` | 0.6 MB | 602,060,878.93 | 123: 112 equities in 7 currencies, 2 index futures, 3 FX forwards, 5 accounts, fee accrual | 3: EUR R acc, EUR I dist, USD R hedged | 67 (trades, a stock split, subscriptions/redemptions) | 31 dividends with withholding tax, account interest | Fund static data (companies, managers, benchmark, costs, SFDR), daily prices and benchmark values, distribution, fees, flows, performance with data series, breakdowns, risk codes, exposures, NACE industry codes |
| `Euro-Bond-Fund_2025-10.xml` | 1.0 MB | 838,581,814.97 | 207: 200 bonds (fixed, floating, zero; sovereign, agency, covered, corporate), 4 interest rate futures, 1 interest rate swap, account, fee accrual | 2: EUR R acc, EUR I dist | 56 (trades with accrued interest, flows) | coupons, account interest | Accrued interest, dirty prices, yields, durations, ratings, maturity/rating/issuer-type breakdowns |
| `Multi-Asset-Derivatives-Fund_2025-10.xml` | 0.5 MB | 278,791,093.07 | 81 over 12 asset types: equities, bonds, ETFs, warrants, certificates, options, futures, FX forwards, swaps (IRS, cross currency, CDS, total return), call money, accounts, fee accrual | 4: EUR R, EUR I, CHF and USD hedged | 56 | dividends, coupons, interest | Counterparties, swap legs, underlyings with delta, delta-adjusted and commitment exposures, leverage and VaR |
| `Multi-Asset-Derivatives-Fund_2025-10.xml` | 0.6 MB | 278,791,093.07 | 81 over 12 asset types: equities, bonds, ETFs, warrants, certificates, options, futures, FX forwards, swaps (IRS, cross currency, CDS, total return), call money, accounts, fee accrual | 4: EUR R, EUR I, CHF and USD hedged | 56 | dividends, coupons, interest | Counterparties, swap legs, underlyings with delta, delta-adjusted and commitment exposures, leverage and VaR; `RegulatoryReportings` with an EMT V4.2 per share class and a TPT V7 (Solvency II) of the EUR R class with its equities and bonds |
| `Fund-of-Funds_2025-10.xml` | 0.4 MB | 155,706,556.38 | 38: 35 target funds of 5 managers, 2 accounts, fee accrual | 2: EUR T acc, EUR A dist | 30 | fund distributions, interest | `FundOfFundFlag`, look-through level 1 (`PositionsDecomposed`) into the target funds' securities |

Share classes in another currency than the fund report their net assets twice, marked with `isShareClassCcy` and
`isFundCcy`.

Reporting date is 2025-10-31; transactions, income, subscriptions and redemptions cover October 2025.

## What is consistent
Expand Down
218 changes: 215 additions & 3 deletions FundsXML_Files/4.2.9/realistic/make_realistic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,13 @@ def emit_share_class(w, c, fund):
w.open("TotalAssetValue")
w.leaf("NavDate", AS_OF.isoformat())
w.leaf("TotalAssetNature", "OFFICIAL")
w.amounts("TotalNetAssetValue", (c["ccy_tna"], c["ccy"]), (c["eur_tna"], "EUR"))
if c["ccy"] == "EUR":
w.amounts("TotalNetAssetValue", (c["eur_tna"], "EUR"))
else: # a class in another currency: the flags tell the share-class amount from the fund-currency one
w.open("TotalNetAssetValue")
w.leaf("Amount", c["ccy_tna"], ccy=c["ccy"], isShareClassCcy="true")
w.leaf("Amount", c["eur_tna"], ccy="EUR", isFundCcy="true")
w.close("TotalNetAssetValue")
w.leaf("SharesOutstanding", c["shares"])
w.close("TotalAssetValue")
w.close("TotalAssetValues")
Expand Down Expand Up @@ -1173,6 +1179,209 @@ def emit_assets(w, doc):
w.close("AssetMasterData")


EEA = {"AT", "BE", "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR", "DE", "GR", "HU", "IE", "IT", "LV", "LT", "LU", "MT",
"NL", "PL", "PT", "RO", "SK", "SI", "ES", "SE", "IS", "LI", "NO"}
BOND_CIC = {"Sovereign": "11", "Supranational/Agency": "12", "Covered bond": "26", "Corporate": "21"}
BOND_NACE = {"Sovereign": "O8411", "Supranational/Agency": "K6492", "Covered bond": "K6419"}
EQUITY_BY_ISSUER = {e["issuer"]: e for e in EQUITIES}


def emit_regulatory(w, doc, fund, classes):
"""RegulatoryReportings: an EMT V4.2 per share class (to distributors) and a TPT V7 of the first
share class (to insurers, Solvency II look-through) with the fund's equities and bonds."""
tna = doc.tna
costs = dict(fund["costs"])
w.open("RegulatoryReportings")
w.open("DirectReporting")
w.open("EMT_V4_2")
for c in classes:
w.open("FinancialInstrument")
w.open("DataSetInformation")
w.leaf("Version", "V4S2")
w.leaf("ProducerName", MANCO["name"])
w.leaf("FileGenerationDateTime", GENERATED)
w.leaf("DataReportingTargetMarket", "Y")
w.leaf("DataReportingExAnte", "Y")
w.leaf("DataReportingExPost", "N")
w.close("DataSetInformation")
w.open("GeneralInformation")
w.leaf("Code", c["isin"])
w.leaf("CodificationSystem", 1)
w.leaf("InstrumentName", f"{fund['name']} {c['name_suffix']}")
w.leaf("InstrumentCurrency", c["ccy"])
w.leaf("InstrumentPerformanceFee", "Y" if "Performance Fee" in costs else "N")
w.leaf("InstrumentDistributionCash", "Y" if c.get("distribution") else "N")
w.leaf("GeneralReferenceDate", AS_OF.isoformat())
w.leaf("ProductType", "U")
w.leaf("ManufacturerName", MANCO["name"])
w.leaf("LeveragedOrContingentLiability", "N")
w.close("GeneralInformation")
w.open("TargetMarket")
w.leaf("GeneralReferenceDate", AS_OF.isoformat())
retail = c["minimum"] < 100000
w.open("InvestorType")
w.leaf("Retail", "Y" if retail else "N")
w.leaf("Professional", "Y")
w.leaf("EligibleCounterparty", "Y")
w.close("InvestorType")
w.open("KnowledgeAndExperience")
w.leaf("BasicInvestor", "Y" if retail else "N")
w.leaf("InformedInvestor", "Y")
w.leaf("AdvancedInvestor", "Y")
w.close("KnowledgeAndExperience")
w.open("AbilityToBearLosses")
w.leaf("CompatibleWithClientsWhoCanNotBearCapitalLoss", "N")
w.leaf("CompatibleWithClientsWhoDoNotNeedCapitalGuarantee", "Y")
w.leaf("CompatibleWithClientsWhoCanBearLossBeyondCapital", "N")
w.close("AbilityToBearLosses")
w.open("RiskTolerance")
w.leaf("PRIIPSMethodology", 3)
w.close("RiskTolerance")
w.open("ClientObjectives")
w.open("ReturnProfile")
w.leaf("ClientLookingForPreservation", "N")
w.leaf("ClientLookingForCapitalGrowth", "Y")
w.leaf("ClientLookingForIncome", "Y" if c.get("distribution") else "N")
w.close("ReturnProfile")
w.open("MinimumRecommendedHoldingPeriod")
w.leaf("Years", 5)
w.close("MinimumRecommendedHoldingPeriod")
w.leaf("IntendedCompatibleWithClientsHavingSustainabilityPreferences", "Y" if fund["sfdr"] != "6" else "Neutral")
w.close("ClientObjectives")
w.open("DistributionStrategy")
for tag in ("ExecutionOnly", "ExecutionWithCheckOrNonAdvisedServices", "InvestmentAdvice", "PortfolioManagement"):
w.leaf(tag, "B" if retail else "P")
w.close("DistributionStrategy")
w.close("TargetMarket")
w.open("CostsAndChargesExAnte")
w.open("Fund")
w.leaf("OngoingCosts", q(costs["Ongoing Charges"] / 100, "0.0001"))
w.leaf("ManagementFee", q(c["fee"] / 100, "0.0001"))
w.leaf("TransactionCosts", q(costs.get("Transaction Costs", D("0")) / 100, "0.0001"))
w.leaf("IncidentalCosts", q(costs.get("Performance Fee", D("0")) / 100, "0.0001"))
w.close("Fund")
w.leaf("CostsReferenceDate", AS_OF.isoformat())
w.close("CostsAndChargesExAnte")
w.close("FinancialInstrument")
w.close("EMT_V4_2")
w.close("DirectReporting")

c = classes[0]
cash = sum(p["value"] for p in doc.positions if p["block"]["type"] in ("Account", "CallMoney"))
w.open("IndirectReporting")
w.open("TripartiteTemplateSolvencyII_V7")
w.open("Portfolio")
w.leaf("TPTVersion", "V7.0")
w.open("PortfolioID")
w.leaf("CodificationSystem", 1)
w.leaf("Code", c["isin"])
w.close("PortfolioID")
w.leaf("PortfolioName", f"{fund['name']} {c['name_suffix']}")
w.leaf("PortfolioCurrency", "EUR")
w.leaf("TotalNetAssets", tna)
w.leaf("ValuationDate", AS_OF.isoformat())
w.leaf("ReportingDate", "2025-11-14")
w.open("ShareClass")
w.leaf("SharePrice", c["nav"])
w.leaf("TotalNumberOfShares", c["shares"])
w.close("ShareClass")
w.leaf("CashPercentage", q(cash / tna, "0.0001"))
w.leaf("CompleteSCRDelivery", "N")
w.open("QRTPortfolioInformation")
w.open("FundIssuer")
w.leaf("Name", MANCO["name"])
w.leaf("Code", MANCO["lei"])
w.leaf("CodeType", 1)
w.leaf("EconomicSector", "K6630")
w.leaf("Country", MANCO["country"])
w.close("FundIssuer")
w.open("FundIssuerGroup")
w.leaf("Name", MANCO["name"])
w.leaf("Code", MANCO["lei"])
w.leaf("CodeType", 1)
w.close("FundIssuerGroup")
w.leaf("FundCIC", fund["country"] + "44")
w.leaf("FundCustodianCountry", DEPOSITARY["country"])
w.leaf("Duration", q(sum(p["value"] * dict(p["risk"])["MODIFIED DURATION"] for p in doc.positions
if p["block"]["type"] == "Bond") / tna)) # bonds only, without futures and swaps
w.close("QRTPortfolioInformation")
w.open("Positions")
for p in doc.positions:
a, b = p["asset"], p["block"]
if b["type"] not in ("Equity", "Bond"):
continue
equity = b["type"] == "Equity"
weight = q(p["value"] / tna, "0.000001")
w.open("Position")
w.leaf("InstrumentCIC", a["country"] + ("31" if equity else BOND_CIC[a["sector"]]))
w.open("InstrumentCode")
w.leaf("CodificationSystem", 1)
w.leaf("Code", a["isin"])
w.close("InstrumentCode")
w.leaf("InstrumentName", a["name"])
w.open("Valuation")
if equity:
w.leaf("Quantity", b["units"])
else:
w.leaf("TotalNominalValueQC", b["nominal"])
w.leaf("QuotationCurrency", a["ccy"])
local = b["local"] if equity else b["clean"] + b["accrued"]
w.leaf("MarketValueQC", local)
w.leaf("CleanValueQC", local if equity else b["clean"])
if not equity:
w.leaf("AccruedIncomeQC", b["accrued"])
w.leaf("MarketValuePC", p["value"])
w.leaf("CleanValuePC", p["value"] if equity else b["clean"])
if not equity:
w.leaf("AccruedIncomePC", b["accrued"])
w.leaf("PositionWeight", weight)
w.leaf("MarketExposureQC", local)
w.leaf("MarketExposurePC", p["value"])
w.leaf("MarketExposureWeight", weight)
w.close("Valuation")
if not equity:
w.open("InterestRateInstrumentCharacteristics")
w.leaf("RateType", {"fix": "Fixed", "float": "Floating", "zero": "Fixed"}[a["coupon_type"]])
w.leaf("CouponRate", a["coupon"])
w.leaf("CouponFrequency", 4 if a["frequency"] == "QURT" else 1)
w.leaf("EffectiveDateOfInstrument", a["issue"].isoformat())
w.open("Redemption")
w.leaf("MaturityDate", a["maturity"].isoformat())
w.leaf("Type", "Bullet")
w.leaf("Rate", 1)
w.close("Redemption")
w.close("InterestRateInstrumentCharacteristics")
w.open("CreditRiskData")
for tag in ("InstrumentIssuer", "IssuerGroup"):
w.open(tag)
w.leaf("Name", a["issuer"])
w.leaf("Code", a["issuer_lei"])
w.leaf("CodeType", 1)
w.close(tag)
w.leaf("IssuerCountry", issuer(a)["country"])
w.leaf("EconomicArea", 1 if issuer(a)["country"] in EEA else 2)
if equity or a["sector"] == "Corporate":
e = a if equity else EQUITY_BY_ISSUER[a["issuer"]]
w.leaf("EconomicSector", e["section"][0] + e["nace"].replace(".", ""))
else:
w.leaf("EconomicSector", BOND_NACE[a["sector"]])
w.close("CreditRiskData")
if not equity:
w.open("Analytics")
w.leaf("ModifiedDurationToMaturity", dict(p["risk"])["MODIFIED DURATION"])
w.close("Analytics")
w.open("AdditionalInformation")
w.leaf("InfrastructureInvestment", 0)
w.leaf("InfrastructureInvestmentAdditionalQRT", 1)
w.close("AdditionalInformation")
w.close("Position")
w.close("Positions")
w.close("Portfolio")
w.close("TripartiteTemplateSolvencyII_V7")
w.close("IndirectReporting")
w.close("RegulatoryReportings")


def issuer(a):
return {"lei": a["issuer_lei"], "name": a["issuer"], "country": a["country"] if a["country"] != "XS" else "DE",
"city": None}
Expand Down Expand Up @@ -1745,9 +1954,10 @@ def fund_of_funds():
"Multi-Asset-Derivatives-Fund_2025-10.xml": multi_asset,
"Fund-of-Funds_2025-10.xml": fund_of_funds,
}
REGULATORY = {"Multi-Asset-Derivatives-Fund_2025-10.xml"} # files with RegulatoryReportings (EMT, TPT)


def render(builder, doc_id):
def render(builder, doc_id, regulatory=False):
doc, fund, classes, breakdowns, risk, benchmark = builder()
seq = 0
for t in sorted(doc.transactions, key=lambda t: (t["date"], t["kind"] == "CASH")):
Expand All @@ -1768,6 +1978,8 @@ def render(builder, doc_id):
emit_fund(w, doc, fund, classes, breakdowns, risk, benchmark)
w.close("Funds")
emit_assets(w, doc)
if regulatory:
emit_regulatory(w, doc, fund, classes)
w.depth = 0
w.lines.append("</FundsXML4>")
return w.text()
Expand Down Expand Up @@ -1863,7 +2075,7 @@ def main():
continue
doc_id = "EXAMPLE-" + name.replace(".xml", "").upper().replace("_", "-")
with open(args.out / name, "w", encoding="utf-8", newline="\n") as f:
f.write(render(builder, doc_id))
f.write(render(builder, doc_id, regulatory=name in REGULATORY))
print("wrote", args.out / name)
return 0

Expand Down
4 changes: 2 additions & 2 deletions Schematron_DataQuality_Checks/Basic_Checks/basic_checks.sch
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<title>Structural Integrity Checks</title>

<!-- Rule: Fund should have a LEI identifier -->
<rule context="Fund">
<rule context="Funds/Fund">
<assert test="Identifiers/LEI" role="warning">
WARNING: Fund "<value-of select="Names/OfficialName"/>" should have a LEI identifier
</assert>
Expand Down Expand Up @@ -255,7 +255,7 @@
<title>Date Consistency Validations</title>

<!-- Rule: All NAV dates should be consistent -->
<rule context="Fund">
<rule context="Funds/Fund">
<let name="fundNavDate" value="FundDynamicData/TotalAssetValues/TotalAssetValue/NavDate"/>

<!-- Check ShareClass NAV dates -->
Expand Down
2 changes: 1 addition & 1 deletion XSLT_DataQuality_Checks/Basic_Checks/basic_checks.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<p>Content Date: <xsl:value-of select="//ContentDate"/></p>

<!-- Process each fund in the document -->
<xsl:for-each select="//Fund">
<xsl:for-each select="//Funds/Fund">
<xsl:call-template name="check-fund"/>
</xsl:for-each>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<!-- R2: UniqueID naming convention -->
<h2>R2 — Position UniqueID convention (ID_&lt;digits&gt;)</h2>
<xsl:variable name="badIds"
select="//Position[not(matches(UniqueID,'^ID_\d{3,}$'))]"/>
select="//Portfolios/Portfolio/Positions/Position[not(matches(UniqueID,'^ID_\d{3,}$'))]"/>
<xsl:choose>
<xsl:when test="empty($badIds)">
<p class="ok">PASS — all position IDs follow the convention.</p>
Expand All @@ -97,7 +97,7 @@
<!-- R3: Concentration limit -->
<h2>R3 — Concentration limit (max <xsl:value-of select="$concentrationLimitPct"/>% per position)</h2>
<xsl:variable name="over"
select="//Position[number(TotalPercentage) gt $limitPct]"/>
select="//Portfolios/Portfolio/Positions/Position[number(TotalPercentage) gt $limitPct]"/>
<xsl:choose>
<xsl:when test="empty($over)">
<p class="ok">PASS — no position exceeds the concentration limit.</p>
Expand Down