I don't have an answer but I also wonder about this feature. It's stated that a trend is removed from, inverted or randomized in the historic price data. But what trend? Anyone that can determine a generally valid trend would be able to generate a very well performing trend follower. And isn't there a danger to remove the inefficiencies as well?
Detrend is just a simple and often needed feature. You don't want trend bias in backtest results, so Detrend removes trend either from the prices, or from the trade returns. Trend, in that context, is simply any difference between the first and last price.
thank you, jcl. The DETREND feature has several option described in the manual. When you have time, can you write some recommendation on how to use it or not use it, as you have done with the oversampling on your blog. I will pay you a beer if you visit Milano!
For a beer I owe you of course a good explanation. Aside from the detrending modes, you can invert or randomize the price curve with Detrend. Inverting is just for testing if the system still works when the trend goes in the other direction. SHUFFLE is for reality checks. You can find an example when you download the "boersenhackerbuch" scripts from my blog. The script "Alice4b" uses this feature for a reality check of a system similar to workshop 7.
Alcohol is always a door opener! Thank you lets go for 3 beers (huge) and lets assume that workshop 6 is "the TS" How would you use DETREND, validating the algos, in the training, testing and trading phases?
Detrending is not needed for WS 6 since it's a symmetrical algo. But for a reality check you can plot a return distribution with Detrend = SHUFFLE, with the same method as in Alice4b.
It means that the trade return is corrected by the average price slope of the current WFO cycle. PRICES is handled in a similar way. CURVE means the price curve is tilted so that it ends at the same level as the start after the lookback period.
This is my take: lets assume a stock price today 100 points higher than it was before 100 trading days, e.g on average it went 1 point higher a day. If you had an trading system which would prefer long only, you would have a big gain, but maybe just because of beta (market performance) not your trading system.
To eliminate the long bias, you would detrend the price curve, e.g. everyday you would substract 1 point (100 point / 100 days = average per day) from the daily performance and test your system on that curve.