Trading Next Days Open

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
dwooten70
Roundtable Fellow
Roundtable Fellow
Posts: 53
Joined: Thu Oct 25, 2012 9:50 am

Trading Next Days Open

Post by dwooten70 » Wed Dec 26, 2012 12:28 am

I have built a system that trades the next open. The data I am using is the (Floor + Electronic) data from CSI (the same as the data included with Trading Blox). If I understand things correctly though, I will have a problem trading this system in practice. Take Gold (GC2) for example. It trades from 6pm to 5:15pm the next day. That means there is a 45 min gap between the the close and the next open. According to CSI's site, the data for Gold is not available until 6:50pm each day. This is after the next open which I understand to be at 6pm. Am I understanding this correctly and how are people handling this in practice?

Thanks,
Dan

impulse12
Contributor
Contributor
Posts: 1
Joined: Wed Nov 30, 2011 7:37 am

Re: Trading Next Days Open

Post by impulse12 » Tue Feb 19, 2013 3:52 pm

dwooten70 wrote:I have built a system that trades the next open. The data I am using is the (Floor + Electronic) data from CSI (the same as the data included with Trading Blox). If I understand things correctly though, I will have a problem trading this system in practice. Take Gold (GC2) for example. It trades from 6pm to 5:15pm the next day. That means there is a 45 min gap between the the close and the next open. According to CSI's site, the data for Gold is not available until 6:50pm each day. This is after the next open which I understand to be at 6pm. Am I understanding this correctly and how are people handling this in practice?

Thanks,
Dan
bump

Johnedoe
Full Member
Full Member
Posts: 14
Joined: Tue Dec 15, 2009 1:13 am

Just a thought.

Post by Johnedoe » Sun Jul 28, 2013 12:58 pm

While I am not here very often and post even less I will give you an idea to do some testing with.
Instead of trying to trade 24 hours, pick a market segment.
Trade the London session open or the US session open or perhaps the crossover of the two. Do some testing and find the most volatile and liquid portion of the day.

Here is a pretty good trade time clock though I imagine you have one already but just in case.

http://www.stocktime.ru/razrez8.swf

chimera123
Full Member
Full Member
Posts: 13
Joined: Mon Dec 13, 2010 3:33 pm

Post by chimera123 » Mon Sep 30, 2013 4:38 pm

Thats funny I asked myself exactly the same question and could not figure out how people handle this when using CSI data.

Assuming you are a LTTF, an experienced Trader told me that it simply does not matter at all.

We are dealing here with EOD data, some markets are basically trading 24hrs with a short break, there is simply no way to be ready when the markets resumes again after a short break.

Following CSI you will enter delayed, sometimes you get a better fill, sometimes worse, over time it should offset.

Floor + Electronic, I guess you just use this kind of data just for backtesting, for real trading you should decide if you trade floor or electronic session. As far as I remember "floor+electronic" uses the open from the floor session and the close from the electronic session.

bye

tovetski
Senior Member
Senior Member
Posts: 46
Joined: Fri Jan 13, 2006 10:49 am
Location: Montréal, Québec, Canada

Post by tovetski » Tue Oct 08, 2013 12:05 pm

Hi Dwooten70,

Here's my solution to this problem. My motivations for a solution revolved around not being too late into the electronic session and not extending my workday too late in the evening. I use day limit orders and participate in all trading sessions except in Asian markets where the timing of the night session posses a problem as it pertains to CSI's data release schedule. I trade a fairly diversified portfolio of approximately 140 markets.

In 3 steps:
1) Find a website that provides free delayed data on all markets that you trade. The more exotic the markets, the fewer options you have on that front. Here are a few options that pop up on a google search:
http://futures.tradingcharts.com/menu.html
http://www.mrci.com/ohlc/
http://www.dormantrading.com/TraderTools/quotes.htm

2) Once you settle on a website. Use a language such as Perl (See CSI API) and a library like (HTML::Tree, HTML::Table, HTML::TreeBuilder, etc...) to scrape the data off the website on a schedule, say 16:30PM. Adjust this schedule based on the markets you trade and there respective closing time. You can adjust this based on when the majority of your markets settle or wait for all markets to be settled.

3) With the data you scraped off the website, append today's OHLC data to a copy of your CSI files updated up to yesterday. Voila, you now have preliminary data (before the thorough CSI scrubbing) on which to run your system and generate orders.

This process obviously has to be automated or else it defeats the purpose. I suggest that once your process is in place that you paper trade your preliminary data. Save a copy of your "preliminary" orders and compare them to your "official" orders once Trading Blox runs after the CSI update. Compare a few days/weeks of orders and see if your "preliminary" is clean enough for the benefits that it affords you.

Good luck to you and feel free to share your progress/success with this approach.

Pierre

chimera123
Full Member
Full Member
Posts: 13
Joined: Mon Dec 13, 2010 3:33 pm

Post by chimera123 » Tue Oct 08, 2013 1:43 pm

Hello tovetski,

Thanks for your comments!

Guess you already tested your mentioned Approach. Did you see a significant difference by using the approach you have mentioned?

