Small Group Tutorials

Here to help students catch up, keep up, and move ahead. Book a consultation here.

How Collateral-Optimisation Algorithms Allocate Assets to Margin Calls: Eligibility, Haircuts, Concentration Limits, Opportunity Cost, Linear Programming and Substitution Risk

Three students in school uniforms work through open books at a classroom table, with textbooks and stationery nearby and study notes on the whiteboard behind them.

Reader question: A bank may own billions in cash, Treasuries, government bonds, equities and other securities while facing margin calls at several clearing houses and counterparties. If many assets are technically eligible, how does a system decide which collateral to post where?

The answer is a constrained allocation problem. Every candidate asset has a market value, haircut, currency, issuer, maturity, liquidity value and opportunity cost. Every margin obligation has an amount, eligible-collateral rule set, concentration limits, settlement location, segregation status and operational deadline. A collateral-optimisation algorithm assigns inventory to obligations so that haircut-adjusted eligible value covers every requirement while respecting all constraints and minimising a chosen cost function.

At small scale this can be done with ranked rules. At institutional scale it naturally becomes a linear, network-flow or mixed-integer optimisation problem.

What this page owns — and what it does not

This page owns:

collateral inventory + margin obligations + haircuts + eligibility/concentration rules + opportunity costs → feasible collateral allocation.

It does not replace variation-margin call algorithms, which calculate how much collateral is owed; ISDA SIMM, which calculates initial-margin requirements; repo pricing; or CCP default waterfalls.

This is mathematical collateral-management education. It does not recommend what any institution should post, finance or retain.

Start with haircut-adjusted value

If an asset has market value V and haircut h, a simple credited collateral value is:

C = V(1 − h).

A 10 million bond with a 4% haircut contributes:

10,000,000 × 0.96 = 9,600,000

of collateral value before any additional FX, concentration or account-specific adjustments.

Haircuts protect the collateral taker against the possibility that the asset’s liquidation value falls between valuation and sale.

Why haircuts differ

Clearing houses and central banks commonly vary haircuts by factors such as:

  • asset class;
  • credit quality;
  • remaining maturity or duration;
  • price volatility;
  • market liquidity;
  • currency mismatch;
  • stress liquidation horizon.

CME’s published schedules, for example, apply different haircuts across Treasury maturity buckets and add cross-currency haircuts where collateral currency differs from the requirement currency.

The haircut table is therefore an input to optimisation, not a number the optimiser is free to choose.

Coverage is the first hard constraint

For obligation j requiring margin Mj, let xij be the market value of asset i allocated to that obligation and hij the applicable haircut.

The basic requirement is:

Σi xij(1 − hij) ≥ Mj.

If this fails, the solution is infeasible regardless of how low its opportunity cost appears.

Inventory conservation is the second hard constraint

An asset cannot be posted twice unless the legal and operational framework genuinely permits reuse.

For available inventory Ai:

Σj xij ≤ Ai.

For segregated initial margin where reuse is prohibited, collateral posted into one segregated account is no longer available for another obligation.

A system that merely tags the same bond against several calls without enforcing conservation creates phantom liquidity.

Eligibility becomes a binary mask

Let:

eij = 1 if asset i is eligible for obligation j, otherwise 0.

Then impose:

xij = 0 when eij = 0.

Eligibility can depend on contract, clearing house, issuer, currency, rating, maturity, security type, settlement venue or legal documentation.

This is why “high-quality asset” is not enough. A Treasury security can be valuable yet ineligible for a specific margin account because of currency, account type, operational or contractual rules.

Concentration limits prevent one-dimensional solutions

Financial market infrastructures are expected under CPMI-IOSCO Principle 5 to use conservative haircuts and avoid excessive collateral concentration.

A clearing house can therefore impose limits such as:

  • maximum value from one issuer;
  • maximum value from one security;
  • maximum percentage from equities;
  • maximum amount in foreign currency;
  • maximum amount in a collateral category.

CME publicly uses both hard-dollar and percentage-based concentration limits for selected collateral types.

Mathematically, an issuer limit might be:

Σi∈issuer k xij(1−hij) ≤ Lkj.

Cross-currency haircuts change the economics

If a USD margin requirement is met with EUR cash or a non-USD security, an additional FX haircut may apply.

A stylised combined credited value might be:

C = V(1 − hasset)(1 − hFX).

The exact rule depends on the collateral taker.

This creates a computational weak link: adding haircut percentages directly can be wrong if the methodology applies them multiplicatively or uses a table-defined combined haircut.

The optimisation objective: cheapest collateral is not simply lowest haircut

Suppose cash has a 0% haircut and a Treasury has a 2% haircut.

Cash may still be more expensive to post economically because it could be needed for payments, liquidity buffers or variation margin. A Treasury can carry a higher haircut but lower opportunity cost.

For each asset i, define an economic cost ci per unit allocated. A simple objective is:

minimise Σi,j cijxij.

The cost can represent funding spread, foregone repo specialness, HQLA scarcity, settlement cost, transformation cost or internal liquidity value.

A simple two-call example

