Directed Continuous-Time Random Walk with memory

We propose a new Directed Continuous-Time Random Walk (CTRW) model with memory. As CTRW trajectory consists of spatial jumps preceded by waiting times, in Directed CTRW, we consider the case with only positive spatial jumps. Moreover, we consider the memory in the model as each spatial jump depends on the previous one. Our model is motivated by the financial application of the CTRW presented in [Phys. Rev. E 82:046119][Eur. Phys. J. B 90:50]. As CTRW can successfully describe the short term negative autocorrelation of returns in high-frequency financial data (caused by the bid-ask bounce phenomena), we asked ourselves to what extent the observed long-term autocorrelation of absolute values of returns can be explained by the same phenomena. It turned out that the bid-ask bounce can be responsible only for the small fraction of the memory observed in the high-frequency financial data.

mention that recently The European Physical Journal B published a special issue titled "Continuous Time Random Walk fifty years on". The extended introduction to this topical issue by Kutner and Masoliver lists all applications and extensions of CTRW created up to 2017 [2].
In the majority of cases, the analyzed CTRW models focus on the spatial distribution with zero mean or even symmetric distribution. In other words, the drift term is usually neglected. The case of drift was studied in [37] (and references therein). The case of canonical CTRW, where both spatial and temporal distributions are i.i.d. and they do not depend on each other, turns out to be a compelling model, able to describe many cases of normal or anomalous diffusion. Different types of CTRW are obtained if mean waiting time is finite or diverging (but assuming finite variance of the spatial distribution). In the first case, we observe a normal diffusion, in the latter subdiffusion occurs [38]. If the variance of the spatial distribution diverges and waiting time distribution has a finite mean, we obtain the description of Lévy flights.
The other promising branch of CTRW models is the one considering memory, i.e., the dependence between successive jumps. Different types of dependencies were already studied: the backward or forward correlations between spatial jump directions [39] in the case of concentrated lattice gas for the study of the tracer coefficient [40], even taking into account the dependencies over several subsequent jumps [41]. Also, models driven by the negative feedback in consecutive jumps were built, considering one-step memory [35,42] and later two-step or even infinity-step memory [34]. Their potential applications cover the Le Chatelier-Braun principle of contrariness. Memory in waiting times also appeared in some CTRW models [43][44][45][46][47][48]. Examples of used dependencies are correlations which solely depends on the sign of consecutive jumps [43], random walk of waiting times [45,46], exponential and slowly decaying persistent power-law correlations [47].
Our work is directly motivated by the application of CTRW in the description of high-frequency financial data. The universal properties of all financial price time series are sometimes referred to as stylized facts [49,50]. There are two well known stylized facts about autocorrelation of price time series. The first one states that the time-dependent autocorrelation of price increments (or logarithmic returns) is negative and quickly decays to zero [43]. A CTRW model with memory [35] successfully reproduced this fact. The second stylized fact states that autocorre-lation of the absolute value of price increments (or absolute values of log returns) is a positive slowly decaying function. Also, the amplitude in the second case is usually an order of magnitude higher than in the first case. It is the reminiscence of the so-called volatility clustering phenomenon [51]. It seems natural to ask if the CTRW model with memory introduced in [35] adapted to describe absolute values of price changes can successfully reproduce the second mentioned stylized fact. We are answering this question below.
The paper is organized as follows: in Section 2 we present the motivation of our work and define and solve the proper stochastic process. In Section 3 we obtain Velocity Autocorrelation Function (VAF) and in Section 4 the comparison with empirical data is made. The intraday-seasonality is taken into account in Section 5. Finally in Section 6 we conclude with some additional remarks the results presented in this paper.

