Historical Trend Analysis

Discussion in 'Strategy Development' started by soundfx, May 7, 2007.

  1. soundfx


    Hi All,

    From time to time I've read in articles statements such as "The currency pair GBP/USD only trends 35% of the time...." etc.

    The question is, how do the experts measure a historical trend ?

    I'm specifically looking at how to determine how many trading days out of a given year could be classified as trending.

    If day2 exhibits a higher high and and a higher low - does that constitute an upward trend ? Likewise for lower high and lower low.

    This seems to be a poor measure to me because for example a higher high on day2 can easily reverse and we still end up being in a ranging market. So, this isn't really a true trend.

    I'm not looking at trying to predict when trends are going to occur. I just want to be able to measure the historical data in various markets to be able to say for example in 2006 USD/JPY was in "trending mode" for 30% of the time.

    Does anyone know if there's some sort of standard statistical measure which is used to define a trend in historical data ?


  2. MGJ


    Rather than attempting to duplicate the results of someone who doesn't tell you their methods, why not invent your own methods and generate your own results?

    Here is an example of how you might go about it.

    You might decide you are going to define a "trend" to be, a period of time in which prices are "rising a lot" or "falling a lot". Wonderful. Now all you need to do is define "prices are rising", "prices are falling", and "a lot".

    You might decide that "prices are rising" means "the 35-day Linear Regression Slope of the Closes is positive". You might decide that "prices are falling" means "the 35-day Linear Regression Slope of the Closes is negative". It makes sense, if prices are rising, the daily Closes are sloping upwards. If prices are falling, the daily Closes are sloping downwards. Nice.

    You might decide that "a lot" means that prices are rising or falling so quickly that they overcome the trading costs of Commissions and Slippage in one week (5 trading days). In that case you would define an "uptrend day" to be one whose Linear Regression Slope is "greater than ((C+S) / 5) points per day". Similarly you would define a "downtrend day" to be one whose Linear Regression slope is "less than ((C+S) / 5" points per day.

    Now all that remains is to put your ideas into AmiBroker or MetaStock or TradeStation or WealthLab and try them out.

    You might make some different decisions than in this example. You might prefer other choices than
    * Indicator = Linear Regression Slope (in TradeStation, "LinearRegSlope()" ; in WealthLab, "LinearRegSlope()")
    * Indicator Parameter = 35 days
    * Threshold = slope larger than X points per day
    * Threshold Parameter = (C+S)/5

    So put in your own ideas and give them a shot.
  3. soundfx


    Hi MGJ,

    Many thanks for your response.

    I looked into this some more after posting my original message and I suspect that the reason no quantitive formula is given for trending % is because these statements appear to based on "eyeballing" charts.

    The percentages seem be coming from viewing a Daily Chart and looking for "chunks" of bars where there is a sizeable move of several days in a particular direction, this I guess is designated a trend and the number of trending days divided by the number of total days to give a % over a given year.

    I see these statements all the time in Forex which is supposed to trend more than other instruments according to the some analysts, however here I believe they're talking very long term.

    More common is to read comments like "Using a Trend based system keeps you out of 70% of the market action" etc. which is where my interest stems from.

    If I can identify a trend in Historical data then I have a better idea of what to look for when one appears in the future. Rather than just rely on MA crosses etc. which are subject to whipsaws, I'm looking to develop my own indicator which will tell me when trends are very likely to be around the corner and therefore also suppress any ranging trade signals.

    I'll take your advice and see if I can come up with my own quantitive definition which will meet my needs as I'd like to get a reasonably accurate handle on this rather than just estimate trends from viewing charts.
  4. Great post MGJ - think getting dirty with the numbers is the only way to do this kind of thing.

    SoundFX - good luck with the project. I have done similar things myself in the past. I found it very frustrating - defining a trend or trend day is easy with hindsight but creating a robust predictor for these trends is.... well, not easy :)