Australian (ASX) Stock Market Forum

Interactive Brokers and Options trading in Australia

Re: Interactive Brokers and Options trading in OZ

Hi toothyfish,

I suspect the margin requirements on that position is max loss.

When i put on my first spread with IB, that's what it came up as. Definitely less than OCH requirements by 2.

Don't ask me how to work out multiple positions/complex spreads thou, I leave that to the software.
 
Re: Interactive Brokers and Options trading in OZ

I am new to IB as well, dont know if your outlook on Rio is long or short however if you sell a Bull Put Spread you will be short??? Will the IB margin reduce if work if you buy the spread instead of selling it?
 
Re: Interactive Brokers and Options trading in OZ

Hi Menage,
I was looking at a short position. If you buy the spread you would be in debit and probably not require a margin.

Thanks Cutz,
It's good to know that IB are sensible about their margins unlike some firms which require 2 x ACH even when it exceeds the maximum loss. Guess they are preparing for you to get pinned.

If the paper trading facility is anything like the real trading, it still won't let me process the order without very excessive margins though. Might have to contact them.
 
Re: Interactive Brokers and Options trading in OZ

Still waiting for reply from IB. But whilst tinkering, I noticed when I place a combo spread that the margins are rediculously high. If I leg it in then the margin is much more reasonable. :confused:
 
Re: Interactive Brokers and Options trading in OZ

IB requires a $100,000US minimum portfolio to have an account that allows for lower margins. It's called a Margin portfolio account.
Is this your experience Cutz?
 
Re: Interactive Brokers and Options trading in OZ

IB requires a $100,000US minimum portfolio to have an account that allows for lower margins. It's called a Margin portfolio account.
Is this your experience Cutz?

G'Day Toothyfish,

I set up a Reg T margin account, it's satisfactory for my requirements.
 
Re: Interactive Brokers and Options trading in OZ

Hi Guys,

Any ASX traders out there been assigned on a short equity call, i wouldn't mind the option being converted to a short stock like what happens in the US, but due to the lack availability of short stock here in oz i suspect i may have to buy the stock on the open the next day for delivery.

Any thoughts ?
 
Re: Interactive Brokers and Options trading in OZ

From post #45
... it looks like TWS only gives the first line of market depth.
Hi Sails,

I have found a non trivial way of getting market depth info from TWS. You may have heard of the TWS API. IB provides this API so that end users can customise or extend their TWS capabilities. I experimented with the Java version of the TWS API and managed to get the MD for options.

There are quite a few steps involved eg. setting up the Java Development Environment, enabling the API in your TWS etc. It can be quite tedious. If you are interested, please feel free to ask me for details.

I've attached a sample MD of CBA Oct 50 call options.


Fox.
 

Attachments

  • MD.jpg
    MD.jpg
    33.6 KB · Views: 434
Re: Interactive Brokers and Options trading in OZ

From post #45

Hi Sails,

I have found a non trivial way of getting market depth info from TWS. You may have heard of the TWS API. IB provides this API so that end users can customise or extend their TWS capabilities. I experimented with the Java version of the TWS API and managed to get the MD for options.

There are quite a few steps involved eg. setting up the Java Development Environment, enabling the API in your TWS etc. It can be quite tedious. If you are interested, please feel free to ask me for details.

I've attached a sample MD of CBA Oct 50 call options.


Fox.


Well done, Fox! Certainly an improvement to the one line. :)

I have API enabled in TWS, but not familiar with the JDE so might need some help there. Once it's set up, does the MD update dynamically - or do you need to keep refreshing?

Also, is it only level 1 depth?

One thing I really like with Iress is the "detail" button found in the options MD window which gives the entire MD (not just 5 lines) and also shows level 2 - showing the break up of orders at each level. It doesn't update dynamically anymore. It used to be readily available and updated dynamically when I first started trading options, but then the ASX in all their "wisdom" (need a sarcastic smiley here!) decided to cut it out and permitted no more than 5 levels of dynamic level 1 MD for options. The excuse was something along the lines that no-one else has it. Now, if they could take the same attitude with fees and slippage, I might have thought it was fair... :rolleyes::D
 
Re: Interactive Brokers and Options trading in OZ

I have API enabled in TWS, but not familiar with the JDE so might need some help there.
I'm assuming that you are running the windows operating system.
The basic steps required are:
1. Download and install JDK 6 Update 16 from http://java.sun.com/javase/downloads/index.jsp
2. Download the TWS API from http://www.interactivebrokers.com/en/p.php?f=programInterface&ib_entity=llc . Go to the Proprietary API tab and download the API. I'm using the latest windows version.
3. Step 1 should have installed the java compiler javac somewhere in C:\ProgramFiles\Java\jdk .... But you'll need to get javac to run from a DOS command line. To do this, you'll need to set the PATH environment variable to point to the location of where javac.exe resides. I'll send you another post as to how to do this if you are stuck.
4. With javac is correctly setup, look for a batch file named run.bat in the Java sub-directory of where the TWS API was installed. Type run from the command line. This should compile and invoke the sample java application that gives you the MD. I'll send more details if you need more assistance.
5. If you get this far, click on the Connect button to connect the sample java application to TWS. Then click on the Market Depth button, fill in the option details and like magic, MD will be streaming to your screen.

Once it's set up, does the MD update dynamically - or do you need to keep refreshing?
Dynamic MD updates.

Also, is it only level 1 depth?
I think level 1 only. The TWS API provides functions to request for level 2 as well, but it did not seem to be invoked by the sample application. To be honest, I don't know what level 2 depth looks like. So, I'm not really sure if it is provided or not.
 
Re: Interactive Brokers and Options trading in OZ

Impressive stuff Fox.

