Parrondo-like behavior in continuous-time random walks with memory

The Continuous-Time Random Walk (CTRW) formalism can be adapted to encompass stochastic processes with memory. In this article we will show how the random combination of two different unbiased CTRWs can give raise to a process with clear drift, if one of them is a CTRW with memory. If one identifies the other one as noise, the effect can be thought as a kind of stochastic resonance. The ultimate origin of this phenomenon is the same of the Parrondo's paradox in game theory

In the most ubiquitous version of the CTRW formalism [26][27][28][29] the magnitudes of the steps (or jumps) and the time intervals between them (also called sojourns) constitute a two-dimensional set of independent and identically distributed (i.i.d.) random variables. While in many cases this is a convenient assumption, there are also examples in which correlations between consecutive step sizes and/or waiting times must be compulsorily considered. For instance, it has been reported the dependence that shows the seismic recurrence time on the magnitude of the last earthquake [12], or in the field of quantitative finance (to which the author has devoted a significant amount of his previous scientific activity) it is well known [30] that the i.i.d. assumption is no longer valid when the market is observed at the atomic level : At this scale one typically finds that price changes are negatively correlated [23,31].
A plausible mechanism that (at least in part) explains the presence of this correlation is the so-called "bid-ask bounce." Financial markets are normally double-auction markets where potential buyers and sellers simultaneously submit their bid and ask prices, the limit orders, to the market. In the most common situation, limit orders do not match previous limit orders (bid prices are lower than ask prices) and thus they are not executed, but * E-mail: miquel.montero@ub.edu recorded in the limit-order book. In fact, transactions are completed usually only after a market order (an order for buying or selling at the best available price) is introduced into the market. The random alternation in the arrival of buy and sell market orders makes that the last traded price bounces back and forth from the cheapest demand price to the highest offer price of the book. Thus, as long as bid and ask prices do not vary, consecutive price changes will show negative correlation.
All these empirical evidences encouraged the development of a new class of CTRWs based on the premise that the size of jumps and sojourns should depend on the previous values of these magnitudes [32]. The precise way in which the memory is introduced into the formalism is by demanding that the process increments satisfy the Markov property, what renders the problem tractable. In general, these processes can be easily connected with the broad family of the Markovian renewal processes [33] and, in particular, the CTRW with memory that we are going to analyze here is very alike to a Markov chain with rewards [34], 1 a random game with heterogeneous payouts that may exhibit the Parrondo's effect .
The Parrondo's effect or paradox [35] is a counterintuitive feature that appears when two negatively biased (losing) games are combined to produce a positively biased (winning) game. This sort of games, first devised by J. M. R. Parrondo, has played a very relevant role in understanding the intriguing behavior shown by many physical systems, wherein the addition of disorder can lead to the emergence of some kind of order. This is the case of Brownian-ratchet related problems [36,37], but Parrondo's games may have further implications in very diverse fields, as genetics [38] or finance [38,39].
In the original Parrondo's setup, the system under con-1 Two main aspects distinguish CTRWs with memory from Markov renewal processes or Markov chains with rewards. In the first place, our jump sizes may take continuous values whereas the state space of a Markov chain is usually finite. In the second place, here the Markov property is satisfied not by the process but by the random jumps. However, in the case that memory does not affect the random occurrence of the time changes, the problem may recover the Markovian nature just by increasing the dimension of the process. sideration had to show some degree of spatial inhomogeneity [35], but further developments (partially) avoided this requirement by the inclusion of memory [40][41][42], sometimes in a sophisticated (non-Markovian) way [43]. In our case, by contrast, we have reproduced the Parrondo's effect by means of a single, one-dimensional Markovian jump process, what represents up to our knowledge the first appearance of the paradox within the context of the CTRW. The article is organized as follows: In Sec. II we recall the traditional CTRW formalism based on the assumption of the independence between events. In Sec. III we outline the fundamentals of the CTRWs with memory introduced in Ref. [32], and devote a special attention to the case in which the correlation only affects the sign of consecutive jumps. Section IV contains the main contribution of the paper, the proof that within the framework of the CTRWs with memory the mixture of two negatively biased processes may lead to a positively biased one. The paper ends with Sec. V where conclusions are drawn, and future perspectives are sketched.

