CAPITAL ARCHITECTURE / 001
MarginMesh home/Thesis/How it works
HOW IT WORKS / 3 MIN READ

Two venues. One view of risk.

A long position gains when a price rises. A short position gains when it falls. Looking at them together can reveal an offset—but recognizing that offset requires assumptions about how well the hedge works.

Try the numbers ↓
01

Count each venue separately.

The demo sets aside 20% of each position’s size as collateral. A $1,000,000 long and an $800,000 short therefore require $360,000 when treated independently.

02

Choose how much offset to trust.

Only the matched $800,000 can offset. At 50% recognition, the model credits half the potential reduction. At 0%, there is no benefit; at 100%, only the unmatched exposure drives this toy requirement.

03

Allocate separate collateral lots.

The resulting requirement is split between venues in proportion to their position sizes. Lot A and lot B are separate amounts; their sum equals the requirement. The diagram never counts one lot twice.

THE SIMPLE MATH

Required = 20% × (long + short − 2 × matched amount × hedge recognition)

A worked example

For a $1,000,000 long, $800,000 short and 50% recognition: $360,000 standalone − $160,000 offset = $200,000 collateral. That releases $160,000 in this hypothetical rule.

YOUR TURN / INTERACTIVE EXAMPLE

See what a hedge changes

Move a slider or choose a scenario. The numbers update immediately.

Recognize less of the hedge to keep more collateral in the model.

What this example assumes

The two positions are assumed to track the same asset in opposite directions. Stress is fixed at 20%; recognition is a manual assumption. This is not a CVaR optimizer and does not model basis risk, liquidation timing, venue failure or legally enforceable cross-venue netting. A zero result under a perfect hedge is a simplification, not a usable margin policy.

The research formula, for the curious
THE MATHEMATICAL FOUNDATION

Less idle collateral. A defined risk budget.

min꜀ Σⱼ Cⱼ

CVaRα(Lportfolio(C)) ≤ κ · pledge(asset, venue) ≤ 1

Cⱼ
Collateral allocated to venue j
Lportfolio
Joint liquidation loss
κ
Permitted residual tail loss
pledge
Exclusive asset-to-venue assignment

The interactive example isolates the core idea. Its assumptions are described above; it does not implement every part of the research model.

Further reading: CVXPY: optimization with constraints ↗