I'll have a at this sometime... expect pathetic pleas for help. :eek:
 
Re: Interactive Brokers and Options trading in OZ

Wayne, Sails,

Fire away with any questions you may have. More than happy to help. This is the least I can do, after all the generosity you have shown me and others in this forum.

1. Download and install JDK 6 Update 16 from http://java.sun.com/javase/downloads/index.jsp
My Java Development Kit, JDK was installed in C:\Program Files\Java\jdk1.6.0_10

2. Download the TWS API from http://www.interactivebrokers.com/en...&ib_entity=llc . Go to the Proprietary API tab and download the API. I'm using the latest windows version.
http://www.interactivebrokers.com/download/JavaAPIGettingStarted.pdf is helpful if you need a guide.
My TWS was installed in C:\IB_API_9_62\Java

3. Step 1 should have installed the java compiler javac somewhere in C:\ProgramFiles\Java\jdk .... But you'll need to get javac to run from a DOS command line. To do this, you'll need to set the PATH environment variable to point to the location of where javac.exe resides. I'll send you another post as to how to do this if you are stuck.
This web page will help you with setting the PATH variable: http://www.computerhope.com/issues/ch000549.htm
Add the line ;C:\Program Files\Java\jdk1.6.0_10\bin to your PATH. Do not forget the semi colon at the start of the line.

Eg.
C:\Program Files;C:\Winnt;C:\Winnt\System32;C:\Program Files\Java\jdk1.6.0_10\bin

4. With javac correctly setup, look for a batch file named run.bat in the Java sub-directory of where the TWS API was installed. Type run from the command line. This should compile and invoke the sample java application that gives you the MD. I'll send more details if you need more assistance.
When you invoke javac from the DOS command line, you should see:

Code:
C:\Documents and Settings\LS>javac
Usage: javac <options> <source files>
where possible options include:
  -g                         Generate all debugging info
  -g:none                    Generate no debugging info
  -g:{lines,vars,source}     Generate only some debugging info
  -nowarn                    Generate no warnings

I'll put the screen shots for a sample CBA option MD request parameters in the next post.
 
Re: Interactive Brokers and Options trading in OZ

Example of request parameters for CBA Oct Call $50 options.
 

Attachments

  • MD.JPG
    MD.JPG
    82.6 KB · Views: 99
Re: Interactive Brokers and Options trading in OZ

Thanks Fox - it is impressive! I have had a few other things on the go this afternoon & evening - so will print out your instructions tomorrow and follow them through carefully. More than likely will be a few more questions... :D

Is this the correct java version (build 1.6.0_15-b03)? If so, that's already installed and running.

You mentioned you haven't seen 2nd level of MD - if you have Iress, open up a MD window for something liquid - eg BHP or XJO, front Month, at-the-money call or put. Click on the "detail" button and a new window pops up - that's level 2. That said, I haven't been trading the Oz market for a few weeks and I'm not paying for Iress at the moment. So I am assuming they haven't removed the "detail" function while my back has been turned! If you don't have it, maybe Cutz or someone else with Iress can post a screen shot of it.
 
Re: Interactive Brokers and Options trading in OZ

Is this the correct java version (build 1.6.0_15-b03)? If so, that's already installed and running.
If I'm not mistaken, the java you are referring to is probably the Java Runtime Environment (JRE). What you need to build and run the sample application is the Java Development Kit (JDK). By installing the JDK, you will get the file C:\Program Files\Java\jdk1.6.0_10\bin\javac.exe. This is the java compiler, which is the tool you need, to build the sample java application that gives us the MD. Hope I'm making sense.
 
Re: Interactive Brokers and Options trading in OZ

Wayne/Sails,

If setting up the JDK is too much hassle, you can use the C++ API instead of the Java API. The sample application for the C++ API is already pre-built and you therefore do not need to set up any development kits. Here's how to go about it.
1. Access http://www.interactivebrokers.com/download/GettingStartedC++API.pdf
2. Pages 23-26 provide detailed instructions to set up the test application and configure your TWS.
3. If you succeed with step 3 of page 26, you should have the C++ API sample application running.
4. Chapter 6 shows you how to connect the sample application to the TWS.
5. Chapter 8 shows you how to obtain MD.

Good luck. If you have any problems with the GettingStartedC++API.pdf guide, just refer the page and I'll see if I can help. I have not verified the MD for the C++ API sample application because the Oz market is not open yet as I write this post, but I strongly suspect that it will work too.
 
Re: Interactive Brokers and Options trading in OZ

If I'm not mistaken, the java you are referring to is probably the Java Runtime Environment (JRE). What you need to build and run the sample application is the Java Development Kit (JDK). By installing the JDK, you will get the file C:\Program Files\Java\jdk1.6.0_10\bin\javac.exe. This is the java compiler, which is the tool you need, to build the sample java application that gives us the MD. Hope I'm making sense.

Thanks for sorting that one out, Fox! I will try your original instructions first and see how I go. Have to go out for a little while soon, and then hopefully (fingers crossed) I can have some time - I would really like to try this out...:)
 
Re: Interactive Brokers and Options trading in OZ

C++ and Excel TWS API Screen Shot
 

Attachments

  • cpp.JPG
    cpp.JPG
    82.1 KB · Views: 101
  • excel.JPG
    excel.JPG
    182.5 KB · Views: 99
Re: Interactive Brokers and Options trading in OZ

Haha - was all set to have a go at this but forgot that IB shuts down over the weekend.:rolleyes:

I already use TWSDDE in excel for downloading historical data from IB, so hopefully it won't be any more difficult than that for my fairly basic excel skills.

Thanks again for your detailed posts, Fox. Your effort much appreciated...:)
 
Top