IB Options Margin requirements

Posted By: vinsom

IB Options Margin requirements - 11/16/17 20:00

Hi,
I was tring to understand options margin requirements for IB.
Calculating this requirements is not very straightforward. See links below

I tested some options strategies with Zorro and I think this requirements are not followed as I haven't received any margin call errors. Looks like the margin taken into account is just the option price.

Does anyone know a way to make a good approximation while backtesting zorro strategies ?

Has Zorro plan to implement a better margin calculation for options ?

Any help appreciated.

Good trading to everyone
Vincenzo

http://www.cboe.com/LearnCenter/pdf/margin2-00.pdf

https://www.interactivebrokers.com/en/index.php?f=24176
https://www.interactivebrokers.com/en/so...equirements.htm
https://www.interactivebrokers.com.au/en/index.php?f=marginnew&p=opt
https://www.interactivebrokers.com/en/so...checkmargin.htm
Posted By: jcl

Re: IB Options Margin requirements - 11/18/17 08:56

Zorro cannot plan to implement a better margin calculation, but you should plan this, or your backtest can be off by a large factor when you trade option combos.

Get the margin formula of your combo from your broker and put it in the script. For example, if the margin for a vertical spread is the strike difference, set

MarginCost = 0.5 * abs(Strike1-Strike2);

before entering the two trades. This is important for a realistic backtest since margin directly affects the annual return.
Posted By: vinsom

Re: IB Options Margin requirements - 11/18/17 18:44

Ok, thanks Jcl.
So the IB formula for writing a put or call is below, and my translation to Zorro script at the bottom.
Not sure if is correct to multiply for the multiplier.

Please help if anyone see any issue.
Thanks

https://www.interactivebrokers.com.au/en/index.php?f=marginnew&p=opt

//Call Price + Maximum ((20% ^ 2 * Underlying Price - Out of the Money Amount), (10% * Underlying Price))

MarginCost= contractPrice(Call)* Multiplier + max( pow(0.20,2) * (Close[0]* Multiplier) - contractIntrinsic(put,Close[0]) , 0.10* (Close[0]* Multiplier));
Posted By: Spirit

Re: IB Options Margin requirements - 11/19/17 16:32

Not sure if the Multiplier is right, but the IB formula looks already wrong, because 20%^2 = 4% and this does not make much sense.
Posted By: vinsom

Re: IB Options Margin requirements - 11/19/17 18:35

Not sure I understand the formula either, but that is what is there for the naked put on stocks
https://www.interactivebrokers.com.au/en/index.php?f=marginnew&p=opt
Posted By: vinsom

Re: IB Options Margin requirements - 11/20/17 07:57

laughing at myself...that's not 20% to the power of 2, is just 20% with a note at the bottom laugh
See the link above, in a formula really looks like to the power of 2, just didn't make sense
Posted By: jcl

Re: IB Options Margin requirements - 11/20/17 10:11

The Multiplier is not used for setting up MarginCost. Option costs and prices are always per 1 unit of the underlying. So the real margin of a contract is Multiplier*MarginCost.
Posted By: vinsom

Re: IB Options Margin requirements - 11/20/17 10:51

Hi Jcl,
I checked this document, that is a bit more clear than IB, and they multiply for the multiplier. Also if I don't put the multiplier margin comes out too low compared to the margin requirement that I see in TWS if I put the same trade manually

http://www.cboe.com/LearnCenter/pdf/margin2-00.pdf
© 2024 lite-C Forums