Skip to content
All library documents

Using Historical Exchange Margins to Model Futures Funds

Article Quant Q&A · Author: jersey bean

Summary

The document asks how a futures backtester should represent the funds required when opening long or short positions. It considers using margin requirements calculated through CME's SPAN system and asks where historical margin data can be obtained, noting that a general futures metadata source did not include those figures.

The answer points to exchanges that publish historical margin requirements and identifies CME historical margins as a source. It also gives an important limitation: exchange margins apply to clearing members and can differ from the margin a broker requires from an individual account. Consequently, exchange data can support a historical estimate of clearing-level requirements, but does not by itself reproduce a specific broker's collateral policy. The short exchange addresses data sourcing and scope; it does not explain SPAN calculations, intraday updates, portfolio offsets, or how a backtester should translate margin into cash availability and liquidation rules.

Key ideas

  • Historical exchange margin requirements may be available directly from exchanges.
  • CME historical margins are identified as a source for futures backtesting data.
  • Exchange margin levels apply to clearing members and may differ from customer broker requirements.
  • A backtest using exchange figures may not match the funds actually required by a particular broker.
  • The document does not specify a complete SPAN implementation or account cash-management method.

Tags

Full text
# Calculating required funds on Futures trades


# Calculating required funds on Futures trades












I'm coding in python a backtester for trading the Futures markets (equity futures, precious metals, bond futures, etc..). When I open a position long or short, I need to deduct an appropriate amount from the portfolio. I believe this amount should be the margin requirement as calculated by CME's SPAN algorithm.

So in simulated trading, what is best practice to calculate or derive the amount to deduct from the account? (i.e. margin requirement)

Are there any data sources to import this information? (i.e. python modules, SPAN calculators, metadata files, etc..) Quandl provides a metadata file for Futures instruments, but its missing margin requirements.

## Answer by lostlostlostlostlost (score 1)

https://quant.stackexchange.com/a/27643

Some exchanges do provide their historic margin requirements.

For CME: http://www.cmegroup.com/clearing/risk-management/historical-margins.html

Caveat for above link is that this is the margin imposed by the exchange on their members. May or may not be the margin your broker imposes on your account.

Hope this helps.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.