RealTest User Guide
RealTest User Guide

 

 

Navigation: Realtest Script Language > Syntax Element Details >

FuturesMargin

 

 

 

 

Category

Strategy Elements

Description

Futures margin requirement per contract

Input

Formula specifying dollars per contract of required margin

Notes

RealTest uses futures margin requirement data if available when a strategy trades futures and specifies either CashIntPct or MinFreeCash.

Futures positions never "use margin" in the sense of having to borrow funds from the broker. Rather, futures margin is the cash collateral required to hold a position.

Brokers typically do not pay interest on the cash used as collateral for futures positions and do not allow a position to be opened if there is insufficient cash to cover the margin requirement.

Historical futures data typically does not include historical margin requirements. Norgate provides current margin requirements which RealTest imports and stores in InfoMargin. Users of other futures data sources can provide current margin requirements in their SymInfoFile if desired.

If FuturesMargin is not specified in a strategy then InfoMargin is used by default. Provide a FuturesMargin formula if you want to calculate approximate historical margin requirements e.g. based on ATR.

If a strategy does not provide FuturesMargin and a symbol does not have a value for InfoMargin then RealTest treats that symbol as non-futures for CashIntPct and MinFreeCash purposes.

The total futures margin requirement in effect on each date of a test can be accessed via the S.FuturesMargin stats array.

 

 

 

 

Copyright © 2020-2024 Systematic Solutions, LLC