Suppose a bank has:

  • 10 million cash, haircut 0%, opportunity cost 4 units per million;
  • 12 million short Treasuries, haircut 1%, cost 1 unit per million;
  • 8 million longer Treasuries, haircut 4.5%, cost 0.8 units per million.

It faces two margin calls:

  • Call A = 10 million, accepts cash and both Treasury buckets;
  • Call B = 8 million, accepts only cash and short Treasuries.

A naive “use cheapest asset first” rule can allocate all short Treasuries to A and later discover that B cannot be covered cheaply.

A global optimiser sees both calls simultaneously and preserves scarce eligible assets for the obligations that need them.

Why greedy allocation can fail

Collateral optimisation has the same structure as many resource-allocation problems: a locally cheap choice can block a globally feasible or cheaper solution.

Asset X may be eligible everywhere. Asset Y may be eligible only at Counterparty 1.

If X is slightly cheaper, a greedy algorithm might use X at Counterparty 1 and leave Y unusable for Counterparty 2. The globally optimal solution can deliberately post the more expensive asset at one destination to preserve flexibility elsewhere.

Linear programming formulation

When allocations are divisible and costs are linear, the problem can be written as a linear program:

minimise cᵀx

subject to:

  • margin coverage constraints;
  • inventory limits;
  • eligibility constraints;
  • issuer/security/category concentration limits;
  • currency constraints;
  • minimum retained-liquidity constraints;
  • non-negativity.

Linear programming is powerful because it can find a global optimum and provide diagnostics such as binding constraints and shadow prices.

Shadow prices reveal scarce collateral

In linear optimisation, a dual value or shadow price associated with a constraint measures the objective improvement available if that constraint were relaxed slightly.

A high shadow price on a short-Treasury inventory constraint means those securities are scarce in the current allocation problem.

This can be more informative than simply saying “all short Treasuries are used.” It quantifies the marginal economic value of one additional unit of that collateral class under the model.

When mixed-integer optimisation is needed

Real collateral cannot always be divided continuously.

Constraints can include:

  • whole security lots;
  • minimum transfer amounts;
  • settlement-unit rules;
  • all-or-none account movements;
  • fixed fees for opening a collateral route;
  • binary legal eligibility states;
  • limited custodian accounts.

These can require integer or binary decision variables, turning the problem into a mixed-integer program.

The result can be harder to solve at large scale but closer to operational reality.

Substitution is a second optimisation problem

After collateral has been posted, market prices, haircuts and funding costs change.

An optimiser can ask:

Should currently posted asset A be recalled and replaced with asset B?

The theoretical cost saving must exceed substitution frictions such as:

  • settlement fees;
  • operational cutoffs;
  • fails risk;
  • custodian timing;
  • minimum transfer amounts;
  • temporary over-collateralisation during the switch.

An optimiser that ignores substitution cost can churn collateral continuously for tiny theoretical savings.

Segregated initial margin changes reuse assumptions

Rules for non-centrally cleared derivatives can require initial margin to be held with a third-party custodian and restrict rehypothecation or reuse.

That creates a hard inventory-state transition:

available → segregated/posted → unavailable for reuse.

Variation margin or other collateral arrangements can have different legal treatment.

The optimisation model must therefore know the collateral account and legal status, not merely the security identifier.

Wrong-way risk can make eligible collateral undesirable

Suppose a bank posts bonds issued by a company whose credit quality is strongly linked to the counterparty’s own default risk.

The collateral may lose value exactly when the counterparty defaults.

Collateral frameworks can prohibit or constrain such wrong-way risk. A purely mechanical haircut-cost optimiser that ignores issuer/counterparty relationships can produce an economically dangerous allocation.

Liquidity regulation creates internal opportunity costs

High-quality liquid assets can be valuable for the Liquidity Coverage Ratio and broader liquidity management.

Posting a scarce HQLA asset as collateral can reduce the institution’s remaining liquidity buffer or flexibility even if it is legally eligible.

A realistic optimiser can therefore assign an internal scarcity cost to HQLA rather than assuming “government bond = free collateral.”

Repo specialness creates another opportunity cost

An on-the-run Treasury trading special in repo can have financing value that exceeds that of an otherwise similar off-the-run bond.

If both are accepted as collateral with similar haircuts, the optimizer may prefer to post the less-special bond and retain the special security for financing.

This directly links collateral optimisation to repo pricing.

Inputs and outputs

A collateral-optimisation engine can require:

  • security-level inventory by legal owner and custody location;
  • market values and timestamps;
  • haircuts by destination and requirement currency;
  • margin obligations;
  • eligibility matrices;
  • issuer, country, asset-class and security concentration limits;
  • credit ratings and maturity data where relevant;
  • settlement and custody routes;
  • segregation/reuse rules;
  • FX mismatch rules;
  • opportunity-cost estimates;
  • minimum retained liquidity;
  • transfer and substitution costs;
  • operational deadlines.

Outputs can include:

  • asset-to-obligation allocation;
  • haircut-adjusted credited value;
  • coverage surplus or shortfall;
  • economic opportunity cost;
  • binding constraints;
  • scarcity/shadow-price indicators;
  • substitution recommendations;
  • unallocated inventory;
  • infeasibility reason codes.

