- Every trade classified as outright or non-outright per scheme, security and settlement cycle
- Gross and net fund obligations computed side by side and reconciled with the custodian
- Treasury forecasts showing provisional and final obligations, with the cost of late trades visible
- No path in the code or data model for cross-scheme netting
- An audit trail trustees can review without engineering help
Anonymised composite. Client names, identifying details and confidential figures are withheld; public facts are cited in the references.
The situation
A mid-sized Indian asset management company ran equity and hybrid schemes whose cash market trades settled through a custodian on a gross basis, as institutional trades must: every purchase was funded in full and every sale paid out separately, even when the two largely offset on the same day. The treasury team pre-funded purchase obligations scheme by scheme from spreadsheets built on custodian files, and the order management system, fund accounting and custodian each held their own version of the day's trades.
Why now. On 5 November 2026 SEBI permitted net settlement of funds for mutual fund schemes' outright transactions in the cash segment, to reduce temporary funding needs and improve settlement efficiency, with effect from 1 April 20271. It follows the April 2026 framework that allowed net settlement of funds for Foreign Portfolio Investors, due by 31 December 20263. The circular asks AMCs and custodians to put systems and controls in place for scheme-wise identification of outright and non-outright trades and of gross and net obligations, to keep a clear audit trail, and to confirm system readiness jointly before implementation. Detailed file formats, timelines and reconciliation standards are left to AMFI to formulate with the clearing corporations, exchanges and custodians2.
So the engagement had to start before the detailed standards existed. The brief: be ready on day one, without rebuilding everything when the standards arrive.
What had to be true
- Classification exactly as the circular defines it: outright means a purchase or a sale, but not both, in a security in the same settlement cycle by a scheme1.
- No netting across schemes, ever: not in code, not in data, not in a treasury workaround2.
- Accounting untouched: scheme-wise accounting, NAV, asset allocation and investment limits must not be affected by netting2.
- Gross and net side by side, so every net figure can be explained from the gross trades behind it.
- Formats configurable, because AMFI's standards would define files, cut-offs and exception handling later.
- An audit trail a trustee can read, since trustees must review the implementation in unit-holders' interest2.
Architecture
The most important design choice was where the netting sits. It is a cash-movement view, not an accounting fact, so the obligation engine produces it from gross trades and fund accounting never sees it. Every record in the ledger carries a scheme identifier, and the engine's grouping key starts with the scheme, so there is no query or function that could combine two schemes' obligations.
The data flow, end to end
- CaptureExecuted trades arrive per scheme with security and settlement cycle
- ClassifyEach scheme, security and cycle marked outright or non-outright
- ComputeGross obligations and net fund obligation for outright trades
- ReconcileEngine figures matched to custodian obligations; breaks queued
- FundTreasury funds residual purchase obligations scheme by scheme
- RecordGross, netted and excluded trades kept as one audit trail
The circular's own annexure became the first test case: a scheme buying security A, buying and selling security B, and selling security C. Under gross settlement every leg is funded separately; under the framework, A and C are netted, while B, being non-outright, stays gross2. The team encoded that example, and variations of it, as fixtures the engine had to reproduce exactly before any other work was accepted. The rules on residuals were encoded the same way: a shortfall is funded by the scheme, and excess outright sale proceeds may not be set against non-outright purchase obligations2.
The hard part: a late trade can undo the netting
Classification is a property of the whole settlement cycle, not of a single trade. If a scheme has sold a security and a fund manager later buys the same security in the same cycle, both trades become non-outright and drop out of netting. The scheme's funding need goes up, not down, because a trade was added. Rejected, unconfirmed and modified trades can flip classifications the same way, which is why the circular lists their treatment among the matters AMFI's standards must cover2.
The design answer was two kinds of figure. A provisional obligation is recomputed on every trade event; a final obligation is fixed at the cut-off the standards set. Treasury forecasts showed both, together with the funding the scheme would need if every outright security in play became non-outright, so the treasury never relied on netting that could still disappear. The order management system was also given a warning: before a trade in a security the scheme had already traded the other way in that cycle, the dealer sees that it will remove the security from netting. The decision stays with the fund manager; the cost becomes visible.
Keeping scheme and cycle context intact across order management, the engine, reconciliation and treasury needed explicit plumbing. OpenTelemetry's baggage carries key-value context between services alongside a trace, but it is not added to spans automatically, so each service has to read it and record what it needs4. The team set the scheme and settlement cycle as baggage at trade capture and copied them onto every span and log line, so any break could be traced to the scheme and cycle it belonged to.

Net the cash, never the facts. Keep every trade, every classification and every obligation gross in the record, and treat the net figure as a view you can always rebuild and explain.
The engine reused patterns from payments work: idempotent processing of every trade event and an append-only ledger, as in idempotent payment pipelines and the payments platform case study. Interfaces with the custodian were written as data contracts, following the data contracts playbook, and trade events moved by change data capture from the order management database, as described in change data capture and event streams.
How it ran
- Current funding process mapped
- Provisional and final forecast agreed
- Exception handling roles
- Trade capture and classifier
- Obligation engine and ledger
- Custodian adapters and reconciliation
- File and status exchange agreed
- AMFI standards tracked
- Joint readiness confirmation
- Engine computes net beside today's gross
- Circular annexure as fixtures
- No money moves on net figures
- Engine matched to custodian daily
- Breaks classified and fixed
- Late-trade impact measured
- AMFI formats and cut-offs configured
- Exception handling as specified
- Trustee review pack
- Joint readiness confirmed
- Net funding from 1 April 2027
- Gross shadow kept for a period
Key decisions and trade-offs
| Decision | Alternative | Why |
|---|---|---|
| Netting as a cash view over gross records | Store only net obligations | Every net figure must be explainable and accounting must stay gross |
| Scheme as the first key everywhere | Rely on a rule forbidding cross-scheme netting | Make the prohibited state impossible to represent |
| Provisional and final obligations | One figure at end of day | Late trades can increase funding; treasury needs to see that early |
| Rules versioned by settlement cycle | Rules hard-coded in the engine | AMFI standards and later changes apply from a date, not retrospectively |
| Long shadow run before go-live | Switch over on the effective date | Reconciliation breaks are cheaper to find when no money depends on them |
What I'd do again, and differently
Again: turn the regulator's worked example into executable tests on day one. It settled arguments about interpretation faster than any meeting. Differently: involve the dealing desk earlier. The rule that a later opposite trade removes a security from netting changes the economics of trading decisions, and fund managers needed to understand it before seeing the warning in their screens, not after. For a wider view of regulated platform work in India, see the lending consent platform case study.
If you run fund operations or market infrastructure in India, my work with Indian companies explains how I approach it, or analyse your challenge and bring the result to a call.
- 1
- 2
- 3
- 4BaggageOpenTelemetry documentation