How do you capture the open price accurately?

Messages
8
Likes
2
Hello all! This is my first post, and I know of T2W's vast knowledge base of the users. Thanks in advance. On to the question:

I developed a trading system that requires entering trades at the open of the trading day. I've implemented the system with an API through Trader Workstation with Interactive Brokers, and I need to know what the best method for capturing open prices is. My current method for entering a trade at the open is as follows:

1. Before the market opens, transmit a market buy order (for example) for 100 MSFT at 8:42AM Eastern Time.
2. The system tells me that my order will be held until the market opens at 9:30AM. No problem, this is what I want.
3. The market opens, but my order fills a minute or so later (trade fills at 9:31:08AM for example). The fill price is worse than the open price (typically).

I understand that market orders are filled on a first-come first-serve basis with most exchanges (I specify these orders to be SMART routed), so I'm not surprised by the lag in time. However, the execution price is usually worse than the opening price of the day. (for example MSFT opens at 27.25, but I end up getting filled at 27.34 on a long trade)

I've heard of the arrival price algo that IB has, but there are so many order types to choose from. I'm not sure what is best. It would be fantastic if I can pick my stocks before the market opens, and guarantee that my trade entries will fill at the open price for the day. Does anyone know how best to do this?
 
You have asked your broker to execute your Market Order at the most volatile time of the day at 9.30am.
You have basically given them the right to tell you that they filled your order at any price they like within that minute. Expect to get screwed over. Because they can screw you with that type of Order.

Alternatively, if you still want to be executed at the Open of trade, then accept that you will invariably get filled at the worst price within that first minute. You are a gift of around 10-20 points per trade to the broker every day you trade.
 
It shouldnt take that long to fill.

If you were to place a manual market at 9:30 does it take over 1 minute to fill?
 
It shouldnt take that long to fill.

If you were to place a manual market at 9:30 does it take over 1 minute to fill?

I tried placing a market order for 50 MSFT at exactly 9:30AM. I basically hit the transmit button right when my atomic clock struck 9:30AM. The order filled at exactly 9:30:10AM at 26.96. The reported open price for today is 26.96, so that seemed to work.

However, I want to have Trader Workstation do this for me without needing my presence. I tried the "Arrival Price" algo on 3 different stocks and got mixed results. One filled at a better price than the open, but two filled at worse prices than their respective opens.
 
However, I want to have Trader Workstation do this for me without needing my presence. I tried the "Arrival Price" algo on 3 different stocks and got mixed results. One filled at a better price than the open, but two filled at worse prices than their respective opens.

That will work better. On average, the pluses and minuses will negate each other out over the bigger number of order fills.

