+ Reply to Thread
Results 1 to 10 of 108

Thread: Model discussion

Hybrid View

  1. #1
    Join Date
    Dec 1969
    Location
    Kalmthout, Belgium
    Posts
    35
    Quote Originally Posted by Adriano View Post
    As far as I know fuzzy logic is well suited for tackling threshold problems, but I don't know how go any further than this.
    http://en.wikipedia.org/wiki/Fuzzy_logic
    Regarding Fuzzy Logic ... instead of passing a long/short/neutral signal to the robot the 20DMF could perhaps pass a parameter ranging from -100 to 100 with 0 being the most neutral. The robot could then use this parameter in it's decision making process. How that parameter is calculated and how the robot would use it is another matter of course.

  2. #2
    Quote Originally Posted by Rembert View Post
    Regarding Fuzzy Logic ... instead of passing a long/short/neutral signal to the robot the 20DMF could perhaps pass a parameter ranging from -100 to 100 with 0 being the most neutral. The robot could then use this parameter in it's decision making process. How that parameter is calculated and how the robot would use it is another matter of course.
    This is what I was talking about:
    http://www.lotsofessays.com/viewpaper/1690480.html

    Googling "fuzzy logic and stock market" gives lots of results. Just an idea anyway.

  3. #3
    Join Date
    Dec 1969
    Location
    Vienna, Virginia
    Posts
    603
    Quote Originally Posted by Adriano View Post
    This is what I was talking about:
    http://www.lotsofessays.com/viewpaper/1690480.html

    Googling "fuzzy logic and stock market" gives lots of results. Just an idea anyway.
    I have the MATLAB fuzzy logic toolbox and have played with fuzzy math off and on for many years. I'm no expert, but I understand the fundamentals enough to poke around.

    The greatest challenge for me is backtesting a fuzzy system. I find it difficult to create a test harness (e.g., known stimulus as the input with predictable output). Without this, I have little confidence in what is considered "normal" behavior versus what is considered outside the normal distribution. While I think fuzzy logic can have a place, especially the "porosity" factors that we employ here, I've never been able to build a winning system based on fuzzy math alone.

    In discussion of this with a math guru who uses fuzzy systems with control systems, if we view our trading system as a self-contained entity, we have to have some confidence that the manipulations that we do on the data result in a stable system, e.g., one that won't take our equity to the ground (drawdown) with an expectation that we'll achieve higher gains. These constraints are valid, but they steer the system towards standard Euclidean logic and away from the fuzziness that we're intending.

    The correct answer is probably somewhere in the middle of both models, but again, without a robust way of testing, it's hard to make the jump with real monies.

    As an aside, GGT handles this situation in a different manner. While I maximize on equity to derive a set of coefficients that describe optimal moving averages and rates of change, I "lop off" the top of the equity mountain and try to maximize the area of the plateau where the outside conditions (market variables) do not dramatically change the optimal solution.

    Think of it this way ... you have two variables, EMA1 and EMA2. For a given stock price series over the past 2 years, there is a unique combination of EMA1 and EMA2 values which maximize the equity of that system. We could pick EMA1 and EMA2 and use those values, but if the market moves just a tad against us, we could see our equity drop off FAST. This situation would exist if there was a gradual slope in the equity curve as EMA1 was held constant and EMA2 was varied to produce the maximum. If EMA2 goes too far, we could see a "drop off the equity cliff". This sensitivity is very dangerous to our portfolio, and it is why most systems do not work well with crossing MAs.

    Instead, ask yourself how much of the mountain top can you "lop off" flat so that a marble rolling around on this new plateau does not "fall off". Of course, you could "lop off" everything until the marble is on flat ground with everything around -- it will never "fall off" the plateau, but then again, you're not making money. But you could "lop off" enough of the mountain to keep you on a higher plateau than any surrounding peak -- and now you're more stable to market conditions if the "optimal" EMA1 and EMA2 are adjusted to the geometric center of this plateau.

    This is more or less what GGT attempts to do, and perhaps there is a lesson here for the model here. Not all stocks/ETFs in the GGT system have a solution that is robust -- this is what the metrics on my sheet tell me, but for many, they behave very well.

    The GGT coefficients are updating 24/7, and every week about 15%-20% of the stock database receives updated numbers (sometimes they change, sometimes they do not), and about 25% of the ETFs get new values. This keeps the backtest data window sliding forward ever week on a new basket of stocks, so that the optimization does not get too far from reality.

    Food for thought ...

    Regards,

    pgd

  4. #4
    Quote Originally Posted by grems8544 View Post
    I have the MATLAB fuzzy logic toolbox and have played with fuzzy math off and on for many years. I'm no expert, but I understand the fundamentals enough to poke around.

    The greatest challenge for me is backtesting a fuzzy system. I find it difficult to create a test harness (e.g., known stimulus as the input with predictable output). Without this, I have little confidence in what is considered "normal" behavior versus what is considered outside the normal distribution. While I think fuzzy logic can have a place, especially the "porosity" factors that we employ here, I've never been able to build a winning system based on fuzzy math alone.

    In discussion of this with a math guru who uses fuzzy systems with control systems, if we view our trading system as a self-contained entity, we have to have some confidence that the manipulations that we do on the data result in a stable system, e.g., one that won't take our equity to the ground (drawdown) with an expectation that we'll achieve higher gains. These constraints are valid, but they steer the system towards standard Euclidean logic and away from the fuzziness that we're intending.

    The correct answer is probably somewhere in the middle of both models, but again, without a robust way of testing, it's hard to make the jump with real monies.
    Interesting, thanks. I know MATLAB and I think it's fantastic, but honestly I never used the fuzzy logic toolbox, only the image processing toolbox and a little bit of the neural nets stuff. With NN I also faced a somehow similar problem some years ago, but that was for an abstract animation/electronic sound piece, nothing to do with financial stuff. I agree that the porosity issue should be handled well by fuzzy logic and I wish I could give a more real solution, I just don't have the math knowledge to do it.

    Quote Originally Posted by grems8544 View Post
    As an aside, GGT handles this situation in a different manner. While I maximize on equity to derive a set of coefficients that describe optimal moving averages and rates of change, I "lop off" the top of the equity mountain and try to maximize the area of the plateau where the outside conditions (market variables) do not dramatically change the optimal solution.

    Think of it this way ... you have two variables, EMA1 and EMA2. For a given stock price series over the past 2 years, there is a unique combination of EMA1 and EMA2 values which maximize the equity of that system. We could pick EMA1 and EMA2 and use those values, but if the market moves just a tad against us, we could see our equity drop off FAST. This situation would exist if there was a gradual slope in the equity curve as EMA1 was held constant and EMA2 was varied to produce the maximum. If EMA2 goes too far, we could see a "drop off the equity cliff". This sensitivity is very dangerous to our portfolio, and it is why most systems do not work well with crossing MAs.

    Instead, ask yourself how much of the mountain top can you "lop off" flat so that a marble rolling around on this new plateau does not "fall off". Of course, you could "lop off" everything until the marble is on flat ground with everything around -- it will never "fall off" the plateau, but then again, you're not making money. But you could "lop off" enough of the mountain to keep you on a higher plateau than any surrounding peak -- and now you're more stable to market conditions if the "optimal" EMA1 and EMA2 are adjusted to the geometric center of this plateau.

    This is more or less what GGT attempts to do, and perhaps there is a lesson here for the model here. Not all stocks/ETFs in the GGT system have a solution that is robust -- this is what the metrics on my sheet tell me, but for many, they behave very well.

    The GGT coefficients are updating 24/7, and every week about 15%-20% of the stock database receives updated numbers (sometimes they change, sometimes they do not), and about 25% of the ETFs get new values. This keeps the backtest data window sliding forward ever week on a new basket of stocks, so that the optimization does not get too far from reality.

    Food for thought ...

    Regards,

    pgd
    Yes, I know the peak/plateau issue, certainly peak values are not reliable. I also update myself some parameters of the four trading systems I use, two of them being the VIT robots. I do that with AmiBroker, before placing a new trade to get the best position sizing values. I don't trade stocks at the moment, so this makes it easier for me.

    Regards,
    Adriano

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts