Page 1 of 1

How to pick the most suitable values among three parameters?

Posted: Wed Nov 10, 2004 10:56 am
by yoyo2000
after back-testing,I get a set of results of a three parameters system,but I'm not sure to get the most suitable-robust values from them,could anyone give me some guideline or advice,please?

PS:results are in attachment

Posted: Wed Nov 10, 2004 6:06 pm
by yoyo2000
Oh,yes,the most robust value,I mean,profit factor/DrawDown should be relatively high,and the area around that profit factor,other profit factors should be relatively high and stable,too;at the same time,the area around that drawdown should be relatively low and stable,that's,the location I want should be in the midddle of a PF highland,and in the middle of a basin of drawdown.

Other better definitionis also welcome.

Thanks

Posted: Wed Nov 10, 2004 8:24 pm
by jankiraly
Several people expressed very strong beliefs in the previous thread ( viewtopic.php?t=1699&postdays=0&postorder=asc&start=0 ) and I expect they will soon run this testing data through their Optimal selector algorithms.

TC, ksberg, Asterix, shakyamuni, TK, sluggo, c.f.: You've said you know how to solve this problem, now why don't you show us your solution on yoyo's specific case?

Posted: Thu Nov 11, 2004 12:26 am
by kianti
I'm enclosing an article I find very interesting about better optimization

Pixel Averaging

Posted: Thu Nov 11, 2004 1:35 am
by ksberg
BTW: Thanks for the article Kianti. Interesting read.

I believe there are reasonable approaches related to graphic image manipulation, namely the family of techniques for pixel averaging. What does this have to do with trading? Nothing, but your scores are related by a 3-dimensional grid given by step values for var#1, var#2, and var#3. Thinking in two dimensions for a moment, you can view the trading scores as "color values" on a heat map. What you want to avoid are spikes, which look like noise in the data. Pixel averaging techniques remove spikes and noise, and allow you to focus on larger bodies of consistent "color" ... which are closely related trading score values. When this is done on trading optimization results instead of pictures, the effect is to remove unstable parameter scores (spikes) and identify stable high-value parameter regions.

Check out this interactive example at Olympus Micro. You can see the effectiveness of different techniques for eliminating noise in the data. Here is another document that also talks about a basic pixel averaging algorithm.

Doing this in higher dimensions is just an extension of the pixel averaging applied in two dimensions. The algorithms are changed to visit one neighboring step in each of the three variable. After applying the technique, search for the highest value region. Once within the region, you might choose the parameter that has the highest original score. This mechanical process mimics what we do informally: check out nearby parameter scores to make sure they're not too out of line.

Of course, all of this assumes an effective scoring (fitness) function, which is an entire topic unto itself (as alluded by the Better Optimization paper).

I'm in the process of applying some of these techniques myself.

Cheers,

Kevin

ps. here's sample C++ code for box filtering (replace color values with scores, dimensions with stepped parameters)

Code: Select all

void box_filter(Mipmap *source, Mipmap *dest) {

    assert(dest->width == source->width / 2);
    assert(dest->height == source->height / 2); 

    int i, j;
    for (j = 0; j < dest->height; j++) {
        for (i = 0; i < dest->width; i++) {

            int dest_red, dest_green, dest_blue;
 
            // Average the colors of 4 adjacent pixels in the source texture.

            dest_red = (source->red[i*2][j*2] + source->red[i*2][j*2+1]
                     + source->red[i*2+1][j*2] + source->red[i*2+1][j*2+1]) / 4;
            dest_green = (source->green[i*2][j*2] + source->green[i*2][j*2+1]
                     + source->green[i*2+1][j*2] + source->green[i*2+1][j*2+1]) / 4;

            dest_blue = (source->blue[i*2][j*2] + source->blue[i*2][j*2+1]
                     + source->blue[i*2+1][j*2] + source->blue[i*2+1][j*2+1]) / 4;
            // Store those colors in the destination texture.
                    
            dest->red[i][j] = dest_red;
            dest->green[i][j] = dest_green;
            dest->blue[i][j] = dest_blue;
        }
    }
}