Direct indexing at scale
One base index, many per-account variants.
Direct indexing is one strategy expressed as many portfolios. Each account holds the securities directly rather than a fund, which lets it deviate: this client will not hold tobacco, that one is overweight their employer's stock and needs it excluded, a third wants a mild value tilt.
The architecture that works is one base index plus one variant workflow per account, where the variant reads the base's published output and applies the account's rules to it. What it is not is a thousand independent strategies. Everything specific to an account should live in data, not in a graph.
The base index
The base carries the methodology: selection, weighting scheme, reconstitution and rebalance cadence. Here it is a classic market-cap benchmark — annual reconstitution, quarterly rebalance. It runs once, no matter how many accounts track it.
- The annual flow (ops 0–6) sets membership and writes index-universes.
- The quarterly flow (ops 00–04) reads that universe as_of the run, prices it, weights by market cap and writes index-weightings and index-holdings.
- Every publication on those tables is an event a variant can listen for.
Deploy the base first, and only once
idx_ id, so it has to be live before any of them are. It is also the
only place expensive work happens — a screen over the full US cross-section runs once per rebalance, not once per
account.The account rules dataset
Put every account's deviations in a single dataset, keyed by account. One file, one upload path, one place to audit — and adding an account becomes a row, not a code change.
account_id,symbol,rule,valueACC-10042,XOM,exclude,ACC-10042,CVX,exclude,ACC-10042,MSFT,tilt,0.5ACC-10088,PM,exclude,ACC-10088,MO,exclude,ACC-10088,AAPL,tilt,1.4
Two rule types cover most mandates. Exclusions remove a security outright — a concentrated position held elsewhere, a values-based screen, a restricted list. Tilts are multipliers on the base weight: 0.5 halves it, 1.4 raises it by 40%, and the weighting step renormalises afterwards so the book still sums to one.
Upload it as a normal dataset — see Bring your own data — and update it in place as mandates change.
The variant workflow
A variant is short, because it inherits the strategy. It listens for the base's rebalance, loads the rules for its own account, removes the exclusions and re-weights what is left.
- index_event_trigger fires when idx_BASE500 publishes a new weighting. Like dataset_trigger, the trigger IS the data source — output.data holds the published weighting.
- load_dataset reads the account rules, filtered to this account_id.
- map_identifiers turns the excluded symbols into Index One ids so they can be matched against the base weighting.
- filter with not_in drops the excluded ids. Note that both upstream operations appear in the input array — base_event for the data, excl_ids for the $ref inside the filter value.
- create_index_weighting re-normalises the surviving base weights (weighting_type: proportional on the weight column), and create_index_holdings turns them into share counts for this account.
Re-normalise, do not just delete
create_index_weighting with
weighting_type: "proportional" on the weight column redistributes the gap across what remains, in
proportion. That is what makes the variant a complete portfolio rather than the base with holes in it.Adding tilts
A tilt is a multiplication before the renormalisation. Join the base weighting to the account's tilt rows on id with how: "left", use calculate to multiply weight by the tilt factor into a new column, and point create_index_weighting at that column instead. Accounts with no tilt row get a null factor — fill it with 1 rather than dropping the security, or a client with one tilt ends up holding one stock.
{"id": "tilted","operation": "calculate","parameters": {"data": { "$ref": "joined.output" },"formulas": [{ "output": "tilted_weight", "op": "multiply", "a": "weight", "b": "tilt_factor" }],"drop_nulls": false},"input": [{ "$ref": "joined" }]}
Scaling to many accounts
The variant graph above is identical for every account except for one literal: the account_id in the load_dataset filter, and the workflow name. That is the property to preserve as the book grows.
- Template the variant. Keep one canonical
index_parametersobject with the account id as the only substitution. Generate the rest programmatically. - Provision them over REST or MCP.
POST /workflowscreates one live index per account and returns immediately, so a provisioning script can fire them off and pollGET /workflows/{workflow_id}for each. The MCP path issave_workflowthendeploy_index(confirm=true). Either way each deploy backfills that account's history. - Never fork the graph per account. The moment two accounts have structurally different graphs you have two strategies to maintain. Every deviation belongs in the rules dataset.
- Let the base fan out. All variants listen to the same
index_event_triggeron the base, so one base rebalance wakes all of them. Nothing has to be scheduled per account. - Group the long tail. Accounts that share a rule set can share one variant rather than getting one each. Model portfolios rather than per-account graphs where the mandate allows it.
Deploy is per index, and it backfills
deploy_index runs a full backtest and persists its history before registering the schedule. For a large
onboarding batch, that is real compute per account — expect it to take time. The tool returns its ids
immediately; drive the batch from get_backtest(backtest_id) polling.What to deliver per account
Each variant is a live index with its own idx_ id, so it has the same read path and the same delivery options as anything else. What differs is the audience.
| Recipient | Payload | Trigger | Channel |
|---|---|---|---|
| Trading / OMS | changes | index_event on weighting | SFTP or webhook — the adds, drops and weight moves to trade |
| Custodian / ops | holdings | index_event on holdings | SFTP, one file per account |
| Client reporting | values | cron, monthly | Email — the level series for the period |
| Compliance | weightings | index_event on weighting | Webhook, for automated restricted-list checks |
A delivery accepts index_ids as a list, so a single delivery can cover a group of accounts that share a destination. Set per_index: true on a webhook so the receiver gets one request per account rather than one combined body, and put the index id in filename_template for SFTP so files do not collide. Details in Set up a delivery.
Operational notes
- A corporate action on a base constituent affects every variant holding it. The engine handles shares and divisor per index — see Corporate actions — but the resulting trades land in every account.
- Adding an exclusion mid-quarter does nothing until the variant next runs, because it is triggered by the base. If a restriction has to take effect immediately, that is a manual trigger, not a data change.
- Reconcile variants against the base periodically: pull each variant's latest holdings and check that the excluded ids are genuinely absent and the weights sum to one.
- Watch out for accounts whose exclusions remove a large fraction of the index. Renormalisation will still produce a valid portfolio, but its tracking error against the base may be outside what the mandate assumes.