The Margin Engine
When a position binds, each side posts initial margin. The margin engine then manages the firm's whole book — settling profit and loss continuously, drawing on gains across positions before the margin account, and calling for collateral only when the portfolio falls short.
What does each side post to open a position?
Initial margin (IM) is what lets both sides trade without extending each other credit. Each side locks it up front, and it stays locked for the life of the position. Running profit and loss never touches it: variation margin settles that from the margin account, while the IM holds in reserve. The IM is reached only at a close-out: if a firm can no longer cover its losses, the risk engine closes the position and pays the other side from the IM that firm posted. A default never reaches the other side.
The amount is a percentage of notional, set per side and sized to the pair: a more volatile or gap-prone currency carries a higher rate, and the entry price does not change it. The IM locks out of the firm's margin account, per position. It never pays variation margin, is never lent or reused, and returns when the position ends.
What happens as the market moves?
Variation margin (VM) is the running settlement of profit and loss, and it follows no schedule. Either side can mark a position against the live oracle price at any time, and the profit and loss at that mark settles immediately. Gains land in the firm's margin account, available at once.
The margin engine pays an obligation from the firm's portfolio first: gains on its other positions cover it before anything else moves. What gains do not cover, the margin account pays. The engine routes collateral already in the system.
unknown diagram: pitch-engines-margin-cycle
What if collateral runs short?
An obligation the portfolio and the margin account cannot cover opens a cure window: 48 hours to fund the margin account. Marking never pauses inside it — gains on the firm's other positions keep counting toward it for the whole window.
The cure window can also end early. The maintenance margin is a hard floor on account value, a fixed fraction of initial margin signed into the agreement at opening. A position that falls through it goes to the risk engine at once, even with time left on the clock. What the risk engine does from there is covered in The Risk Engine (~3 min): closing the position at the oracle mark and settling it from the collateral behind it.
Next: Settlement & Payout (~2 min). How a position ends at maturity: one fixing, one payout, and the margin returned.