Evidence polarity: what supports confidence?

Evidence for confidence includes every obligation remaining covered after haircuts, no asset inventory being double-used, exact compliance with current eligibility and concentration rules, lower or equal opportunity cost than benchmark heuristics, stable solutions under small data perturbations, and operational replay showing that proposed transfers could actually settle.

Evidence against confidence includes mathematically covered calls that fail after applying the correct haircut, allocations breaching an issuer cap, segregated assets being reused, an FX haircut being omitted, a supposedly “optimal” solution costing more than a simple feasible benchmark, or persistent recommended substitutions that cannot complete before cutoff.

Counterexample: lowest haircut is not cheapest collateral

Cash can have a zero haircut but very high internal liquidity value.

A Treasury with a small haircut may be economically cheaper to post even though more market value is required.

Counterexample: lowest opportunity cost asset may be unusable

A low-cost corporate bond can be ineligible at a CCP or can breach a concentration limit.

Optimisation occurs inside the feasible set. Cost cannot override eligibility.

Counterexample: a feasible morning allocation can fail in the afternoon

Market prices can fall, haircuts can change, a security can lose eligibility or a new margin call can arrive.

Collateral optimisation is therefore a stateful repeated process, not a one-time static solution.

Counterexample: mathematical optimality can create operational failure

Suppose the optimiser saves a small amount by moving securities through three custodians late in the day.

If one transfer misses cutoff, the institution can end with a margin shortfall despite the theoretical objective being lower.

Operational feasibility must be encoded as a hard constraint or realistic cost.

Weak links in implementation

Stale market values. Haircut-adjusted coverage is calculated from old prices.

Rule-version drift. Eligibility or haircut files are out of date.

Double-use bug. The same inventory is allocated through two systems.

Legal-owner mismatch. Assets belonging to one entity are assigned to another entity’s obligation.

Segregation blindness. Reuse restrictions are omitted.

FX-haircut omission. Requirement and collateral currencies differ.

Concentration bug. Limits are applied to market value instead of credited value, or vice versa, contrary to the rule.

Opportunity-cost staleness. Repo or liquidity scarcity changes but optimisation costs do not.

Churn. Tiny model savings trigger excessive substitutions.

Settlement blindness. Suggested assets are unavailable at the required location before cutoff.

Diagnostics: how to test the engine

  • coverage test: recompute every obligation independently from allocated assets and haircuts.
  • inventory conservation test: sum all allocations of each security and compare with legally available inventory.
  • ineligible-asset test: deliberately introduce a cheap but ineligible asset and require zero allocation.
  • haircut-shock test: increase haircuts and verify coverage or shortfall response.
  • concentration test: force an issuer/category cap to bind and verify redistribution.
  • FX mismatch test: change requirement currency and verify the appropriate additional haircut.
  • scarcity test: remove one flexible collateral class and inspect shadow-price/opportunity-cost changes.
  • benchmark test: compare optimisation cost with a simple ranked heuristic on the same feasible set.
  • segregation test: mark an asset segregated and verify it disappears from reusable inventory.
  • cutoff test: make a transfer operationally unavailable and require the solver to use another route.
  • substitution threshold test: require savings to exceed explicit switching cost before recommending movement.

What would falsify confidence?

Confidence should be withdrawn if any live margin call becomes under-collateralised after independent haircut recomputation; if inventory is reused contrary to legal status; if rule files cannot be traced to current official schedules; if a supposedly optimal solution is dominated by a simple feasible allocation; or if operational settlement data show that recommended moves repeatedly miss required deadlines.

Alternatives

Greedy ranking is simple and explainable but can be globally suboptimal.

Linear programming is efficient for divisible assets and linear constraints.

Mixed-integer programming handles lots, fixed fees and binary route choices.

Network-flow models are useful when collateral moves through a structured graph of accounts and destinations.

Robust optimisation can protect against uncertain prices, haircuts or future calls by optimising under multiple scenarios rather than one point estimate.

Heuristic/metaheuristic methods can be practical for very large nonlinear rule sets but require stronger benchmarking because optimality is not guaranteed.

How this connects to the surrounding knowledge estate

Variation-margin algorithms determine the amount to be met. ISDA SIMM can determine initial-margin amounts for non-cleared derivatives. Repo pricing supplies financing opportunity costs. LCR supplies liquidity-scarcity context. Collateral optimisation sits between these layers: once an obligation exists, it chooses which eligible assets should satisfy it.

Verification and update triggers

Preserve haircut and eligibility file versions, source timestamps, market prices, inventory ownership, custody locations, margin obligations, concentration rules, FX haircut logic, legal segregation state, opportunity-cost model and solver version. Revalidate after CCP or CSA rule changes, haircut revisions, large market moves, funding/repo regime shifts, liquidity stress, custodian changes or any collateral shortfall or settlement-fail incident.

Primary and high-quality references

Educational boundary: This article explains collateral-allocation mathematics and control logic. It does not prescribe collateral, funding, margin or liquidity decisions for any institution.