backtesting strategy

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
ES
Roundtable Fellow
Roundtable Fellow
Posts: 97
Joined: Mon May 05, 2003 1:02 am

backtesting strategy

Post by ES » Thu Nov 27, 2008 8:46 pm

Dear Colleagues,

has anyone backtested the following:

is it wiser to exit a losing position or ride out the loss? what is the benefit of using the atr for stops? why the atr ?

sluggo
Roundtable Knight
Roundtable Knight
Posts: 2986
Joined: Fri Jun 11, 2004 2:50 pm

Re: backtesting strategy

Post by sluggo » Fri Nov 28, 2008 2:24 pm

babyturtle wrote:is it wiser to exit a losing position or ride out the loss?

One way to interpret your question, is to suppose that you are asking "For all possible trading systems, applied to all possible portfolios of instruments, for all possible choices of backtest start and stop dates, is it wiser to exit a losing position or ride out the loss?" But that is difficult to answer because it requires an infinite number of tests to be run and an infinite number of results to be summarized.

Therefore I have decided to interpret your question in a way that makes it rather simple to answer: "For a single portfolio, and a single trading system, and a single choice of backtest start date and end date, what are the effects of exiting a losing position using a stoploss order?"

One of my futures trading systems, that's being traded live, right now, with real money, is shown in the figure below. Its rules include the use of a stoploss order, so that when a trade's loss is bigger than (a certain number of ATRs), the system exits the losing position.

Using Blox it is extremely easy to vary the distance to the stop, from extremely "tight" (small number of ATRs) to extremely "loose" (large number of ATRs). Notice that when the stop is extremely "loose", it is never hit. Instead, the trade is exited by the normal (non-stoploss) exit rules. Eureka! When the distance to the stop is very large, this is equivalent to having no stop at all.

I've removed the axis labels from the plot, because what matters here is the shape of the curves, rather than their particular numerical values. What we see, is what we expected to see: some choices of stoploss (point a) are worse than having no stop at all (points c and d), but other choices of stoploss (point b) are better than having no stop at all (c and d). No great surprise really.

The bigger question, what would these plots look like for ALL possible systems and ALL possible portfolios of tradeable instruments, I will leave to others. It might be fun, in a perverse sort of way, to search for a system that has a plot with the exact opposite shape: a dip on the left side of the plot (rather than a rise), then a flat area on the right side.
Attachments
perf.png
Plot the output of a Blox run that steps the parameter "Distance To Stop"
perf.png (17.15 KiB) Viewed 5650 times

ES
Roundtable Fellow
Roundtable Fellow
Posts: 97
Joined: Mon May 05, 2003 1:02 am

stops

Post by ES » Mon Dec 22, 2008 6:58 pm

Sluggo,
thanks man the chart defines the answer

thank you sluggo. the trading blox tool is real nice and we should consider becoming a client, once and for all.

I was having a debate with a trader who was applying to come work for us. but he is a gunslinger. his mandate is to risk 10% utilizing the rsi macd and slow stoch, along with candlesticks. he made assertions that he was doing an average of 156% per annum over the past five years. the only issue though is that he kept refusing to grant me access to his trading accounts always

what is your feel on these indicators? i tried trading with them many moons ago and found them to be unreliable and quite useless. do you agree?

the issue within the question posed is that if the market goes against you, one could sustain severe loses, henceforth Tom Basso's equity curve trading.

where you a galt student ?

we just incubated a small hedge fund.
please drop me a line if interested in managing money. esabbah2002@yahoo.ca.

sluggo
Roundtable Knight
Roundtable Knight
Posts: 2986
Joined: Fri Jun 11, 2004 2:50 pm

Post by sluggo » Mon Dec 22, 2008 7:55 pm

I haven't tried out the trading idea / indicators you mention. It might be a good first project to explore, if and when you do get backtesting software like Blox. The answers to your final two questions are "I wasn't" and "no, thank you" respectively.

I see that you made a post here on July 20th, 2003. That has to be some kind of a record, for length of time spent deciding whether to buy software!
Attachments
first_post.png
first_post.png (2.69 KiB) Viewed 5429 times

ES
Roundtable Fellow
Roundtable Fellow
Posts: 97
Joined: Mon May 05, 2003 1:02 am

stops

Post by ES » Mon Dec 22, 2008 11:45 pm

law practice was busy and hedge fund was years away untill I could establish some treck record with pooled capital/ now fund is incubated. any experience trading cfd's ?

drm7
Roundtable Fellow
Roundtable Fellow
Posts: 96
Joined: Sun Apr 20, 2003 9:02 pm
Location: Richmond, VA

Re: stops

Post by drm7 » Tue Dec 23, 2008 3:03 pm

babyturtle wrote: I was having a debate with a trader who was applying to come work for us. but he is a gunslinger. his mandate is to risk 10% utilizing the rsi macd and slow stoch, along with candlesticks. he made assertions that he was doing an average of 156% per annum over the past five years. the only issue though is that he kept refusing to grant me access to his trading accounts always

what is your feel on these indicators? i tried trading with them many moons ago and found them to be unreliable and quite useless. do you agree?

the issue within the question posed is that if the market goes against you, one could sustain severe loses, henceforth Tom Basso's equity curve trading.
My advice plus 50 cents is worth half a cup of coffee, but I would humbly put forth my opinion that this trader is either a) a train wreck waiting to happen or b) lying to you.

Risking 10 pct on a countertrend strategy works great until you get stuck in a punishing trend, then it all falls apart. The strategy sounds similar to selling naked out of the money options. Vic Niederhoffer did great for years doing it then blew up - twice.

Risking 10 pct on ANY strategy is pretty scary by itself. Your win/loss ratio has to be close to 90 pct for it to work out mathematically, then you pray that you don't get any outliers.

ES
Roundtable Fellow
Roundtable Fellow
Posts: 97
Joined: Mon May 05, 2003 1:02 am

THANK YOU

Post by ES » Tue Dec 23, 2008 5:35 pm

gentlemen,

thank you for your invaluable input. have a happy holiday.

ES
Roundtable Fellow
Roundtable Fellow
Posts: 97
Joined: Mon May 05, 2003 1:02 am

exits v larger stops

Post by ES » Mon Jul 20, 2009 10:55 pm

Sluggo,
Thanks for invaluable piece. What could this look like on an equity curve chart? If the atrs were low and the asset was trading sideways with small declines, a trendster/tt would be stopped out, based on for ex., your current live system's rules.
What if one remained in the trade with a larger stop? Backtesting with this tweaked exit parameter would essentially show for a particular or broad time line, whether the latter was more optimal. Using as an initial investment 100k, how would the two perform?

danZman
Roundtable Knight
Roundtable Knight
Posts: 117
Joined: Thu Mar 10, 2005 10:07 am
Location: Newport Beach,CA

Re: exits v larger stops

Post by danZman » Tue Jul 21, 2009 3:54 am

babyturtle wrote:Sluggo,
Thanks for invaluable piece. What could this look like on an equity curve chart? If the atrs were low and the asset was trading sideways with small declines, a trendster/tt would be stopped out, based on for ex., your current live system's rules.
What if one remained in the trade with a larger stop? Backtesting with this tweaked exit parameter would essentially show for a particular or broad time line, whether the latter was more optimal. Using as an initial investment 100k, how would the two perform?
There's nothing as powerful as finding the answers to your own questions through research. TB will allow for this. You can even hire programers on the cheap with rentacoder or similar sites...it's still your idea.

Post Reply