Model
We construct a directed continuous-time random walk (CTRW) process with assumptions analogical to ones used in [35] but focused on the absolute values of spatial jumps. This process models stock prices, the value of the process at time t represents the stock price at the corresponding time. A change of its value, called jump, is the price change (which happens immediately when transaction occurs). Waiting time can be interpreted as the time between transactions. We consider one-step memory for consecutive jumps and no dependence between waiting times or between waiting times and jumps. To consider modules of jumps, we create a new process based on the original one. We insert jump length modules in the place of jumps. We obtain directed process, where one-step memory for consecutive jumps is given by where H(Rn) and H(Rn|R n−1 ) are respectively distribution of jump modules and conditional distribution of jump modules. Parameter describes the strength of the memory, for = 0 we obtain the model without memory. Considering directed CTRW of absolute values of price changes, Dirac delta describes the same consecutive jumps, not the opposite ones, as it was the case in [35]. To sum up, our model can be described by the probability density functions of nth jump Rn after waiting time tn conditioned on all previous R i and t i : where ψ(t) represents the waiting time distribution (WTD). Results will be presented for any WTD and in two specific cases.
We cannot use the same waiting time distribution for the first jump as for other jumps [52,53]. This is because the previous (preinitial) jump might have occured at any time before t = 0. Therefore, we should define as the waiting time distribution before the first jump. Moreover, for simplicity of notation it is useful to introduce sojourn probability Ψ (t) = ∞ t ψ(t )dt . Above probabilities can be easily expressed in the Laplace domain: where L[·] denotes Laplace transform and t = ∞ 0 tψ(t)dt < ∞ is expected (mean) waiting time. The intermediate dynamic quantity describing the stochastic process is the stochastic, sharp, n-step propagator Qn(X, Rn; t|ξ), n = 1, 2, . . . This propagator is defined as the conditional probability density that the price, which was initially (at t = 0) in the origin value (X = 0) reached by preinitial jump ξ, makes its nth jump by Rn from X − Rn to X exactly at time t.Qn(K, Rn; s|ξ) is sharp propagator in the Fourier-Laplace domain. The recursion relation between two successive sharp stochastic propagators can be written for any form of H(Rn|R n−1 ) and n > 1, as follows: The first sharp propagator Q 1 (X, R 1 ; t|ξ) can be calculated directly from definition The following sharp propagators can be calculated using Eq. (5). After integrating over Rn we obtain the recursion relatioñ (7) Finally, we can write the relation between the soft propagator P (x, t), defined as the probability density that process will be in x at the time t starting from x = 0 at the time t = 0, and the sharp propagator Q(x, t) (in the Fourier-Laplace domain) To obtain explicit formula for the right hand side of Eq. (9), in case of one-step memoru defined by Eq. (1), we use the Z-transform in variable n and recurrence relation (7). The result can be simplit substituted into Eq. (8) and hence we obtain the soft propagator in the following form where S(K; s) = ∞ n=1 (ψ(s) ) n−1H (nK).
As a result, the soft propagator in the Fourier-Laplace domain takes a reasonably simple form, however it still contains the function S which is given as an infinite sum. Fortunately, to compute moments of process and autocorrelation of velocity we need to know the corresponding derivatives of the soft propagator at point K = 0, which can be determined explicitly.
The first and the second moment of the process in the Fourier-Laplace domain arem where M i is the i-th moment of jump modules distribution H(R). The first moment of the directed process in the time space rises linearly in time m 1 (t) = M1 t t, exactly like for the process without memory. It is worth to notice that it does not depend on .

Velocity Autocorrelation Function
In the general case, the velocity autocorrelation function (VAF) in the time domain is given by In the case of the directed CTRW process considered in this manuscript, it takes the form where L −1 [·] is the inverse Laplace transform. To investigate the behavior of VAF in the limits t → 0 and t → ∞, we have to check the behavior in limits s → ∞ and s → 0 of the expressions inside inverse Laplace transforms. It is known that for s → ∞,ψ(s) goes to 0, while for s → 0 the approximationψ(s) ≈ 1 − t s should be used. Therefore, in the limit of long times VAF vanishes and for short times we obtain the variance of the process C(t) ≈ M2 2 t δ(t). Normalized VAF C n (t) has Dirac delta at t = 0 so C n (t) = 2 t

