Expanding data set & counter-trend

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
steven
Contributing Member
Contributing Member
Posts: 9
Joined: Mon Jan 26, 2009 1:00 pm
Location: Dubai, UAE

Expanding data set & counter-trend

Post by steven »

Hi All,

Thanks for your input towards my decision on whether to take 3rd party simulation software or continue along the path of building my own. I have taken a license on TradingBLOX Pro and have spent a week or so familiarising myself with it. I am really pleased to make the jump from primarily coding to testing.

I have a couple of questions and wonder whether you might add any relevant experience you have.

Firstly on data; I have tested out some different system parameter sets on a couple of the built-in systems and the results seem ok to me. I optimised them on 10 years and then tried it on the last year & two subsequent out of sample years. The results were still ok. Now I want to add in some new data to get a feel for whether the system has real historical merit.
I bought some data from CRB a while back and intend to import that once I have it in the right format. At the moment, the data is in individual futures contracts and so I need to aggregate it to get a single time series. If I just paste it together, then the new data will have jumps where the contract rolls over. So I am making an adjustment at the roll point to bring all subsequent data in line with the current data levels thus removing the jumps the roll points. This seems like a logical approach to me though I have come across some flaws. I notice with some of the data sets I actually end up with negative values through some periods. I am pondering making a linear shift upwards in prices in order to get all positive prices. I know that doing so will affect some of the trades but this seems to me to be the least damaging way of keeping the contract in the simulation. Does anyone have comments on any of what I am doing above?

My second question is regarding counter-trend systems. I found it fairly easy to find some parameters that worked well for trend-following. I have come from a non-technical market trading background but have long held in the back of my mind that a counter-trend system might be a viable, profitable trading system. However, I spent an afternoon tinkering with the variables in the Bollinger Counter-Trend system on the given data set but I struggled to squeeze the best historically performing system I found into positive CAGR. Have others had the same experience as this was quite a surpise to me?

I look forward to your input.

Regards

Steve
Asamat
Roundtable Knight
Roundtable Knight
Posts: 175
Joined: Fri Jun 03, 2005 7:50 am
Location: Walldorf, Germany

Post by Asamat »

Hi Steve,

welcome to the club. From what you write it seems you are one a good way and have come to the right place.

My comment to your first question:

What you write sounds OK to me (the splicing and the shifting to avoid negative prices). Be aware, when using shifted and spliced data, you need to restrict you analysis to methods which are unaffected by these shifts. Suitable are things like ATR, MACD, which are calculated from price differences and as such are unaffected by global shifts. However, when using something like a relative change (percentage price change), you need to use the "unadjusted close" to calculate the percentage, since this variable is affected by global shifts. It's sometimes a non-trivial question whether some variable is affected or not, and how to correct for it. TBs built-in system to my knowledge use only variables which are unaffected.

On different procedures for backadjusting you may find this article useful:
http://www.csidata.com/cgi-bin/getManua ... =essay.htm
It's worthwhile to delve deeper into this topic, which is more complex than it initially seems.

Incidentally the article comes from the website of the data vendor (CSI), which is known for it incredibly user-unfriendly software, which, however, offers by far the most ways of adjusting and creating and manipulating continuous futures contracts. And I have to say, despite the unearthly UI, that I never once encountered programming errors or problems with the backadjusting algorithms. As a side note: TB recommends CSI among their data vendors, and there is a special section in the manual how to set up the connection between TB and the CSI software. In my experience that combo works very well.

You might consider whether you want to do the same step you did with the software (paying and saving time by not doing it yourself) may also be sensible with the backadjusting and the data. I did and never regretted it. It will not spare you the neccessity to understand the different splicing mechanisms, however. :wink:

To your second question:

I found the same thing. However, try combining the Counter-Trend with one of the trend following systems. You will be amazed about how their combined performance differs from their stand-alone numbers. By construction one makes money when the other doesn't, which leads to beautiful reduction of maxDD. (This was described with impressive numbers in a thread by one of the older roundtable members. Unfortunately I couldn't find it. Maybe someone can help.)

Regards,
Asamat
steven
Contributing Member
Contributing Member
Posts: 9
Joined: Mon Jan 26, 2009 1:00 pm
Location: Dubai, UAE

Post by steven »

Thank you for replying Asamat. I appreciate your effort.

With regard to a data vendor, I think you might be right. I am probably trying to cut costs on an aspect where it makes sense to spend - both for reasons of data reliability and project size. Now I have spent once for the software, I feel a little more comfortable investing in a further stage.

With regard to the counter-trend system, I am still trying to find a place for this as an addition to a trend following system. The results I get for a stand-alone counter-trend are fairly poor compared to the trend following systems - sub 5% CAGR and MAR under 0.5. You make a comment that combining them adds an improvement through reduced max DD as they offset each other. I looked for the thread but can not see it. The concept makes intuitive sense to me though I am so far struggling to make it fit in reality. I am enjoying the chase.

I plan to take the data and then try to work on getting some good results out of a simple break out system. I see from the other threads that proft-taking methods might help to improve the MAR on a simulation and so might overlaying some different time parameters on the MA/Breakout. Does anyone know where I can find some indiciative benchmarks for trading system results in the industry?

Thanks to all the contributors for the informative threads.

Steve
steven
Contributing Member
Contributing Member
Posts: 9
Joined: Mon Jan 26, 2009 1:00 pm
Location: Dubai, UAE

Post by steven »

Oh yes, and the other thing I notice about the counter-trend systems that do appear to work is that the number of trades is small.....
Post Reply