MOC order in E futures. Backtesting vs reality...

Discussions about the testing and simulation of mechanical trading systems using historical data and other methods. Trading Blox Customers should post Trading Blox specific questions in the Customer Support forum.
Post Reply
RedRock
Roundtable Knight
Roundtable Knight
Posts: 944
Joined: Fri Jan 30, 2004 3:54 pm
Location: Arizona

MOC order in E futures. Backtesting vs reality...

Post by RedRock »

While using the MOC as an entry or exit point in backtesting is great, issues arise when taking a system live. In the pit days, when markets actually closed and humans slept at night... there was a liquidity surge and a clear closing range. The pit broker would usually, in my experience, deliver a fill which would match the actual settlement price. On the E markets, in many cases, there is no urgency for exit at one specific closing time. little or no liquidity surge in many markets, and accompanying wide B/A spreads as the market drifts into the close.

IB does not offer an MOC order for futures. And even if they or others did, what would it be. I can submit a market order seconds prior to the closing time, but with the wide spreads ive noted in many markets receiving a fill near the ultimate settlement price, is hit or miss.

I have some ideas about fancy footwork using intraday data. Perhaps extracting the actual B/A and backtesting daily bar systems with that added insight.

On long term systems, a few tics wouldn't matter so much. Of course the shorter term one goes... the more important precision becomes.

Not sure there is one best solution to backtesting with MOCs and execution reality. Would enjoy hearing others thoughts and perspectives.

Enjoy the weekend, rr
sluggo
Roundtable Knight
Roundtable Knight
Posts: 2987
Joined: Fri Jun 11, 2004 2:50 pm

Post by sluggo »

Seems like a promising candidate for algorithmic trading -- assuming you're doing enough size to smear out your order into multiple little nibbles. Something like the time weighted average price of the 180 seconds before "The RedRock Close" (an arbitrary moment chosen by you and communicated to your algo vendor).

Another possibility is DMA brokerages with "Advanced Orders" which sometimes means "nearly algorithmic trading". Just now I visited the website of THIS brokerage (no affiliation, I don't have an account there), and found that it says "MOO and MOC for both pit and electronic markets" among many other features.
LeapFrog
Roundtable Knight
Roundtable Knight
Posts: 695
Joined: Mon May 17, 2004 4:18 pm
Location: Boston, MA

Post by LeapFrog »

Ahh RedRock - I remember those old Pit days too - how we miss those good old days huh? The closes, and the opens, were such fun. I remember cocoa, for example, with their rotational openings. They would open each month for about 5 minutes each until they had put some trades through on each month. By the time they got back to your month price could have been "frozen" in the opening range for about 20 minutes, next print was a gap up/down from the open. Closings could be wild too.

I DO use the broker Sluggo linked to above. Don't use MOC orders but have used MOO orders amongst a varietry of their other advanced features - particularly their time release and time cancel feature which allows me to put orders in the night before to place orders in markets through the night that open in other parts of the world while I'm sleeping.

Regarding MOC orders, my understanding, and you would have to check with the broker directly, is that they "simulate" the order. Meaning the close time would be the time of the "close" of the e-exchange hours for your instrument. They will send a "limit" order a predetermined number of seconds before the exchange time above/below the price at that point, assuming then that you will get filled better than that limit price. E-exchanges don't accept "market" orders (that I'm aware of), or stop orders in many cases. So the brokers have to "simulate" them.

I have found that in some fast moving thin markets this means you can not be filled on a "market" order (which can be an eye opener). The work around for that is to use StopLimit orders with a wider gap between the Stop and the Limit than the default used by the broker.

You should be able to work with your broker to "simulate" MOC orders and get a working outcome that you're happy with.
Last edited by LeapFrog on Sat Apr 17, 2010 1:25 pm, edited 1 time in total.
kianti
Roundtable Knight
Roundtable Knight
Posts: 335
Joined: Fri May 02, 2003 6:10 am
Location: Florence - Italy

Post by kianti »

