Survey on log-normally distributed market-technical trend data

In this survey, a short introduction in the recent discovery of log-normally distributed market-technical trend data will be given. The results of the statistical evaluation of typical market-technical trend variables will be presented. It will be shown that the log-normal assumption fits better to empirical trend data than to daily returns of stock prices. This enables to mathematically evaluate trading systems depending on such variables. In this manner, a basic approach to an anti cyclic trading system will be given as an example.


Introduction
The concept of a trend has been fundamental in the field of technical analysis since Charles H. Dow introduced it in the late 19th century. Following Rhea [13], Dow said e.g. concerning the characterization of up-trends: Successive rallies penetrating preceding high points, with ensuing declines terminating above preceding low points, offer a bullish indication.
In Figure 1.(a) an example of the inverse situation is given, i.e. a down-trend in a historical setup like Dow used it. Although this is so far "just" a geometrical idea and clearly not precise at all, it is widely accepted among many market participants. Therefore, this geometric idea is fixed by the following market-technical definition of a Dow-trend as which it is also used in this article: Definition 1 (market-technical trend or Dow-trend). A market is in up/down-trend if and only if (at least) the two last relevant lows (denoted by P1 and P3 in an up-trend) and highs (denoted by P2 in an up-trend) are monotonically increasing/decreasing (see Figure 1.(b)). Otherwise, the market is temporarily trendless. In case of an up-trend the phase between a low and the next high is called the movement. In the same manner, the phase between a high and the following low is called the correction. In case of a down-trend, movement and correction are defined in the exact opposite way.
(a) Example of a down-trend in a historical setup like Dow used it (freely adapted from Russel, [14]).  recognition of relevant minima and maxima in charts. With that at hand empirical studies of trend data can be made as seen in [2] and [3]. On the one hand, in [2] Hafizogullari, Maier-Paape and Platen have collected several statistics on the performance of Dow-trends. On the other hand, in [3] Maier-Paape and Platen constructed a geometrical method on how to detect lead and lag when two markets are directly compared -also based on the automatic detection of relevant highs and lows.
In this article, however, we want to pursue a different path. We are interested in several specific trend data such as the retracement and the relative movement and correction. Since these trend data are central for the whole paper, we here give a precise definition.
The first random variable describing trend data which will be important in the following is the retracement denoted by X. The retracement is defined as the size-ratio of the correction and the previous movement, i.e.
Hence, in case of an up-trend this is given by: Another common random variable is the relative movement which for an up-trend is defined by the ratio of the movement and the last low, i.e.
M := M ovement last Low = P 2 − P 3 P 3 (2) and the relative correction which for an up-trend is defined as the ratio of the correction and the last high, i.e.
In case of a down-trend all situations are mirrored, such that: The main scope of this survey is to collect and extend results on how the above defined trend variables (plus several other related ones) can be statistically modeled. By doing this the log-normal distribution occurs frequently. Evidently, the log-normal distribution is very well known in the field of finance. We start off, in section 3, by giving a mathematical model of the retracement during Dow-trends and the delay of their recognition. Furthermore, the duration of the retracements and their joint distribution with the retracement will be evaluated. The results on relative movements and relative corrections during trends will be presented in section 4. In section 5 it will be demonstrated how the so far gained distributions of trend variables may be used to model trading systems mathematically. It will be evident, that the described trend data mostly fit very well to the log-normal distribution model, although there are significant aberrations for the duration of retracements (see subsection 3.2). In the past there have been several attempts to match the log-normal distribution model to the evolution of stock prices. It already started in 1900 with the PhD Thesis of Louis Bachelier ([8]) and the approach to use the geometric Brownian motion to describe the evolution of stock prices. This yields log-normally distributed daily returns of stock prices. Nowadays, the geometric Brownian motion is widely used to model stock prices (see [15]) especially as part of the Black-Scholes model ( [10]). Nevertheless, it has to be noted that empirical studies have shown that the log-normal distribution model does not fit perfectly to daily returns (e.g. see Fama [4], [5] who refers to Mandelbrot [6]).
Overall, we got the impression that most of the trend data we describe here fit better to the lognormal distribution model than daily returns of stock prices, although it would be beyond the scope of this paper to do a formal comparison. In any case, the here observed empirical facts of trend data contribute to a complete new understanding of financial markets. Furthermore, with the relatively easy calculations based on the link of the log-normal distribution model to the normal distribution, actually complex market processes can now be discussed mathematically (e.g. with the truncated bivariate moments, see Lemma 1.21 in [9]).

Detection of Dow-trends
The issue of automatic trend-detection has been addressed by Maier-Paape [1]. Clearly, the detection of relevant extreme points is a necessary step to detect Dow-trends. Fortunately, the algorithm introduced by Maier-Paape allows automatic detection of relevant extreme points in any market since it constructs so called MinMax-processes.
Definition 2 (MinMax-process, Definition 2.6 in [1]). An alternating series of (relevant) highs and lows in a given chart is called a MinMax-process.
In Figure 3 two automatically constructed MinMax-processes are visualized by the corresponding indicator line. The construction is based on SAR-processes (stop and reverse).

Definition 3 (SAR-Process
). An indicator is called a SAR-process if it can only take two values (e.g. −1 and 1 which are considered to indicate a down and an up move of the market respectively).
Generally speaking, Maier-Paape's algorithm looks for relevant highs when the SAR-process indicates an up move and searches for relevant lows when the SAR-process indicates a down move. Thus, the relevant extrema are "fixed" when the SAR-process changes sign. By choosing a specific SAR-process one can affect the sensitivity of the detection while the actual detection algorithm works objectively without the need of any further parameter. For more information see [1]. Maier-Paape also explains how to handle specific exceptional situations, e.g. when a new significant low suddenly appears although the SAR-process is still indicating an up move.
It is shown by Theorem 2.13 in [1] that for any combination of SAR-process and market there exists such a MinMax-process which can be calculated "in real time" by the algorithm of Maier-Paape. Based on any MinMax-process in turn it is easy to detect market-technical trends as defined in Definition 1 and then use this information for automatic trading systems as outlined in Figure 2.
Calculating the MinMax-process "in real time" means that as time passes and the chart gets more and more candles, the extrema of the MinMax-process are constructed one by another. Besides the most recent extremum which is being searched for, all extrema found earlier are fixed from the moment of their detection, i.e. when the SAR-process changed sign.
Thus, applying the algorithm in real time also reveals some time delay in detection. Obviously, the algorithm can not predict the future progress of the chart it is applied to. Consequently, some delay is needed indeed to evaluate the significance of a possible new extreme value. This circumstance is crucial when considering automatic trading systems based on market-technical trends. Therefore, it also has to affect any mathematical model of such a trading system. An approach to this issue can be made by considering the delay as an inevitable slippage. This means, not the time aspect of the delay but more likely the effect it has to the entry or exit price in any market-technical trading system will be evaluated. In particular, the absolute value of the delay d abs is given by with P [0] indicating the last detected extreme value and C[0] the close value of the current bar when this extreme value got detected. For this article the MinMax-process together with the integral MACD SAR-process (moving average convergence divergence, see p. 166 in [16]) was used. The integral MACD SAR (Definition 2.2 in [1]) basically is a normal MACD SAR which in turn indicates an up move if the so called MACD line is above the so called signal line. Otherwise, it indicates a down move. The MACD line is given by the difference of a fast and a slow (exponential) moving average. The signal line then is an (exponential) moving average of the MACD line.
Consequently, the MACD usually takes three parameters for the fast, slow and signal line (standard values are: fast=12, slow=26, signal=9). To reduce the number of needed parameters from three to one scaling parameter only, the ratios of the standard parameters are fixed and consequently scaled by the scaling parameter. In particular, a MACD with scaling parameter 2 denotes a usual MACD with the parameters (24/52/18). This way, the sensitivity of the MinMax-process solely corresponds to one scaling parameter (see Figure 3).
For a given MinMax-process it is easy to decide the start and end of a market-technical trend for the candle the trend is initialized and ends in, respectively. The computation of several trend variables such as the retracement is then obvious.
The automatic detection of Dow-trends and in particular the possibility to deduce a MinMaxprocess out of any market given by candle data enables to create a large dataset of empirical trend variables. The model will be based on empirical data acquired by the MinMax-process based on the integral MACD with scaling variables 1, 1.2, 1.5, 2 and 3 applied on all stocks of the current S&P 100 and Eurostoxx50 in the period from January 1989 until January 2016.  3 Retracements