II. CTRWS WITHOUT MEMORY
Let us begin with a short review of the theory of CTRWs, for a more detailed explanation see e.g. [25]. The CTRW X a (t) is a stochastic process that, at random instants of time, 0 = t 0 ≤ t 1 ≤ · · · ≤ t n−1 ≤ t n , suffers random changes or jumps of magnitude J n , where θ(u) = 1 for u ≥ 0, and zero otherwise. In the simplest version of the formalism, the time intervals between consecutive changes, τ n ≡ t n − t n−1 , and the random jumps are independent and identically distributed random variables, characterized by their corresponding probability density functions (PDFs) ψ a (·) and h a (·), Henceforth we will use either X a (t) or the term "process A" whenever we want to refer to a CTRW that satisfies these requirements.
Let us introduce now the propagator p a (x, t), the transition probability of the process, which follows a renewal equation [44], thanks to the spatial and temporal invariance that the i.i.d. assumption brings to the problem -at least just after a jump. It is well known that one can solve in a straight way Eq. (1) for any choice of ψ a (·) and h a (·) in the Fourier-Laplace domain: where here and hereafter the hat and/or the tilde over a function denotes its Laplace and/or Fourier transform with respect to its time and/or space variable, e.g.
Then, the computation of p a (x, t) reduces to the inversion of Eq. (2). To do this, however, the functional forms of ψ a (·) and h a (·) must be given. We will consider the issue of the waiting-time density in the first place: A CTRW cannot be a Markov process unless the time intervals between jumps are exponentially distributed. Such a lack of Markovianity would affect for instance the definition of the propagator and the scope of validity of Eq. (1). The result is still tractable but, for a matter of simplicity in the modeling (and in the mixing) of the processes, we will simply consider that the number of changes (irrespective of the CTRW under consideration) is Poisson distributed, i.e., that the waiting-time PDF is always The choice of h a (·) is a far less delicate question. We could proceed without specifying the functional form of the jump-size distribution, but this would obscure most of the expressions in the forthcoming Sections, in particular the intermediate results. Thus, to prevent some key aspects from being buried by the mathematical terminology, we have decided to sacrifice a bit of generality for the sake of clarity, but without falling into an extreme simplicity: we have chosen that the jump sizes follow an asymmetric double exponential law, 2 where the parameter q 0 ∈ [0, 1] gives us the probability of having a non-negative jump, whereas γ 0 > 0 and η 0 > 0 are the inverses of the mean values of the absolute jump sizes in the upward and downward direction, respectively. After all the above premises, Eq. (2) readŝ The explicit knowledge of the previous characteristic function allows us to compute the mean value of the process, µ a (t), in a simply way, sincê and finally, after the Laplace inversion where we have defined which is just the mean value of the jump sizes, In fact, one can easily prove that this result is valid for any choice of h a (·), provided that the mean value µ 0 does exist.
Returning to the case we are analyzing in detail, Eq. (5) shows that one will obtain an unbiased process (µ 0 = 0) whenever one imposes on the positive parameters q 0 , γ 0 , and η 0 the constraint which is always feasible.

