# Rigorous definition, detection and test for trending vs. mean-reverting behaviour of stochastic processes

This is a question that has haunted me for some time. In the domain of time series you always talk about trends and mean reversion. But at least to me these concepts are either defined axiomaticly within the data generating process (like the drift component in a geometric Brownian motion) or feel more like a heuristic approach (that everybody knows what you are talking about).

My question: When you have an empirical time series how can you define trending- and mean-reverting behaviour there? How do you detect it and test for it within some confidence interval.

That this is not a trivial question as it might seem at first shows the fact that in the financial markets many people adhere to different camps like "trend following" and "trading systems with moving averages" where there is much controversy going on - much of what could be avoided if you had a better understanding of what you are talking about here. (as a side-note: it of course also touches on the question of efficiency in markets)

Note: There is one paper I found on this: http://hal.inria.fr/docs/00/35/28/34/PDF/FES-Finance.pdf

From the abstract: "We are settling a longstanding quarrel in quantitative finance by proving the existence of trends in financial time series thanks to a theorem due to P. Cartier and Y. Perrin, which is expressed in the language of nonstandard analysis [...] Those trends, which might coexist with some altered random walk paradigm and efficient market hypothesis, seem nevertheless difficult to reconcile with the celebrated Black-Scholes model. They are estimated via recent techniques stemming from control and signal theory. Several quite convincing computer simulations on the forecast of various financial quantities are depicted. We conclude by discussing the role of probability theory."

Unfortunately I am no expert in non-standard-analysis and cannot fully appreciate the paper

-

In the abstract, you're looking to see when the derivative of the previsible part of a martingale (a la the Doob-Meyer decomposition) is nonzero. Finding trends with perfect accuracy amounts to performing the D-M decomposition, but of course nobody can do this in practice. Although there are a lot of ad hoc approaches to approximate trend detection, probably the best rigorous tools for this sort of thing are change of measure and change of time techniques along with nonparametric statistical tests.

For point processes a good rigorous technique is the time rescaling theorem along with the Kolmogorov-Smirnov test or a standard Cramer large-deviation inequality. An application to determine abrupt rate changes for inhomogeneous Poisson processes is sketched at

http://blog.eqnets.com/2009/07/28/why-poissonian-traffic-models-matter-more-now-than-ever-part-4/

and example code and numerics are provided in the sequel that is linked in the comments section there.

-

Regarding the linked "paper"(which is referred to as "informal paper" on INRIA - meaning nobody who has an idea about this stuff reviewed it!):

It seems they ignore all issues with hand-waving (the talk of nonstandard analysis is just the excuse, the authors' (mis-)understanding of nonstandard analysis seems very vague). They basically approximate the signal (eod prices for some example asset) with a third or fifth order linear recurrence relation, the parameters of which are smoothly adapted to the signal.

Not surprisingly the result looks similar to a very short-term moving average and it has about as much predictive power.. There are empirical studies about which heuristic (e.g. moving averages) performs how well, and when - google helps find them. The one discussed in that paper hasn't been studied to my knowledge, but feel free to try it yourself - if it works you'll make loads of cash!

But think about that: If it is that simple to predict what happens next, wouldn't the big players like GoldmanSachs be exploiting that to the maximum already? There is a maximum, btw: The more money is exploiting the same inefficiency (like for example predictability), the weaker it gets. There are notable exceptions, e.g. bubbles, but they have a lot more to do with behavior than time series.

And of course the EMH is overly simplistic, but it's not as if the mathematicians at financial institutions are complete idiots! This whole idea of a "longstanding quarrel in quantitative finance whether there are trends or not" is pretty much nonsense - of course there are trends, even the simplest models allow for trends - there is no controversy. You just have to know when to make which simplifying assumption to get the best result.

-
Carl: Thank you! You write: "There are empirical studies about which heuristic (e.g. moving averages) performs how well, and when - google helps find them." - Could you perhaps provide us with a few example search terms that will find the most important ones (just as a starter). - Thank you! – vonjd Nov 6 '09 at 14:26
Try looking in the quant-fin section on arxiv.org, and on google scholar, just search: "technical analysis", empirical. Take with a grain of salt: It's easy to fake positive results (in "articles" that are actually ads/scams), for that reason scientific articles usually test very simple strategies that can't be tampered with as easily - but if the most basic automated moving averages doesn't work in a study, it can still be a good basis for more complex strategies. Also often the time periods are "long gone", like 1990-2000, a lot of stuff that worked then doesn't work anymore. – Carl F Nov 8 '09 at 21:04

The following new paper addresses this question exactly:
An Operational Definition of a Statistically Meaningful Trend by Andreas C. Bryhn and Peter H. Dimberg

From the abstract:
"Linear trend analysis of time series is standard procedure in many scientific disciplines. If the number of data is large, a trend may be statistically significant even if data are scattered far from the trend line. This study introduces and tests a quality criterion for time trends referred to as statistical meaningfulness, which is a stricter quality criterion for trends than high statistical significance. The time series is divided into intervals and interval mean values are calculated. Thereafter, r^2 and p values are calculated from regressions concerning time and interval mean values. If r^2≥0.65 at p≤0.05 in any of these regressions, then the trend is regarded as statistically meaningful. Out of ten investigated time series from different scientific disciplines, five displayed statistically meaningful trends. A Microsoft Excel application (add-in) was developed which can perform statistical meaningfulness tests and which may increase the operationality of the test. The presented method for distinguishing statistically meaningful trends should be reasonably uncomplicated for researchers with basic statistics skills and may thus be useful for determining which trends are worth analysing further, for instance with respect to causal factors. The method can also be used for determining which segments of a time trend may be particularly worthwhile to focus on."

-