If you are trying to get the exact Open price on every order, you are trying to be the FIRST order to be filled EVERY time. (It won't happen! Especially in the more liquid stocks)
 
If you are trying to get the exact Open price on every order, you are trying to be the FIRST order to be filled EVERY time. (It won't happen! Especially in the more liquid stocks)

I agree traderman1. I know I am small fry in the market, and there's no chance I will be the first trade of the day. However, is there some way to have Trader Workstation observe the opening price and then 0.002 seconds later, place a limit order for that exact price?

For example, the first trade at 9:30:00AM of the day for MSFT is recorded as 26.53. I could come in 1 minute later (because I'm slow like this) and manually set a limit order for 26.53, but I would love for TWS to do this automatically. Is this what the Arrival Price algo does? I set the "beginning time" criteria to 9:30:00AM for my tested trades, but I plan on trying 9:29:59AM as well to account for latency.
 
I agree traderman1. I know I am small fry in the market, and there's no chance I will be the first trade of the day. However, is there some way to have Trader Workstation observe the opening price and then 0.002 seconds later, place a limit order for that exact price?
.
Not that I know.

For example, the first trade at 9:30:00AM of the day for MSFT is recorded as 26.53. I could come in 1 minute later (because I'm slow like this) and manually set a limit order for 26.53, but I would love for TWS to do this automatically. Is this what the Arrival Price algo does?

Why would you want to set it to the Opening Price AFTER the market has opened. Surely you would want to buy or sell at the NEW price IF it has moved in your favour.
If it has moved against you then you would not want the Open price

I set the "beginning time" criteria to 9:30:00AM for my tested trades, but I plan on trying 9:29:59AM as well to account for latency.
Tell us how that works after you have tried it. I expect that it will simply be placed in the queue of orders at the Open and filled within the first minute.
 
A limit order will never guarantee you a fill. No matter how fast you place your order the only guarantee fill is a market order and I don't recommend it on open. There is no way to get the exact opening price every time for numerous reasons. You really need to understand how the markets opens before you try to get your orders filled.

Peter
 
Why would you want to set it to the Opening Price AFTER the market has opened. Surely you would want to buy or sell at the NEW price IF it has moved in your favour.
If it has moved against you then you would not want the Open price.

Ideally, I would like to be the first trade in for the day. However, that's not possible. I'm developing a system that requires entering trades at the open price. I've been trading this system for a month now but only with Market orders submitted at the open. The slippage is deadly, and slippage is the only thing keeping my system from being profitable.

I followed my simulator trade-for-trade and dollar-for-dollar this past month trying to mirror its trading decisions and position sizes. The funny thing is my simulator came out profitable, but I lost money. I then compared the entry and exit prices for my trades vs. my simulator's trades and noticed HUGE slippage at the entry and exit prices. So, I'm trying to fix this. I can live with slippage working in my favor but not against me.

traderman1, you just brought up a great point that if the stock price goes against me straight from the open, I should not enter. For example if my system wants to short MSFT at the open, and MSFT opens at 26.96 and then immediately trades up to 27.04, I would be glad to short at 27.04 because it's a better entry price than what my simulator would obtain (it would obtain the open price of 26.96). The order type that would operate like this is the "Trailing Limit if Touched", which is offered in Trader Workstation:

http://institutions.interactivebrokers.com/en/trading/orders/trailingLimitTouched.php

I will try all these order types and report the results on Monday some time after the US stock market open:
1. MKT with time in force set to "OPG" ("opening" in Trader Workstation-speak) and a condition of time >= 9:30:00AM. Will try 3 different positions.
2. MKT with "Arrival Price" algorithm with time between 9:29:59AM and 9:40:00AM and urgency set to "Get Done". This is supposed to guarantee me the market price at the time I placed the order. Details: http://institutions.interactivebrokers.com/en/trading/orders/arrivalprice.php?ib_entity=inst I will try this on 3 different positions.
3. Trailing LIT with trail amount set to 0.1% of stock price. will try 3 different positions.
 
You don't know what you are doing if don't understand why your simulator is profitable but you are not. Time is not the issue.

NOWHERE on Interactive Brokers page does it say you are guaranteed any fill or price no matter what settings you use. The GET DONE is an urgency feature, NOT a guarantee feature.

Also, if I am reading it right, you could get filled much much later at the opening price if/when the market crossed that price later in the day?

The speed of your orders is limited heavily by the platform you are using. This is not a shot at IB, but you are using a platform or API that submits orders to the IB servers first, then IB routes the order. This is how most retail platforms work. You would need a direct access platform for speed.

You obviously are putting in the time and effort needed to be a profitable trader, so kudos for that. Let us know how you make out for 1 week. My guess is you will not get the price you are looking for right at the open on any consistent basis no matter how hard you try.

Peter
 
I tried placing a market order for 50 MSFT at exactly 9:30AM. I basically hit the transmit button right when my atomic clock struck 9:30AM. The order filled at exactly 9:30:10AM at 26.96. The reported open price for today is 26.96, so that seemed to work.

However, I want to have Trader Workstation do this for me without needing my presence. I tried the "Arrival Price" algo on 3 different stocks and got mixed results. One filled at a better price than the open, but two filled at worse prices than their respective opens.

Try this.

Create a market order, set trigger outside regular market hours flag to true, set the 'Good after time' via your API to "9:30:00 EST".

works for futures.
 
Ideally, I would like to be the first trade in for the day. However, that's not possible. I'm developing a system that requires entering trades at the open price. I've been trading this system for a month now but only with Market orders submitted at the open. The slippage is deadly, and slippage is the only thing keeping my system from being profitable.

The only way you will achieve the Open price every time is to be the very first Order filled on each and every day. And that will never happen.
The slippage is caused by your trades taking place at the Open which is the most volatile time. Also, because you are trading through a broker, they would be giving you the worst fill for the period and pocketing the difference. As I said earlier, you are a gift of around 10-20 points per trade to the broker every day you trade.

I followed my simulator trade-for-trade and dollar-for-dollar this past month trying to mirror its trading decisions and position sizes. The funny thing is my simulator came out profitable, but I lost money. I then compared the entry and exit prices for my trades vs. my simulator's trades and noticed HUGE slippage at the entry and exit prices. So, I'm trying to fix this. I can live with slippage working in my favor but not against me.
.

This would indicate to me that the system is not very robust and that the profitability is marginal. It may indicate that the the system's profitability is a short term aberration. How long have you back tested this system?

traderman1, you just brought up a great point that if the stock price goes against me straight from the open, I should not enter. For example if my system wants to short MSFT at the open, and MSFT opens at 26.96 and then immediately trades up to 27.04, I would be glad to short at 27.04 because it's a better entry price than what my simulator would obtain (it would obtain the open price of 26.96). The order type that would operate like this is the "Trailing Limit if Touched", which is offered in Trader Workstation:

http://institutions.interactivebrokers.com/en/trading/orders/trailingLimitTouched.php

I will try all these order types and report the results on Monday some time after the US stock market open:
1. MKT with time in force set to "OPG" ("opening" in Trader Workstation-speak) and a condition of time >= 9:30:00AM. Will try 3 different positions.
2. MKT with "Arrival Price" algorithm with time between 9:29:59AM and 9:40:00AM and urgency set to "Get Done". This is supposed to guarantee me the market price at the time I placed the order. Details: http://institutions.interactivebrokers.com/en/trading/orders/arrivalprice.php?ib_entity=inst I will try this on 3 different positions.
3. Trailing LIT with trail amount set to 0.1% of stock price. will try 3 different positions.

Come back to us next week and give us the results. Though at this stage, I think that you are walking into a dead end alley. The real underlying profitability of the system is rather suspect to me.
But good luck with it anyway, and I am interested with the results of your Trader Workstation tests
 
This would indicate to me that the system is not very robust and that the profitability is marginal. It may indicate that the the system's profitability is a short term aberration. How long have you back tested this system?



Come back to us next week and give us the results. Though at this stage, I think that you are walking into a dead end alley. The real underlying profitability of the system is rather suspect to me.
But good luck with it anyway, and I am interested with the results of your Trader Workstation tests

I backtested my system across all kinds of time frames dating back to 1990. I've backtested across 1 year, 2 years, 5 years, and 10 years all with different start and end dates. My system simulates very profitably over each time frame. After noticing the slippage I get on my actual trades, I went back to the simulator and coded in a fixed slippage. So each simulated trade experiences a fixed slippage per roundtrip trade (entry and exit). My system still remains comfortably profitable with up to 0.5% slippage per position. What I mean by this is the net slippage of an entry and exit of a single position can be no greater than 0.5%.

Before I joined T2W (back when I was using simple market orders to enter and exit trades), I was getting slippage of 0.5% or greater, and that was just on the entry! The exit slippage was about the same. At the same time, my simulator was comfortably profitable with the same trades and same position size (zero slippage). So you can clearly see why my actual trading went terribly: slippage.

So, my efforts recently have been focused on getting accurate fills. Here are the results of my recent position entries: (these were performed in Trader Workstation provided by Interactive Brokers) ALL TRADES ARE SHORT SALES

MKT orders with time in force = OPG and start time of 9:30:00AM
1. AMP - Trader Workstation cancelled the trade. The error message said "At the open order could not be executed"
2. CHRW - same result
3. BRCM - same result
My guess is that orders with time in force = OPG must be executed some time before the open and not exactly at the open.

"Arrival Price" algorithm with "Get Done" urgency and start time of 9:29:59AM
1. DNB - filled at 84.26, open price is 84.40, slippage = -0.14 (-0.17%)
2. CL - filled at 77.90, open price is 78.11, slippage = -0.21 (-0.27%)
3. DVA - filled at 78.89, open price is 78.88, slippage = +0.01 (+0.01%)
Mixed results again with the "Arrival Price" algorithm. The DVA fill was very accurate, but it looks like this kind of result won't be consistent. On a previous day last week, I tried three other "Arrival Price" entries with mixed results: (slippage was +0.2%, -0.3%, and +0.2% on those positions on that day)

Trailing Market or Limit If Touched orders
1. M - (Trailing MIT order with trailing amount = 0.1%). filled at 23.65, open price is 23.74, slippage = -0.09 (-0.38%)
2. MDT - (Trailing LIT order with trailing amount = 0.1%, offset = 0.01, starting limit price = 100.00). filled at 39.77, open price = 39.61, slippage = +0.16 (+0.4%)
3. MAR - (Trailing LIT with same parameters as MDT order). did not fill. The limit price is set for the day as 40.32 (this was calculated by Trader Workstation after the trade entered). The open for the day is 40.28.
The MDT fill is positive news, but I'm taking that result with a grain of salt. The failed MAR trade indicates that my trailing amount was too high. I will try more aggressive parameters to get closer to the open price. The fact that both Trailing LIT orders attempted to get prices better than the open is promising. It seems that, at the very least, I won't get filled at a price worse than the open. I could still be wrong here, so I will continue to test trailing LIT orders in the future.
 
......at any price they like within that minute. Expect to get screwed over. Because they can screw you with that type of Order.

Alternatively, if you still want to be executed at the Open of trade, then accept that you will invariably get filled at the worst price within that first minute. You are a gift of around 10-20 points per trade to the broker every day you trade.

I was saying the same thing at another forum . You may get filled to the 5th bid or ask price and if some trader has put a out of the word bid or ask ( bid for 0.10 or an ask of 1000) your order will be still filled . I know that you should NEVER place market orders at opening and that a lot of erroneous trades are filled at opening .

Does this apply or has something changed to protect traders ????
 
@
I backtested my system across all kinds of time frames dating back to 1990. I've backtested across 1 year, 2 years, 5 years, and 10 years all with different start and end dates. My system simulates very profitably over each time frame. After noticing the slippage I get on my actual trades, I went back to the simulator and coded in a fixed slippage. So each simulated trade experiences a fixed slippage per roundtrip trade (entry and exit). My system still remains comfortably profitable with up to 0.5% slippage per position. What I mean by this is the net slippage of an entry and exit of a single position can be no greater than 0.5%.

Before I joined T2W (back when I was using simple market orders to enter and exit trades), I was getting slippage of 0.5% or greater, and that was just on the entry! The exit slippage was about the same. At the same time, my simulator was comfortably profitable with the same trades and same position size (zero slippage). So you can clearly see why my actual trading went terribly: slippage.

So, my efforts recently have been focused on getting accurate fills. Here are the results of my recent position entries: (these were performed in Trader Workstation provided by Interactive Brokers) ALL TRADES ARE SHORT SALES

MKT orders with time in force = OPG and start time of 9:30:00AM
1. AMP - Trader Workstation cancelled the trade. The error message said "At the open order could not be executed"
2. CHRW - same result
3. BRCM - same result
My guess is that orders with time in force = OPG must be executed some time before the open and not exactly at the open.

"Arrival Price" algorithm with "Get Done" urgency and start time of 9:29:59AM
1. DNB - filled at 84.26, open price is 84.40, slippage = -0.14 (-0.17%)
2. CL - filled at 77.90, open price is 78.11, slippage = -0.21 (-0.27%)
3. DVA - filled at 78.89, open price is 78.88, slippage = +0.01 (+0.01%)
Mixed results again with the "Arrival Price" algorithm. The DVA fill was very accurate, but it looks like this kind of result won't be consistent. On a previous day last week, I tried three other "Arrival Price" entries with mixed results: (slippage was +0.2%, -0.3%, and +0.2% on those positions on that day)

Trailing Market or Limit If Touched orders
1. M - (Trailing MIT order with trailing amount = 0.1%). filled at 23.65, open price is 23.74, slippage = -0.09 (-0.38%)
2. MDT - (Trailing LIT order with trailing amount = 0.1%, offset = 0.01, starting limit price = 100.00). filled at 39.77, open price = 39.61, slippage = +0.16 (+0.4%)
3. MAR - (Trailing LIT with same parameters as MDT order). did not fill. The limit price is set for the day as 40.32 (this was calculated by Trader Workstation after the trade entered). The open for the day is 40.28.
The MDT fill is positive news, but I'm taking that result with a grain of salt. The failed MAR trade indicates that my trailing amount was too high. I will try more aggressive parameters to get closer to the open price. The fact that both Trailing LIT orders attempted to get prices better than the open is promising. It seems that, at the very least, I won't get filled at a price worse than the open. I could still be wrong here, so I will continue to test trailing LIT orders in the future.

Any update after all this time? What did you end up using?
 
Top