Hi, At IB's web site the following formula for naked call margin calc is given: Stock Options Call Price + Maximum ((20% * Underlying Price - Out of the Money Amount), (10% * Underlying Price)) Is the 20% to calculate from the UnderlyingPrice or from (UnderlyingPrice - OTMAmount) ? And: is my following calculation of OTM correct: OTM = 0; if (Call && (Strike > UnderlyingPrice)) OTM = Strike - UnderlyingPrice; if (Put && (Strike < UnderlyingPrice)) OTM = UnderlyingPrice - Strike; Thx
Math order of operations: () * / + - 20% * Underlying Price is calculated first then - Out of the Money Amount
Yes, that I too would think so, but I just wanted hear a second source to be sure what they really could have meant. Thx.
Here's my Q&D implementation in C++, in case someone can need it: Code: double calc_margin(const double S, const double K, const bool fC, const double P, double& ARet_ITM, double& ARet_OTM) { /* IB MarginReq for naked short call and put (--> https://gdcdyn.interactivebrokers.com/en/index.php?f=marginnew&p=opt ) CallPrice + Max(20% * UnderlyingPrice - OTMAmount, 10% * UnderlyingPrice) PutPrice + Max(20% * UnderlyingPrice - OTMAmount, 10% * StrikePrice) */ double ITM = 0; if ( fC && (K < S)) ITM = S - K; if (!fC && (K > S)) ITM = K - S; double OTM = 0; if ( fC && (K > S)) OTM = K - S; if (!fC && (K < S)) OTM = S - K; double db10 = (fC ? S : K) * 0.1; #if 1 // OptionGuru confirmed that this is the correct interpretation: double db20 = S * 0.2; double dbM = P + max(db20 - OTM, db10); #else // this is incorrect interpretation: double db20 = (S - OTM) * 0.2; double dbM = P + max(db20, db10); #endif // printf("db10=%.2f db20=%.2f dbM=%.2f\n", db10, db20, dbM); ARet_ITM = ITM; ARet_OTM = OTM; return dbM; }
I don't get it! In the fineprint they write this: "Minimum charge of USD 2.50 per share of underlying. This minimum does not apply for End of Day Reg T calculation purposes." So, then when does it apply? Is it meant for intraday? But then how are they going to know that in advance?... This all doesn't make any sense... With this obscure rule the margin requirement rises even beyond 100% and then there remains nothing of any profit, maybe 0.5% instead of say 5% without that...
Finally found an example on the net: https://members.capitaldiscussions.com/go/c.naked-option-margin-calculator It seems the $2.50 per share of underlying luckily doesn't apply to RegT margin accounts. What still unclear is this: At the above site they write that the proceeds of the short sale, ie. the credit received, gets subtracted from the margin requirement. But the IB page does not mention this, rather it is diametral different. I just wonder why IB doesn't have some damn examples like other brokers do...
I'm still trying to find out how IB calculates the margin requirements. I have the feeling that IB indeed applies the said sentence written in their small fineprints: "Minimum charge of USD 2.50 per share of underlying. This minimum does not apply for End of Day Reg T calculation purposes." Though it is unclear what this really means: what does "charge" in this context mean? And does it apply to RegT accounts or not? Or did they maybe made an error in their margin calculator in the TWS platform by applying the above sentence wrongly also to RegT accounts? My strategy and edge depends highly on low margin requirements, so that issue is of paramount importance. I need low margin requirements and of course transparency in the margin calculation: I need the exact formula so that also my program makes the same calculation like the broker, of course before opening the trade, because otherwise one can't calculate the exact R:R in advance, but this is a required important criteria for any decision making process, and especially when algo-trading. Any help welcome to clarify this broker issue. Thx. BTW, does the IB API have a function for calculating the margin requirements in advance? Anybody know that?
I assume your example is just for 1 contract. What if there are 100 contracts of same kind and if each contract is worth only $10 ? Is the minimum margin then 100*250=25000 ? Ie. 25k margin for a net credit of just $1k ? Is that fair?