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



Rigorous definition, detection and test for trending vs. mean-reverting behaviour of stochastic processes
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.


