How to pick the most suitable values among three parameters?

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
yoyo2000
Roundtable Fellow
Roundtable Fellow
Posts: 58
Joined: Fri Jan 30, 2004 10:37 pm

How to pick the most suitable values among three parameters?

Post 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
Attachments
Book1.zip
(9.31 KiB) Downloaded 717 times
yoyo2000
Roundtable Fellow
Roundtable Fellow
Posts: 58
Joined: Fri Jan 30, 2004 10:37 pm

Post 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
jankiraly
Roundtable Fellow
Roundtable Fellow
Posts: 52
Joined: Tue Feb 03, 2004 7:23 pm
Location: San Diego

Post 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?
kianti
Roundtable Knight
Roundtable Knight
Posts: 335
Joined: Fri May 02, 2003 6:10 am
Location: Florence - Italy

Post by kianti »

I'm enclosing an article I find very interesting about better optimization
Attachments
Better Optimization.PDF
(317.67 KiB) Downloaded 1693 times
ksberg
Roundtable Knight
Roundtable Knight
Posts: 208
Joined: Fri Jan 23, 2004 1:39 am
Location: San Diego

Pixel Averaging

Post 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;
        }
    }
}
Post Reply