Distribution of the Retracement
For all combinations of the regarded scalings and markets, the measured retracement data shows the same characteristic distribution as seen in Figures 4 and 5. Indeed, they show the typical asymmetric characteristic of a log-normal distribution which density is given by: for the retracement X and with the (true) parameters µ and σ. It is well known how to calculate moments of log-normally distributed random variables. In this particular context, the median of the distribution X equals e µ and the mean is given by To evaluate this distribution assumption the maximum-likelihood-estimators (MLE) denoted by (μ,σ) for the log-normal distribution are computed: with x i denoting the n measured retracements. Furthermore, the p-value calculated with the Anderson-Darling test (recommended EDF test by Stephens in [11], chapter "Test based on EDF statistics") being applied to the logarithmic transformed data is checked. The such obtained values are summarized in Table 1.
(a) S&P 100 data (b) Eurostoxx50 data Table 1: Parameters of the log-normal fit for the retracement X in up-and down-trends.
The inconsistent p-values reveal that the log-normal model does not fit perfectly to the measured retracement data. In fact, all histograms show a slightly sharper density for the measured data with different intensities. Consequently, for higher retracement values the log-normal model predicts slightly less values than actually observed. Besides this small systematical aberrations the log-normal model maps the measurement very well -especially for the Eurostoxx50. On top of that, the lognormal model obviously fits much better to the retracement distribution than to for instance daily returns of stock prices (see Fama [4]).
To conclude the evaluation of the retracement alone, a fundamental observation about the retracement can be made (based on the log-normal assumption and the fit values derived from the data).
Observation 1 (Log-Normal model for the retracement). The parameters µ and σ of the lognormal distribution are more or less scale invariant for the retracement. In case of an up-trend, the parameters are also market invariant.
Furthermore, the parameter µ is affected by the trend direction. It is larger for down-trends, i.e. the retracements in down-trends are overall more likely to be larger as in up-trends. In spite of that, the parameter σ is more or less invariant of the trend direction.

Delay after a Retracement
As already mentioned, the delay of the MinMax-process is inevitable. Therefore, it will be evaluated in the same way as the retracement. In order to be able to compare the delay d abs after a retracement is recognized (as defined in (4)) with the retracement X itself, both must have the same unit. So, the delay will also be considered in units of the last movement. It will be denoted as random variable D X : It should be noted that (at this point) there is no statement made on whether or not D X may somehow depend on the preceding retracement X. The notation with subscript X is only used to denote the delay after a retracement and to distinguish it from other delays to come. Again, the measured delay data shows the characteristic of a log-normal distribution for each combination of scaling and market as exemplarily shown in Figure 6 significant p-values in Table 2 -the log-normal assumption is definitively wrong. The histograms (a) S&P 100 data (b) Eurostoxx50 data show a systematical deviation in regard to skewness. The measured delays have a less positive skewness than predicted by the model. Besides this systematical aberration the log-normal model maps the characteristic of the measured delay well enough such that it will be used for the following analysis.
The retracement and the delay can be considered as one sequence. We therefore look for a combined log-normal distribution of retracement and delay. In this context it is important to evaluate the estimator of the correlation ρ between the logarithm of the two variables, i.e.
The estimated values ofρ are given in Table 3. It shows, that the (a) S&P 100 data (b) Eurostoxx50 data Table 3: Correlation between the logarithms of the retracement and delay (after retr.) in up-and down-trends.
retracement and the following delay are indeed positively correlated (regarded in the same units). This way it is possible to give a joint bivariate log-normal distribution for the retracement X and the delay D (both in units of the preceding movement) by virtue of its density function.
For calculations based on this distribution, the (true) parameters µ X , µ D , σ X , σ D and ρ must be replaced by their estimators. Finally, the concluding observation regarding the retracement can be expanded by the delay part.
Observation 2 (Log-Normal model for the retracement and delay). The parameters µ and σ of the log-normal distribution are more or less scale invariant for the retracement and the delay. In case of an up-trend, the parameters are also market invariant. Furthermore, the parameter µ is affected by the trend direction. In case of the retracement it is larger for down-trends whereas it is smaller for down-trends in case of the delay. In spite of that, the parameter σ is more or less invariant of the trend direction.
Finally, the correlation between the logarithms of the retracement and the delay are close to scale and market invariant while the correlation in up-trends is significantly larger than in down-trends.