Does it really matter entering the markets delayed by using CSI data only?
I haven´t performed a lot of testing on this, but based on what I have see there is not much different. Additional I would be concerned to use the data from a free Website in the longterm.

Thanks

tovetski
Senior Member
Senior Member
Posts: 46
Joined: Fri Jan 13, 2006 10:49 am
Location: Montréal, Québec, Canada

Post by tovetski » Tue Oct 08, 2013 2:07 pm

Hi chimera123,

Although I do agree with your comment that in the long-term it will "probably" net out, I also keep in mind Murphy's Law and the adage "Test what you trade, trade what you test."

That being said, my monitoring of the slippage arising from this very issue has indeed been very close to zero. That is, before I implemented the "preliminary" approach I detailed above. As mentioned in my post, not waiting for the CSI data release was not my only motivation. It turns out I derived more value from my other motivation.

The biggest risks I face from using the data from a free website are:
1) Wrong signal generated on erroneous data. Could lead to loss, or gain. Just like entering late...
2) Free website decides to change format, discontinue free delayed data or shut down altogether.

For #1, I think the impact of these errors will net out in the long-term.
For #2, I will revert back to using CSI only till I find an alternative to the free website that changed its format, discontinued delayed...

In the end, we decide which risks we are comfortable with. I believe it is more important to be aware of the presence of risk than whether or not we decide to assume it.

Pierre

Ghost11365
Roundtable Knight
Roundtable Knight
Posts: 112
Joined: Wed Jul 31, 2013 3:33 pm

Post by Ghost11365 » Sun Oct 13, 2013 9:58 pm

Is it possible to have TB assume that you are using the orders generated (as I'm importing end-of-day data from CSI) and udpate TB with the actual positions as they were filled in the market? This will allow TB to monitor my account as it atually stands in the market. Likewise, i'd want to update TB with the exit price of an actual trade so the system will accurately reflect my equity based on the transaction as they occured in the market. thank you.

chimera123
Full Member
Full Member
Posts: 13
Joined: Mon Dec 13, 2010 3:33 pm

Post by chimera123 » Thu Oct 17, 2013 10:47 am

"Broker positions" is the answer to your question, refer to TB Manual for further Information.

bye

b-cat
Full Member
Full Member
Posts: 22
Joined: Wed Dec 31, 1969 7:00 pm

Post by b-cat » Fri Oct 18, 2013 5:55 pm

Maybe another consideration could be to investigate how sensitive backtest results are to fill assumptions.

A simple example:

-use the SetFillPrice() and random # generator to vary each fill so that it's somewhere between the high and low of the execution day. Run N trails and see how how much the results vary. If results are reasonably stable across a large number of 'randomized-fill' test runs, maybe it's nothing to worry about.

Ghost11365
Roundtable Knight
Roundtable Knight
Posts: 112
Joined: Wed Jul 31, 2013 3:33 pm

Post by Ghost11365 » Sat Oct 19, 2013 9:31 pm

I set Use Broker Positions = True and I then entered my positions in the Broker Position table. When I run a simulation i'm in the black but the summary results/reports show a differnt story - any thoughts? thanks.
Attachments
Broker Position.jpg
Broker Position.jpg (125.94 KiB) Viewed 8419 times

Ghost11365
Roundtable Knight
Roundtable Knight
Posts: 112
Joined: Wed Jul 31, 2013 3:33 pm

Post by Ghost11365 » Mon Oct 21, 2013 9:48 pm

In addition to the quesiton I raised on 10/19 - I was wondering if it's possible when using a TMA strategy, to only enter long on brand new crossovers? In other words, I don't want to enter a position that is already in a current tend - I want to only enter long on new, end of day entry signals. Is this possible? Thank you.

Ghost11365
Roundtable Knight
Roundtable Knight
Posts: 112
Joined: Wed Jul 31, 2013 3:33 pm

Post by Ghost11365 » Sun Oct 27, 2013 9:58 pm

Can anyone help me understand why TB is returning the below negative results even though the positions are clearly in a profit?
Attachments
issue.jpg
issue.jpg (55.29 KiB) Viewed 8237 times
issue1.jpg
issue1.jpg (119.66 KiB) Viewed 8237 times
issue3.jpg
issue3.jpg (66.62 KiB) Viewed 8237 times

Jake Carriker
Site Admin
Site Admin
Posts: 1493
Joined: Fri Sep 12, 2003 10:32 am
Location: Austin, Texas

Post by Jake Carriker » Mon Oct 28, 2013 8:16 am

Your test starting equity is set to zero. Try using a positive amount that would be commensurate with an amount sufficient to capitalize the strategy.

Ghost11365
Roundtable Knight
Roundtable Knight
Posts: 112
Joined: Wed Jul 31, 2013 3:33 pm

Post by Ghost11365 » Tue Oct 29, 2013 9:33 pm

Jake,

I've tried every combination for the equity - below is the recomendation you suggested. Still same result. I need to be able to track my broker positions in TB to accurately continue to use my strategy. Please assist.
Attachments
issue4.jpg
issue4.jpg (69.46 KiB) Viewed 8155 times
Issue5.png
Issue5.png (4.22 KiB) Viewed 8155 times

Post Reply