M2 C(t).
To compare our model with empirical data we use two specific WTDs: exponential and double-exponential, with explicit results for both. First one is a simple distribution and its characteristics match stylized facts of financial time series. Second one can be fitted to empirical data with high accuracy [35] and still allow to obtain analitical VAF from the model. Exponential WTD with the mean waiting time equal to t is given as and double-exponential WTD with partial mean waiting times equal to τ 1 and τ 2 and weighting parameter w is given as Mean waiting time of double-exponential WTD is For the exponential WTD, VAF is easily expressed as Although exponential WTD does not describe properly the empirical WTD, one can easily interprete meaning of the parameters. Firstly, for t > 0 VAF is positive (unlike VAF in [35]) and decreases exponentially. Relaxation time increases and the amplitude reduces with longer mean waiting time. Increasing parameter results in higher relaxation time and amplitude, especially for = 0 VAF is non-zero only for t = 0. It is also noticable, that normalized VAF depends only on a ratio between the first moment squared and the second moment of jumps modules. The amplitude of VAF decreases with increase of M .
For the double-exponential WTD, which satisfactorily fits empirical data, normalized VAF is There are three exponents in this formula, except Dirac delta, all with positive amplitudes. The first one is worth mentioning, it does not depend on . It implicates, that for directed processes VAF can be non-zero even in the case without memory ( = 0). That effect does not occur while considering VAF of the original process.
In the limit when two-exponent WTD goes to exponential WTD (w → 0 or 1) this element vanishes. Two other exponents depend on and describe decaying with different rates. Similarly like for exponential WTD, increasing results in higher VAF. In the case of spatial changes with zero variance (M → 1), these terms are equal to zero.

Empirical results
To compare our model with empirical data, we use tick-by-tick transaction data from Polish stock market (Warsaw Stock Exchange) from years 2011-2012. Presented results are calculated for KGHM -one of the most liquid stocks. We extract waiting times (periods between transactions) and jumps (price changes) from this data. Comparing the model with empirical data requires estimating parameters. We obtain τ 1 , τ 2 , w from fitting two-exponential WTD to empirical histogram using least squares method. We calculate two first moments of price changes absolute values M 1 and M 2 explicitly from the empirical distribution. Parameter is calculated as one-step autocorrelation of price changes absolute values. Empirical VAF was calculated using the method described in [35]. We want to remind that VAF obtained from the model proposed in [35] (and its modifications in [34,54]) built using these parameters fits satisfactorily with empirical data. As shown in Fig. 1 theoretical approach does not explain observed VAF for the modules of price changes. VAF of the directed process decays much slower than VAF of the original one (see [35]). There can be many reasons explaining obtained disagreement: daily seasonality, long-term jump modules dependencies and long-term waiting times dependencies (see Fig. 2). In the next section, we check if taking into account of the first one (daily seasonality) can significantly improve the quality of the description of data. Taking into account the two later cases reacquire a new CTRW models with memory and goes beyond the scope of this article.

Nonstationarity
Varying mean inter-trade time during trading session is a stylized fact observed on stock prices on every market [50,55,56]. This intra-day pattern, often called the "lunch effect", is characterized by low volatility and long inter-trade times in the middle of the day. On the contrary, activity on the stock market is higher at the beginning and the end of a trading session. This effect influences the VAF of the process, as described in [54], where the general formula for the impact of this phenomenon is given. Following [54] we describe the daily pattern with the rational function where θ(t) can be interpreted as varying mean of the waiting times distribution during a trading session. Now, we can obtain an explicit expression for normalized  VAF taking the seasonality into account: where T is the length of a day, parameters p and q are fitted to data and come from the rational form of day seasonality and erf is the error function. As shown in Fig. 1, taking nonstationarity into account slightly improves the results. However, considering the day seasonality is not enough to explain empirical VAF for jump modules.

Conclusions
We proposed and solved Directed CTRW model with one-step memory in jumps and obtained the analytical equation for propagator, first two moments and velocity autocorrelation function (20). Obtained VAF shows interesting properties: it is positive; it decays exponentially but slower than the VAF for the non-directed process; VAF can be nonzero even without any memory ( = 0) for non-exponential WTD. Next, we considered nonstationarity in the form of rational function (21) and obtained analytical VAF (22).
Presented simple model, despite being analytically solvable, turned out to be unable to describe empirical data. This result suggests that simple bid-ask bounce phenomenon is not sufficient to explain long memory in financial time series and volatility clustering. We suggest that taking into account at least one of the existing long memories in jumps modules or waiting times (see Fig. 2) would improve the results.