III. CTRWS WITH MEMORY
We will consider now a second process, the process B, a CTRW that belongs to the class of processes introduced in [32]. The main idea behind the work developed in this reference is the following: one can introduce memory effects into the framework of the CTRW without paying a too high price by demanding to the jump sizes J n that satisfy the Markov property, In such a case the process itself is not Markovian, but even then one can derive renewal equations for the propagator, conditioned to the last-known jump value, Perhaps the simplest approach that one can adopt to introduce this kind of short-ranged memory is through persistence [43,47,48], i.e. that the dependence of the process on the previous history is restricted to the lastjump sign: a model that, in spite of its simplicity, is of applied interest. For instance, there are evidences that suggest that a model of this kind is precise enough to describe with good accuracy the behavior of highly traded equities [23].
For the same reasons given in the previous Section, we will assume here that the conditional distribution of the jumps are two asymmetric double exponential functions: with q 1,2 ∈ [0, 1], and γ 1 , η 1 , γ 2 , and η 2 positive.
In concordance with (8), the conditional propagator p b (x, t|υ) can be reduced to two different functions depending on whether the previous change of the process had a positive sign, p b (x, t|+), or a negative sign, p b (x, t|−). 3 As we have stated above, we can write down renewal equations for these magnitudes: specifically a set of two coupled Volterra integral equations of the second kind, and We may explain how Eqs. (9) and (10) were derived by analyzing their common three-piece structure. The first term in both expressions takes into account the possibility that the process remains unchanged throughout the time interval t. In the second and third terms at least an event occurred at time t ′ , 0 ≤ t ′ ≤ t: the difference among these two contributions comes from the fact that, in the second term the jump was upward, ξ > 0, and the process renews from that point, p b (x−ξ, t−t ′ |+), whereas in the third term the jump was downward, ξ < 0, and therefore the subsequent propagator is p b (x − ξ, t − t ′ |−). Note that Eq. (9) will differ from Eq. (10) as long as h 1 (·) is not coincident with h 2 (·).
To solve the posed problem we will resort back to the Fourier-Laplace transform. The two integral equations (9) and (10) turn into a set of two algebraic equations when moved into the Fourier-Laplace domain, whose solution readŝ We can now compute the unconditional transition PDF, where β is the likelihood that a given jump takes the positive sign, which follows from the total probability theorem: The unconditional mean value of the process can be obtained from the differentiation of (14) with respect to ω, for ω = 0, and reads in the Laplace domain: where we have denoted by µ 1 and µ 2 the first moments of the PDFs h 1 (·) and h 2 (·) respectively, The inverse Laplace transform of (16) is straightforward and yields and therefore process B will become unbiased whenever Like in (7), condition (18) can be met by selecting q 1 and/or q 2 in a proper way. For instance will remove the bias from process B for any choice of q 1 , γ 1 , η 1 , γ 2 and η 2 , provided that γ 2 ≤ η 1 . If γ 2 > η 1 , one must request q 1 to satisfy the supplementary constraint: Let us conclude the analysis of process B by noting that the result in (17) is more general than what it could be presumed. The expression is still valid if one considers any alternative for the PDFs h 1 (·) and h 2 (·) in (8), with the sole condition that their mean values µ 1 and µ 2 are bounded. One must be aware, however, that expression (15) for β should be recomputed.

