What is This?
This spread sheet is my own attempt to show how the collateral flow to or from a clearing house works. I created it about five years ago when I was working at a bank, and needed to explain the relationships between different quantities, and how they are calculated.
If you have a rough idea of how futures work, and want to see a detailed example, this post might help. If you don’t know what futures are, this won’t help, but Wikipedia’s intro might.
How to Read It
The graph matches the spot price of the underlying asset that the futures contract is for. The data comes from row 20. That spot prices varies each day, following a random draw from a normal distribution with parameters in B8 and B9 (“trend” and “volatility”). Recalculating the spread sheet’s data (F9 in Windows) will generate a new set of spot prices.
The initial margin is calculated with this expression:
I believe this was correct for ICE futures exchanges five years ago, but it could have been some other exchanges, or just plain wrong.
The total value of the contract is always zero (one side’s gain is the other side’s loss), but at the start of the contract, both the buyer and the seller value the contract at zero. As the value of the underlying shifts, the value of the contract shifts. If the price of the underlying goes up, the buyer’s position improves and the sellers position worsens, and vice-versa.
At the start of the contract, buyer and seller both fund their margin accounts with their initial margin(B39-B40) . As the price of the underlying changes, the value of their margin account changes with their gains or losses on the contract (rows 30-31, 33-34). If one side loses enough on the contract, then the balance of their margin account may fall below their maintenance margin (G6-G7). In that case, they must provide additional collateral until their margin account balance reaches their initial margin again. That additional collateral is variation margin (rows 36-37). If the value of the contract swings far enough over its life, then both sides of if may need to pay variation margin at different points.
At the end of the contract, both sides are refunded their margin account balances. Their total profit or loss on the contract is what they were refunded, minus what they paid in initially, minus any variation margin payments they had to make (B48-49).
A view things that this doesn’t do:
- The volatility doesn’t change with the spot price: it’s fixed over the length of the contract.
- Price alignment interest is not calculated.
- The position values are calculated to more decimal places than the spot price, which I assume doesn’t happen on real exchanges.
It’s a long time since I first drafted this, so there could be new mistakes or old mistakes in it. If you find a mistake, please leave a comment and I’ll create an improved version.