SmartQuant Discussion
http://www.smartquant.com/forums/

Check Margin Requirements of IP before Trade Execution
http://www.smartquant.com/forums/viewtopic.php?f=43&t=6858
Page 1 of 1

Author:  brankov [ Fri Jul 04, 2008 2:30 pm ]
Post subject:  Check Margin Requirements of IP before Trade Execution

Hi

I am paper trading a portfolio of futures with IB. But before I want to execute a trade, I would like to know the margin requirement (in order to keep my my total margin-to-equity ratio below a certain security level).

How can I get in OQ the margin requirement for a specific futures contract from IB before I make the trade?

Thanks for your help!

Boris

Author:  Wacka [ Mon Jul 07, 2008 6:39 am ]
Post subject: 

There is a Margin property for both Instrument and Position. The Instrument.Margin is, according to the API documentation, the instrument initial margin. I would think that you'd need to be relying on IB for the Instrument data in order for that value to be set properly, though. I don't know how to manually request it from IB.

Author:  Alexei Kurov [ Mon Jul 07, 2008 12:17 pm ]
Post subject: 

Hi Boris,

I think you can obtain some information from IB in BrokerInfo window(View->BrokerInfo) - thats all that IB sends from TWS to OQ.

Regards,
Alex

Author:  brankov [ Mon Jul 07, 2008 1:23 pm ]
Post subject: 

Thanks for your answers.

I already checked BrokerInfo, but there I can only see the total margin of my account, and this information is based on current positions I am invested in.

Conclusion is: Within the OQ framework, I cannot check the margin of a specific instrument before I make the trade. Is that right?

Of course I can check the margin of the account after I have done the trade, but this is unsatisfactory. In IBs TWS I can check the margin before I make the trade. Unfortunately it seems this is not possible within OQ. I am wondering how people are trading futures with OQ without this possibility?

Regards,
Boris

Author:  sals3r0 [ Wed Nov 30, 2011 7:31 pm ]
Post subject:  Re:

Wacka wrote:
There is a Margin property for both Instrument and Position. The Instrument.Margin is, according to the API documentation, the instrument initial margin. I would think that you'd need to be relying on IB for the Instrument data in order for that value to be set properly, though. I don't know how to manually request it from IB.


I still don't get what the Margin property significants - I know it is an initial margin, but - is it in dollars, in percents, is it a multiplier? Lets imagine I have a stock instrument, like AAPL, price $400 per share. Let's assume the initial margin is 50% for this stock (standard across most brokers).
So if I buy 100 shares 400 each, margin used should be 20k. What I setup in instrument margin? 0.5 nor 50 seems to do the job?

Page 1 of 1 All times are UTC + 3 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/