IV. ALTERNATION OF PROCESSES
In this Section we will analyze the outcome of the combination of the two previous processes, A and B, what will lead to the new process AB, a process that also belongs to the class of CTRWs with memory. To do this, we will assume that the mixing procedure is random: we will have a probability r that the next process increment follows Eq. (3) and 1 − r that the change is driven by Eq. (8). 4 The renewal equations for the conditional propagators have a structure that is very similar to that in Eqs. (9) and (10), but where h b (ξ|υ) has been replaced by namely The solution of the new posed problem in the Fourier-Laplace domain also mimics Eqs. (11)-(13), and ∆(ω, s) = λ 2 s λ As in the previous Section, we can recover the unconditional propagatorp(ω, s) by means ofp(ω, s|±), p(ω, s) = αp(ω, s|+) + (1 − α)p(ω, s|−), (20) and the new stationary probability of having a positive change, α. This probability is now the result of the combined effect of the two individual processes: One more time we will differentiate Eq. (20) and obtain eventually the unconditional mean value of the process AB, which is not the linear superposition of the individual mean values of processes A and B, unless α = β. The ultimate origin of this non-linearity lies in the fact that, as Eq. (19) shows, the correlation of process B is affected by the inclusion of process A. Therefore, even in the case in which µ a (t) = 0, µ b (t) = 0, the composite process will exhibit a clear drift if α = β, as it can be seen in Fig. 1, where we plot a possible realization of processes A, B, and AB. Since α is a function of r, we can tune this parameter to amplify the paradoxical effect. Let us search the value of r for which the drift is maximum, by direct differentiation of Eq. (22), under the assumptions (7) and (18): with Equation (24) has three possible zeros. The first one corresponds to but in this case α = β as well, and µ(t) = 0, irrespective of r. The second one, r = r + , is not valid because, as it can be shown, it is either smaller than zero or greater than 1. The last one will provide us with the optimal drift enhancement, r = r − . The value of r − can always be interpreted as a mixing probability, as it fulfills r − ∈ [0, 1] for any given choice of q 1 and q 2 , and gives r − = 1/2 for q 1 = q 2 . This is just the case considered in Fig. 1. Now, once we have shown that the interaction of two unbiased processes can bring a new process with positive drift, it is not difficult to reduce the probabilities q 0 , q 1 and q 2 by a small quantity ǫ, in such a way the mean value of anyone of the two individual processes is negative, but the combined process presents a positive growth. If we use as a starting point the values reported in the caption of Fig. 1 above, that is q 0 = 1/2 − ǫ, q 1 = q 2 = 4/5 − ǫ, γ 0 = η 0 = η 1 = γ 2 = η 2 = 1, γ 1 = 16, and r = 1/2, we will have that The last expression is positive for ǫ 0.0425. Therefore, if we set ǫ = 0.02, as in Fig. 2, we will achieve the desired behavior, that the bias of process AB is in the opposite direction of those of process A and process B. Note however that we can examine the physical meaning of process AB from another interesting perspective: we may understand that process A is a noise source affecting process B. This identification is even more natural when q 0 = 1/2 and γ 0 = η 0 , as in Fig. 1 above, because then the increments of process A constitute a zero-mean, symmetric white noise. In that case, one can see how the intensification of the noise steadily increases the mean output of the process, until it reaches a maximum, like in the case of the stochastic resonance.
But we can go further in the exploration of the possible implications of the paradoxical behavior. Let us consider the following values for the parameters of our example: q 0 = 1/2, q 1 = q 2 = 39/50, γ 0 = η 0 = η 1 = γ 2 = η 2 = 1, and γ 1 = 16. The corresponding mean values of the three processes, now as a function of r, are The parameters coincide with those in Fig. 1, except that q0, q1, and q2 were diminished by the same quantity ǫ = 0.02, i.e. q0 = 12/25, q1 = q2 = 39/50. The (black) dotted lines show the mean value of each process.
and therefore µ(t) > 0 for r > 83/1638 ≈ 0.05. This represents that we can modify the sign of the output of the system AB by changing the level of the noise, as it is shown in Fig. 3. This broadens the fields for which one may find practical applications of this formalism: from game theory to stochastic control. With this setup µa(t) = 0, µ b (t) < 0 and the sign of µ(t) depends on the value of the noise level r, as it is shown by the superimposed (black) dotted lines.

V. CONCLUSIONS
We have shown with a particular but illuminating example how we can obtain a growing stochastic process by alternating two unbiased CTRWs, one of them with memory. The clue to the understanding of this effect is in the fact that the mixing of the two processes distorts the inner correlation of the CTRW with memory.
The phenomenon is related to the Parrondo's paradox in game theory where the alternative play of two losing games may give winnings to the player. In our case, we can modify the parameters controlling the two CTRWs in such a way that each separate process acquires a negative drift but that their interplay still produces a positive bias.
The peculiarities of the analyzed process and its noticeable connections with the outcome of a gambling game do not limit the scope of our results, however. In the first place, the assumption that the only relevant past information is confined into the jump signs does not seem to be essential for obtaining the Parrondo's effect: we have selected it because it is convenient from a mathematical point of view, given its simplicity, and proves to be a plausible mechanism for modeling actual systems, at least in the realm of finance. And in the second place, as in the case of the original analysis by Parrondo, the paradox has consequences on problems far away from game theory: in our case we have shown how to control the sign of the (average value of the) output of a system by increasing or decreasing the intensity of a noise source.
Therefore, we think that the search for the emergence of this Parrondo-like behavior in CTRWs with more sophisticated memory functions, and the suggestion of alternative interpretations of the paradox in these new contexts, can be very fruitful from both the theoretical and the applied point of view. In any case, this will be the matter of a future work.