LeapFrog wrote:Ah Redrock - I remember those old Pit days too ..
I did too, was it called 'kerb trading' (you could close your trades after the bell) ???

best regards, as ever
RedRock
Roundtable Knight
Roundtable Knight
Posts: 944
Joined: Fri Jan 30, 2004 3:54 pm
Location: Arizona

Post by RedRock »

sluggo wrote:Seems like a promising candidate for algorithmic trading -- assuming you're doing enough size to smear out your order into multiple little nibbles. Something like the time weighted average price of the 180 seconds before "The RedRock Close" (an arbitrary moment chosen by you and communicated to your algo vendor).

Another possibility is DMA brokerages with "Advanced Orders" which sometimes means "nearly algorithmic trading". Just now I visited the website of THIS brokerage (no affiliation, I don't have an account there), and found that it says "MOO and MOC for both pit and electronic markets" among many other features.
Hello Sluggo,

Thank you for your thoughts. I do feel that I'm at the point in my work where i need to integrate intraday data into my work. Even if my overall timeframe is longer in nature... to overcome the challenges of the E world, creating synthetic closing times etc seems important.

rr
RedRock
Roundtable Knight
Roundtable Knight
Posts: 944
Joined: Fri Jan 30, 2004 3:54 pm
Location: Arizona

Post by RedRock »

LeapFrog wrote:Ahh RedRock - I remember those old Pit days too - how we miss those good old days huh? The closes, and the opens, were such fun. I remember cocoa, for example, with their rotational openings. They would open each month for about 5 minutes each until they had put some trades through on each month. By the time they got back to your month price could have been "frozen" in the opening range for about 20 minutes, next print was a gap up/down from the open. Closings could be wild too.
.
Hello LeafFrog, Thanks very much for your thoughts and perspective. I know there are a few of us here who have experienced the amazing feeling of being on an active trading floor, or even trading in the pits... I remember being a clerk back in the 80s when the bean complex was waking up from a nap. The talk of "beans in the teens" and the monstrous roar as the market came into the closing five min. You could feel the rumble and see and smell the presence of one incredible living organism at its most vibrant peak. For better and worse, its sad that part of human history is lost at least for now.

I can drop in an order via IB to approximate whatever OEC might be doing with their MOC. What I like about IB is their roots and heritage coming out of TimberHill group. I find no practical limitation with the platform and am a happy camper. I know OEC is an advanced platform as well vs most other broker offerings...

My issue is having my actual executions match up with what csi lists as their bar close. I think ill need to move intraday to find an adequate solution for my current needs.. Oh well, dragged into the new century (again).

rr
RedRock
Roundtable Knight
Roundtable Knight
Posts: 944
Joined: Fri Jan 30, 2004 3:54 pm
Location: Arizona

Post by RedRock »

kianti wrote:
LeapFrog wrote:Ah Redrock - I remember those old Pit days too ..
I did too, was it called 'kerb trading' (you could close your trades after the bell) ???

best regards, as ever
kianti,

I do seem to remember some process for making a resolution trade just after the close at the agreed settlement price. This was done with a meeting of the pit committee just after the close. HOWever, my memory of this is unclear.

Cheers,
rr
RedRock
Roundtable Knight
Roundtable Knight
Posts: 944
Joined: Fri Jan 30, 2004 3:54 pm
Location: Arizona

Post by RedRock »

One thought I had was to harvest the B/A from some point (a few seconds?) before the technical close. Adding this info as extra fields in my csi output files. And then use this info to price what my actual fill would have been at the 'close'. In some markets such as Lumber, the spread can be fairly wide at the "close" and the posted settlement price may be quite different than ones actual 'MOC' fill.
gunter
Roundtable Fellow
Roundtable Fellow
Posts: 83
Joined: Wed Aug 24, 2005 7:25 am
Location: George Town, Cayman Islands

Post by gunter »

RedRock wrote: My issue is having my actual executions match up with what csi lists as their bar close. I think ill need to move intraday to find an adequate solution for my current needs.. Oh well, dragged into the new century (again).

rr
I'm pretty sure you have much more experience at this than I do, but I found that using intraday data opens up a whole new can of worms while not having the expected benefit.

On shorter term (i.e. closer stop systems) this might make a difference, but in real life I still had a significant divergence from the backtested results. Generally if the stop was far enough away, the use of intraday data became more irrelevant. On my backtests the shorter term systems outperformed the longer term systems. However, I really struggled to get the same performance on the live systems as I got on the backtests.

Another problem is the pure bulk of the data (depending on your time frame of course). If my stop wasn't hit on the day of entry, there was no further need for intraday data. If I entered a long, if I wasn't stopped out on the day of entry, any low lower than my stop would signal an exit. Thus there is no need for intraday data.

Perhaps you might come to a different conclusion, but the cons far outweighed the pros for me in using intraday data.

Regards,

gunter
Chelonia
Roundtable Knight
Roundtable Knight
Posts: 525
Joined: Mon Apr 30, 2007 3:37 pm

Post by Chelonia »

Automate your TB system execution and backtest for best execution time per market for MOC and MOO orders. It´s an eye opener and well worth the exercise.
AFJ Garner
Roundtable Knight
Roundtable Knight
Posts: 2071
Joined: Fri Apr 25, 2003 3:33 pm
Location: London
Contact:

Post by AFJ Garner »

Chelonia wrote: best execution time per market for MOC and MOO orders
Can you expand on this? How are you defining the "best execution time" of the market close and the open for these back tests? By "best" do you mean the time at which there prevails the narrowest bid/offer spreads?

In a 24 (or 23) hour market from 18.000 one day to 17.00 the next day I assume you are defining your market open at (by way of example) 08.00 in Chicago and your close as 15.00 or 17.00 in Chicago. Or some such. You might have used 09.00 and 16.00.

I assume your definition of "best" is the width of the spread rather than the profitability of the back test since otherwise it would all be far too arbitrary.
Chelonia
Roundtable Knight
Roundtable Knight
Posts: 525
Joined: Mon Apr 30, 2007 3:37 pm

Post by Chelonia »

The time with the highest volume and therefore the narrowest bid/ask spread, and less slippage. We avoid night sessions for less liquid stuff, and typically trade around the old open outcry floor hours. Stop width allows that.
On top of that we scale in and out on large MOC and MOO orders. Instead of bringing 100 Cocoa to the market in one hit, our automated execution system sells 10 each minute until 100 are sold. (simplified example).

Time of execution within a 24 hour timeframe while not looking at volume also has a significant impact on results but are not realistic as you get killed on slippage trading larger portfolio´s.
AFJ Garner
Roundtable Knight
Roundtable Knight
Posts: 2071
Joined: Fri Apr 25, 2003 3:33 pm
Location: London
Contact:

Post by AFJ Garner »

Chelonia wrote:
Time of execution within a 24 hour timeframe while not looking at volume also has a significant impact on results but are not realistic as you get killed on slippage trading larger portfolio´s.
Yes, but my point is that the ONLY criteria to look at has to be B/O spreads and volume: "significant impact on results" seems to suggest you are also looking at PROFITABILITY of the back tests?

Market prices do of course move during the day as well as spreads/volume and just because one set of back tests shows a higher profitability trading at 8 am rather than 10 am for a given time period does not necessarily imply..............etc etc

But I am probably misinterpreting what you are saying.
RedRock
Roundtable Knight
Roundtable Knight
Posts: 944
Joined: Fri Jan 30, 2004 3:54 pm
Location: Arizona

Post by RedRock »

In moving the O&C around for best profitability, curve fitting dangers surly arise? I understand the desire to locate times of liquidity... If only to define a time to place an order with the best chance of coming close to that synthetic close via tight spreads. Although such times may be different and inherently yield different results vs. backtesting with CSI.

I've always suspected that intraday data could be beneficial from an execution perspective, even if ones timeframe is much longer. akin to picking up coins otherwise left on the ground. Those coins add up in time...
Post Reply