Fibonacci Retracements
A propagated idea in the field of technical analysis for dealing with retracements is the concept of so called Fibonacci Retracements. Based on specific retracement levels derived from several powers of the inverse of the golden ratio one wants to make a priori predictions for future retracement values. Obviously, this assumes that there are such significant retracement values. However, the evaluation of the retracement above reveals that there are no levels with a great statistical significance but the 9 retracements follow a continuous distribution overall. Even a finer histogram as shown in Figure 7 does not reveal any significant retracements.
On the assumption that there are specific values with statistical significance in some regard, then the 100%-level would be most significant. For a closer look on significant retracement levels see [7].

Duration of the Retracement
Beside the retracement, the duration of a trend correction denoted by Y is also of interest. It is given by the difference in trading days between the last P 2 and the new P 3 (see Figure 1.(b)). The distributions of the retracement duration overall show the asymmetric log-normally-like behavior as exemplarily shown in Figure 8. However, the goodness of the log-normal assumption is obviously worse as in the case of the retracement itself. In particular, the measured densities of the retracement duration in a down-trend all show significant aberrations from the log-normal model. Since every retracement value is associated with a duration, the joint distribution of the retracement and its duration can be examined (see Tables 4 and 5). Figure 9 exemplarily shows that the retracement in down-trends tends to have higher values as in up-trends. This was already seen in Table 1 and Observation 1. However, Figure 9 exemplarily also shows that the retracement in down-trends has larger durations compared to the retracement in up-trends.
(a) S&P 100 data (b) Eurostoxx50 data Table 4: Parameters of the log-normal fit for the retracement duration in up-and down-trends.

Distribution of Relative Movements and Corrections
As before, all of the measurements show the same characteristic distribution -whether relative movement (2) or relative correction (3). As before, the histograms conclude the log-normal assumption (see Figure 10). Again, the log-normal model does not match the measured data perfectly, but often fails to map the sharp peaks and fat tails. This observation is confirmed by the fluctuating p-values (see Table 6 and 7). Consequently, based on the results of Table 6 and 7 a fundamental observation can be made which differs from the retracement's one.
Observation 3 (Log-Normal model for the rel. movement/correction). The parameters of the log-normal distribution µ and σ are market invariant for the relative movement and correction. Furthermore, the σ parameter is more or less scale invariant while µ increases for increasing scaling for the relative movement and correction, i.e. the relative movement and correction are more likely to be larger for higher scaling parameter.
The parameters µ and σ are also more or less trend direction invariant for the relative movement. In case of a relative correction, however, the direction of a trend affects these parameters: Both are larger in case of a down-trend.
The dependency between the µ parameter and the scaling has already been expected as outlined above. Obviously, higher scalings yield more significant movements and corrections. Therefore, to reflect this, the x-position of the density peak has to increase when the scaling increases. The dependency of the µ parameter on the trend direction has already been observed for the retracement (see Observation 1).

Delay after relative Movements and Corrections
As before, the delay d also has to be taken into account. Its absolute value is given by d abs = |(new extremum) − (Close when new extremum is subsequently detected)| as defined in (4). Here, the unit for the delay is the last extreme value. This means for up-trends, the delay after the relative movement is given by while the delay after the relative correction is given by (a) S&P 100 data (b) Eurostoxx50 data Table 5: Correlation between the logarithms of the retracement and its duration in up-and down-trends.  (a) S&P 100 data (b) Eurostoxx50 data Table 6: Parameters of the log-normal fit for the relative movement in up-and down-trends.
(a) S&P 100 data (b) Eurostoxx50 data Table 7: Parameters of the log-normal fit for the relative correction in up-and down-trends.
In both cases, it is sometimes abbreviated as the relative delay and has the same unit as the relative movement (2) and relative correction (3), respectively. Eventually, as shown in Figure 11 the relative delay inherits the same characteristics as known from the delay for the retracement. As before, the model's skewness is slightly too positive. Consequently,  the conclusion is also the same. The model matches the measurements well enough to be the base for further analysis. The evaluation results for the relative delay are shown in Tables 8 to 11. It reveals the same behavior of the model parameters as already seen for the relative movement and correction. Furthermore, the knowledge of the correlations (Tables 10 and 11) enables joint considerations of the (a) S&P 100 data (b) Eurostoxx50 data Table 8: Parameters of the log-normal fit for the relative delay D M after a movement in up-and down-trends.
(a) S&P 100 data (b) Eurostoxx50 data Table 9: Parameters of the log-normal fit for the relative delay D C after a correction in up-and down-trends.
(a) S&P 100 data (b) Eurostoxx50 data Table 10: Correlation between the logarithms of the relative movement M and relative delay D M in up-and down-trends.
(a) S&P 100 data (b) Eurostoxx50 data Table 11: Correlation between the logarithms of the relative correction C and relative delay D C in up-and down-trends.
relative movement/correction and the relative delay with the joint distribution (5). In sum, this leads to the following expansion of Observation 3.
Observation 4 (Log-Normal model for the rel. movement/correction with delay). The parameters of the log-normal distribution µ and σ are market invariant for the relative movement and correction as well as their corresponding relative delays. Additionally, for these trend variables the σ parameter is more or less scale invariant while µ increases for increasing scaling. The parameters µ and σ are also more or less trend direction invariant for the relative movement (Table 6). In case of the relative correction, however, the direction of a trend affects these parameters: Both are larger in case of a down-trend (Table 7). This is also true for the relative delay after a correction (Table 9). For the relative delay after a movement µ is also larger whereas σ is smaller for down-trends (Table 8).
Finally, the correlation between the logarithms of the relative movement/correction and the corresponding relative delay is close to scale invariant.

