¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Margin for generic orders basket, multiple legs


 

Hi,
I know how to get the margin impact for a single product order using whatif, but I need to compute the margin impact of an orders basket.
This is important for different trades such as multilegs future spreads, currencies, or any other basket.
How can it be achieved?
Note that summing the margin of single positions does not give the correct result, since for example a long gbpusd and long usdjpy position will partially reduce the net usd position, so the margin will be lower that the sum of the individual gbpusd and usdjpy positions.
The same applies to future spreads, which can have reduced margins, but IB only supports combos spreads with 2 legs, so for more than 2 legs the whatif does not work.
This is a general problem, so I hope a solution is possible without having to code all the margin calculation, or having to place everytime different simulated orders on the paper account, checking the initial and final margin, and then closing them before making another margin estimation.

Thanks

Join [email protected] to automatically receive all group messages.