Local order and predictability of financial time series
In this series of posts I will discuss an implementation and tests of the paper Local order, entropy and predictability of financial time series by L. Molgedey and W. Ebeling. (pdf)
The paper presents an excellent application of information theory to time series analysis. The idea is simple: is it possible to find sub-trajectories in financial time series (here the daily returns of some indices or stock) where a "local order" exists with higher than average predictability.
I won't explain the paper in full, so please have a look at the pdf above for notation and details. However I will describe the most important concepts below. We consider one-dimensional, discretely partitioned time series. The authors use Shannon entropy H as basic tool to measure uncertainty or predictability of the probability distribution described by the time series. For a certain trajectory of length n the uncertainty of predicting the next state is the difference in Shannon entropies for trajectories of length n+1 and n:
Let be the total length of the time series, let
be the length of the alphabet and
is a specific subtrajectory of length
.
Further, is the probability to find a subtrajectory with the letters
in the complete time series. Then the entropy is simply
Notice here that we take the logarithm of base , so the quantities are not measured in the more conventional bits. As described above from the conditional entropy
we define the average predictability as
Clearly, since we consider units, the maximum uncertainty is
. Also we can deduce that
which is intuitively understandable as: the more I know the less uncertainty there can be, unless of course every observation was completely independent, where the equality would apply.
Next, the paper describes the "local uncertainty" measure as the uncertainty of the next symbol given the observation of specific symbols . The authors write it as
Notice that this almost coincides with the conditional entropy except that it leaves out the weighting factor of
, thus it's not an averaging measure but a local one. The function
will be the main measure we apply to our time series.
Partitioning
As a next step we need to partition the real valued data of the time series into discrete symbols. First we take the daily logarithmic prices changes of some stock :
The returns now need to be partitioned into symbols
of an alphabet with length
. The optimal choice of partitioning is a whole other question, but for now we just assume that it doesn't matter. The paper uses for
and partitions Dow Jones daily returns with the following thresholds:
This is obviously different for every stock we look at and needs to be chosen depending on its basic statistics (skew, mean).
A randomly chosen snippet of a trajectory then might look like the string 0112012220201.
This is all we need to know for our implementation, which will be described in the next post of this series.