Period of Movements and Corrections
The dependency between µ and the scaling parameter has already been explained with their connection to the level of trend significance (Observation 3). One attribute of trend significance is the duration of a single trend period, hence the time difference between two lows and two highs within the up-and down-trend, respectively. It is called the period T of a trend. Figure 12.(a) shows the evolution of T regarding different scaling parameters. Here, for any scaling the T value is the arithmetical mean of all time differences between two consecutive lows and highs within up-and down-trends, respectively. The period T shows a linear behavior which has already been observed in [2] for EUR-USD Charts. The fit parameters are similar for both evaluated markets but differ in regard to the type of trend (see Figure 12.(b)). Due to the linear model it is evident how to set the scaling parameter to emphasize a specific period. Consequently, it is also easy to map any of the three different trend classes introduced by Dow -namely the primary, secondary and tertiary trend (see Murphy, chap. "Dow Theory" in [12]).

Mathematical Model of Trading Systems
Based on the log-normal distribution model of the retracement an anti cyclic trading system can be modeled for instance. With the joint density of the retracement and delay the return of a basic anti cyclic trading system as shown in Figure 13 can be calculated: Lemma 1 (Expected return). Let an anti cyclic trading system as shown in Figure 13.(a) with entry in the correction at retracement level a, target t be given. As soon as the end of the correction is recognized the position is closed with delay d. Furthermore, the return (in units of the last movement) for a trade with retracement x and delay d denoted by R(x, d) is given by Moreover, the distribution of the random variable for the retracement X and for the delay after the the retracement D = D X are known from section 3. That is the reason why, the expected value of this return, considering only retracements where the trade is opened (condition X ≥ a), is given by with F X (x) = P(X ≤ x) denoting the distribution function of the retracement X (see section 3).
It should be noted, that a and t are parameters which have to be given in the same units as the retracement, i. e. units of the last movement.
(a) Parameters a and t with exemplary realizations of the retracement X and delay d.
(b) Entry at trend begin and following stop at last low. In the same manner, several other key figures such as variance of the return can be calculated analytically assuming the empirically observed distributions as real. In this way, a bad chance to risk ratio for the anti cyclic trading model has been revealed (see [9]). This is, however, in accordance with empirical observations of backtests of that strategy.

Conclusion and Outlook
In this survey the applications of the log-normal distribution model on market-technical trend data is introduced. On the one hand, it is remarkable that the log-normal model obviously fits better to the trend data presented here than to daily returns of stock prices. In contrast to the approach to daily returns of stock prices, however, there has not been found an explanation for this observation yet. In particular, it has not yet been clarified whether the log-normal distribution is a result of a limit process or can be explained with the log-normal model for the daily returns of stock prices. As far as applications in the direction of modeling of trading systems are concerned, we introduced a simple model for an anti cyclic trading setup based on log-normally distributed data.
On the other hand, trend following, i.e. pro cyclic trading systems are more widely used than anti cyclic ones. In fact, empirical backtests have already shown the profitability of such trading systems. Consequently, there is a need for a mathematical model. Unfortunately, pro cyclic trading usually implies holding a position over several iterations of movement and correction as outlined in Figure 13.(b). This makes the problem far more complicated in mathematical terms since the joint distribution of a random number of relative movements and corrections -with possible correlations -has to be considered. Nevertheless, the log-normal model for the trend data represents a promising approach to this issue as well.