Some applications of first-passage ideas to finance
aa r X i v : . [ q -f i n . S T ] J un June 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance
Chapter 1Some applications of first-passage ideas to finance
R´emy Chicheportiche, Jean-Philippe Bouchaud
Capital Fund Management,23–25, rue de l’Universit´e, 75 007 Paris
Many problems in finance are related to first passage times. Among allof them, we chose three on which we contributed personally. Our firstexample relates Kolmogorov-Smirnov like goodness-of-fit tests, modifiedin such a way that tail events and core events contribute equally tothe test (in the standard Kolmogorov-Smirnov, the tails contribute verylittle to the measure of goodness-of-fit). We show that this problem canbe mapped onto that of a random walk inside moving walls. The secondexample is the optimal time to sell an asset (modelled as a random walkwith drift) such that the sell time is as close as possible to the time atwhich the asset reaches its maximum value. The last example concernsoptimal trading in the presence of transaction costs. In this case, theoptimal strategy is to wait until the predictor reaches (plus or minus) athreshold value before buying or selling. The value of this threshold isfound by mapping the problem onto that of a random walk between twowalls. une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance R. Chicheportiche, J.-P. Bouchaud
1. Introduction
Quantitative finance is the bounty land of statistics and probabilities.Bachelier proposed to model price paths as random walks in 1900, buthis amazingly creative work was forgotten until the sixties, when Samuel-son, Black & Scholes revived the Brownian motion framework, which is nowthe cornerstone of modern mathematical finance. This is probably unfortu-nate, because the continuous time, Gaussian random walk misses most ofthe important “stylized facts” of financial markets — fat (power-law) tails,intermittency and long memory, etc. Many of the results that hold true fora Gaussian process go awry in reality — for example, the well-known per-fect hedge of Black-Scholes, that would enable one to sell option contractswithout any risk, is a figment of the very specific assumptions of the model.It is all too easy to get carried away with the beauty of a mathematicalmodel, and forget that it does not bear any relation with reality. This is ofspecial concern in the case of financial markets, where inadequate modelscan contribute (and have contributed) to systemic risks [1].This is however not to say that probabilistic methods are useless in thiscontext. Quite on the contrary, empirically motivated, faithful models dohelp in controlling risks better and pricing derivative contracts more ac-curately. Many questions that are relevant in practice can be addressed.Some of them are directly related to first passage time problems, which isour topic here. For example, one might be interested to invest in financialmarkets with a profit objective, that would allow another project to befinanced. What is the distribution of the time one should wait until thisprofit is reached? Conversely, one might be worried about the default of acompany or a bank. This is often modeled as the first passage time whena random walk (the value of the asset) goes below a certain threshold (theequity) [2]. Another example is that of “barrier options”, which disappearwhen the price of the underlying hits a certain predefined value (the bar-rier); a related issue is the early exercise of so-called American options,when the option first reaches a value where it is optimal to exercise andcash the current pay-off rather than let the option run to maturity [3].We review here three examples of the use of first passage ideas in finance:the design of a goodness-of-fit test whose law is the survival probability ofa process before hitting a barrier, the optimal time to sell an asset, and theoptimal value of the price threshold at which the expected benefit outweighslinear transaction costs. Extensions and open questions related to thesethree problems are briefly discussed in the conclusion. une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance
Some applications of first-passage ideas to finance
2. Weighted Kolmogorov-Smirnov tests and first pas-sages [4]
Our first example concerns goodness-of-fit (GoF) testing, which is ubiqui-tous in all fields of science and engineering. This is the problem of testingwhether a null-hypothesis theoretical probability distribution is compati-ble with the empirical probability distribution of a sample of observations.GoF tests are designed to assess quantitatively whether a sample of N ob-servations can statistically be seen as a collection of N realizations of agiven probability law, or whether two such samples are drawn from thesame hypothetical distribution.The best known theoretical result is due to Kolmogorov and Smirnov(KS) [5, 6], and has led to the eponymous statistical test for an univari-ate sample of independent draws. The major strength of this test lies inthe fact that the asymptotic distribution of its test statistics is completelyindependent of the null-hypothesis cdf.Several specific extensions have been studied (and/or are still underscrutiny), including: different choices of distance measures, multivariatesamples, investigation of different parts of the distribution domain, depen-dence in the successive draws (which is particularly important for financialapplications), etc.This class of problems has a particular appeal for physicists since theworks of Doob [7] and Khmaladze [8], who showed how GoF testing isrelated to stochastic processes. Finding the law of a test amounts to com-puting a survival probability in a diffusion system. In a Markovian setting,this is often achieved by treating a Fokker-Planck problem, which in turnmaps into a Schr¨odinger equation for a particle in a certain potential con-fined by walls. Empirical cumulative distribution and its fluctuations
Let X be a random vector of N independent and identically distributedvariables, with marginal cumulative distribution function (cdf) F . Onerealization of X consists of a time series { x , . . . , x n , . . . , x N } that exhibitsno persistence (see Ref. [9] when some non trivial dependence is present).The empirical cumulative distribution function F N ( x ) = 1 N N X n =1 { X n ≤ x } (1) une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance R. Chicheportiche, J.-P. Bouchaud converges to the true CDF F as the sample size N tends to infinity. Forfinite N , the expected value and fluctuations of F N ( x ) are E [ F N ( x )] = F ( x ) , Cov( F N ( x ) , F N ( x ′ )) = 1 N [ F (min( x, x ′ )) − F ( x ) F ( x ′ )] . The rescaled empirical CDF Y N ( u ) = √ N (cid:2) F N ( F − ( u )) − u (cid:3) (2)measures, for a given u ∈ [0 , X ’s and the theoretical one, evaluated at the u -thquantile. It does not shrink to zero as N → ∞ , and is therefore the quantityon which any statistics for GoF testing is built. Limit properties
One now defines the process Y ( u ) as the limit of Y N ( u ) when N → ∞ .According to the Central Limit Theorem, it is Gaussian and its covariancefunction is given by: I ( u, v ) = min( u, v ) − uv, (3)which characterizes the so-called Brownian bridge, i.e. a Brownian motion Y ( u ) such that Y ( u = 0) = Y ( u = 1) = 0. Interestingly, the function F doesnot appear in Eq. (3) anymore, so the law of any functional of the limitprocess Y is independent of the law of the underlying finite size sample.This property is important for the design of universal GoF tests.
Norms over processes
In order to measure a limit distance between distributions, a norm || . || overthe space of continuous bridges needs to be chosen. Typical such norms arethe norm-2 (or ‘Cramer-von Mises’ distance) || Y || = Z Y ( u ) d u, as the bridge is always integrable, or the norm-sup (also called the Kol-mogorov distance) || Y || ∞ = sup u ∈ [0 , | Y ( u ) | , as the bridge always reaches an extremal value. une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance Some applications of first-passage ideas to finance Unfortunately, both these norms mechanically overweight the core val-ues u ≈ / u ≈ ,
1: since the variance of Y ( u ) is zeroat both extremes and maximal in the central value, the major contributionto || Y || indeed comes from the central region and not from the tails. Toalleviate this effect, in particular when the GoF test is intended to investi-gate a specific region of the domain, it is preferable to introduce additionalweights and study || Y √ ψ || rather than || Y || itself. Anderson and Darlingshow in Ref. [10] that the solution to the problem with the Cramer-vonMises norm and arbitrary weights ψ is obtained by spectral decomposi-tion of the covariance kernel. They design an eponymous test [11] withthe specific choice of ψ ( u ) = 1 /I ( u, u ) equal to the inverse variance, whichequi-weights all quantiles of the distribution to be tested. We analyze herethe case of the same weights but with the Kolmogorov distance.So again Y ( u ) is a Brownian bridge, i.e. a centered Gaussian process on u ∈ [0 ,
1] with covariance function I ( u, v ) given in Eq. (3). In particular, Y (0) = Y (1) = 0 with probability equal to 1, no matter how distant F isfrom the sample cdf around the core values. In order to put more emphasison specific regions of the domain, let us weight the Brownian bridge asfollows: for given a ∈ ]0 ,
1[ and b ∈ [ a, y ( u ) = y ( u ) · (cid:26) p ψ ( u ) , a ≤ u ≤ b , otherwise. (4)We will characterize the law of the supremum K ( a, b ) ≡ sup u ∈ [ a,b ] | ˜ y ( u ) | : P < ( k | a, b ) ≡ P [ K ( a, b ) ≤ k ] = P [ | ˜ y ( u ) | ≤ k, ∀ u ∈ [ a, b ]] . The equi-weighted Brownian bridge:Kolmogorov-Smirnov
In the case of a constant weight, corresponding to the classical KS test, theprobability P < ( k ; 0 ,
1) is well defined and has the well known KS form [5]: P < ( k ; 0 ,
1) = 1 − ∞ X n =1 ( − n − e − n k , (5)which, as expected, grows from 0 to 1 as k increases. The value k ∗ suchthat this probability is 95% is k ∗ ≈ .
358 [6]. This can be interpreted asfollows: if, for a data set of size N , the maximum value of | Y N ( u ) | is largerthan ≈ . une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance R. Chicheportiche, J.-P. Bouchaud
Diffusion in a cage with fixed walls
The Brownian bridge Y is nothing else than a Brownian motion with im-posed terminal condition, and can be written as Y ( u ) = X ( u ) − u X (1)where X is a Brownian motion. The survival probability of Y in a cagewith absorbing walls can be found by counting the number of Brownianpaths that go from Y (0) = 0 to Y (1) = 0 without ever hitting the barriers.More precisely, the survival probability of the Brownian bridge in the samestripe can be computed as f (0; k ) /f (0; ∞ ), where f u ( y ; k ) is the transi-tion kernel of the Brownian motion within the allowed region [ − k, k ]. Itsatisfies the simple Fokker-Planck equation ( ∂ u f u ( y ; k ) = 12 ∂ y f u ( y ; k ) f u ( ± k ; k ) = 0 , ∀ u ∈ [0 , . By spectral decomposition of the Laplacian, the solution is found to be f u ( y ; k ) = 1 k X n ∈ Z e − E n u cos (cid:16)p E n y (cid:17) , where E n = 12 (cid:18) (2 n − π k (cid:19) and the free propagator in the limit k → ∞ is the usual f u ( y ; ∞ ) = 1 √ πu e − y u , so that the survival probability of the constrained Brownian bridge is P < ( k ; 0 ,
1) = √ πk X n ∈ Z exp (cid:18) − (2 n − π k (cid:19) . (6)Although it looks different from Eq. (5), the two expressions can be shownto be exactly identical. But the above proof looks to us way easier thanthe canonical ones [10]. Diffusion in a cage with moving walls
The problem can be looked at differently. Under the following change ofvariable and time W ( t ) = (1 + t ) Y (cid:18) t t (cid:19) , t = u − u ∈ (cid:20) a − a , b − b (cid:21) , (7)the problem can be transformed into that of a Brownian diffusion inside abox with walls moving at constant velocity . Indeed, one can check thatCov (cid:0) W ( t ) , W ( t ′ ) (cid:1) = min( t, t ′ ) , une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance Some applications of first-passage ideas to finance and that P < ( k | ,
1) can be now written as P < ( k | , ) = P [ | W ( t ) | ≤ k (1 + t ) , ∀ t ∈ [0 , ∞ [] . Since the walls expand as ∼ t faster than the diffusive particle can move( ∼ √ t ), the survival probability converges to a positive value, which is againgiven by the usual Kolmogorov distribution (5) [12–14]. − . − . . . . u y ( u ) y ( u ) + k - k t w ( t ) = ( + t ) y (cid:230) Ł(cid:231) t + t (cid:246) ł(cid:247) + k ( + t ) - k ( + t ) ¥ Fig. 1. The equi-weighted Brownian bridge, ψ ( u ) = 1. The time-changed rescaledprocess lives in a geometry with boundaries receding at constant speed. The variance-weighted Brownian bridge:Accounting for the tails
As mentioned above, the classical KS test is only weakly sensitive to thequality of the fit in the tails of the distribution, when it is often thesetail events (corresponding to centennial floods, devastating earthquakes,financial crashes, etc.) that one is most concerned with (see, e.g., Ref. [15]).A simple and elegant GoF test for the tails only can be designed startingwith digital weights in the form ψ ( u ; a ) = { u ≥ a } or ψ ( u ; b ) = { u ≤ b } forupper and lower tail, respectively. The corresponding test laws can beread off Eq. (5.9) in Ref. [10]. a Investigation of both tails is attained with ψ ( u ; q ) = { u ≤ − q } + { u ≥ q } (where q > ). a The quantity M appearing there is the volume under the normal bivariate surfacebetween specific bounds, and it takes a very convenient form in the unilateral cases ≤ a ≤ u ≤ ≤ u ≤ b ≤ . Mind the missing j exponentiating the alternating( −
1) factor. une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance R. Chicheportiche, J.-P. Bouchaud
Here we rather focus on a GoF test for a univariate sample of size N ≫ all regions of the distribution. b We unify two earlier attemptsat finding asymptotic solutions, one by Anderson and Darling in 1952 [10]and a more recent, seemingly unrelated one that deals with “life and deathof a particle in an expanding cage” by Krapivsky and Redner [12, 16]. Wepresent here the exact asymptotic solution of the corresponding stochasticproblem, and deduce from it the precise formulation of the GoF test, whichis of a fundamentally different nature than the KS test.So in order to zoom on the tiny differences in the tails of the Brownianbridge, we weight it as explained earlier, with its variance ψ ( u ) = 1 u (1 − u ) . Solutions for the distributions of such variance-weighted Kolmogorov-Smirnov statistics were studied by No´e, leading to the laws of the one-sided [17] and two-sided [18] finite sample tests. They were later generalizedand tabulated numerically by Niederhausen [19, 20]. However, althoughexact and appropriate for small samples, these solutions rely on recursiverelations and are not in closed form. We instead come up with an analyticclosed-form solution for large samples that relies on an elegant analogy fromstatistical physics.
Diffusion in a cage with moving walls
After performing the above change of variable (7) that converts a Brownianbridge into a Brownian motion, P < ( k | a, b ) can be written as P < ( k | a, b ) = P h | W ( t ) | ≤ k √ t, ∀ t ∈ [ a − a , b − b ] i . The problem with initial time a − a = 0 and horizon time b − b = T has been treated by Krapivsky and Redner in Ref. [12] as the survivalprobability S ( T ; k = q A D ) of a Brownian particle diffusing with constant D in a cage with walls expanding as √ At . Their result is that for large T , S ( T ; k ) ≡ P < ( k | , T T ) ∝ T − θ ( k ) . They obtain analytical expressions for θ ( k ) in both limits k → k → ∞ . The limit solutions of the very same differential problem were b Other choices of ψ generally result in much harder problems. une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance Some applications of first-passage ideas to finance found earlier by Turban for the critical behavior of the directed self-avoidingwalk in parabolic geometries [21].We take here a slightly different route, suggested (but not finalized) byAnderson and Darling in Ref. [10]. Our specific contributions are: (i) wetreat the general case a > any k ; (ii) we explicitly compute the k -dependence of both the exponent and the prefactor of the power-law decay;and (iii) we provide the link with the theory of GoF tests and compute thepre-asymptotic distribution when ] a, b [ → ]0 ,
1[ of the weighted Kolmogorov-Smirnov test statistics. − . − . − . . . . . u y ( u ) y ( u ) + k - k t w ( t ) = ( + t ) y (cid:230) Ł(cid:231) t + t (cid:246) ł(cid:247) + k t - k t ¥ Fig. 2. The variance-weighted Brownian bridge, ψ ( u ) = 1 / [ u (1 − u )]. The time-changedrescaled process lives in a geometry with boundaries receding as ∼ √ t . Mean-reversion in a cage with fixed walls
Introducing now the new time change τ = ln q − aa t , the variable Z ( τ ) = W ( t ) / √ t is a stationary Ornstein-Uhlenbeck process on [0 , T ] where T = ln s b (1 − a ) a (1 − b ) , (8)and Cov (cid:0) Z ( τ ) , Z ( τ ′ ) (cid:1) = e −| τ − τ ′ | . Its dynamics is described by the stochastic differential equationd Z ( T ) = − Z ( T )d T + √ B ( T ) , (9) une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance R. Chicheportiche, J.-P. Bouchaud with B ( T ) an independent Wiener process. The initial condition for T = 0(corresponding to b = a ) is Z (0) = Y ( a ) / p V [ Y ( a )], a random Gaussianvariable of zero mean and unit variance. The distribution P < ( k | a, b ) cannow be understood as the unconditional survival probability of a mean-reverting particle in a cage with fixed absorbing walls: P < ( k | T ) = P [ − k ≤ Z ( τ ) ≤ k, ∀ τ ∈ [0 , T ]]= Z k − k f T ( z ; k ) d z, where f T ( z ; k ) d z = P (cid:2) Z ( T ) ∈ [ z, z + d z [ | { Z ( τ ) } τ 0) = erf (cid:16) k √ (cid:17) . une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance Some applications of first-passage ideas to finance where b ϕ ν are the normalized solutions of the stationary Schr¨odinger equa-tion ( (cid:2) − ∂ z + z (cid:3) ϕ ν ( z ) = (cid:0) θ ν + (cid:1) ϕ ν ( z ) ϕ ν ( ± k ) = 0 , each decaying with its own energy θ ν , where ν labels the different solutionswith increasing eigenvalues, and the set of eigenfunctions { b ϕ ν } defines anorthonormal basis of the Hilbert space on which H S ( z ) = (cid:2) − ∂ z + z (cid:3) acts.In particular, X ν b ϕ ν ( z ) b ϕ ν ( z ′ ) = δ ( z − z ′ ) , (10)so that indeed G φ ( z, T i | z i , T i ) = δ ( z − z i ), and the general solution writes f T ( z T ; k ) = Z k − k e z − z T G φ ( z T , T | z i , T i ) f ( z i ) d z i , where T i = 0, which corresponds to the case b = a in Eq. (4), and f is thedistribution of the initial value z i which is here, as noted above, Gaussianwith unit variance. H S figures out an harmonic oscillator of mass and frequency ω = √ within an infinitely deep well of width 2 k : its eigenfunctions are paraboliccylinder functions [22, 23] y + ( θ ; z ) = e − z F (cid:16) − θ , , z (cid:17) y − ( θ ; z ) = z e − z F (cid:16) − θ , , z (cid:17) properly normalized. The only acceptable solutions for a given problemare the linear combinations of y + and y − which satisfy orthonormality (10)and the boundary conditions: for periodic boundary conditions, only theinteger values of θ would be allowed, whereas with our Dirichlet boundaries | b ϕ ν ( k ) | = −| b ϕ ν ( − k ) | = 0, real non-integer eigenvalues θ are allowed.For in-stance, the fundamental level ν = 0 is expected to be the symmetric solution b ϕ ( z ) ∝ y + ( θ ; z ) with θ the smallest possible value compatible with theboundary condition: θ ( k ) = inf θ> (cid:8) θ : y + ( θ ; k ) = 0 (cid:9) . (11)In what follows, it will be more convenient to make the k -dependence ex-plicit, and a hat will denote the solution with the normalization relevant to une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance R. Chicheportiche, J.-P. Bouchaud our problem, namely b ϕ ( z ; k ) = y + ( θ ( k ); z ) / || y + || k , with the norm || y + || k ≡ Z k − k y + ( θ ( k ); z ) d z, so that R k − k b ϕ ν ( z ; k ) d z = 1 . Asymptotic survival rate Denoting by ∆ ν ( k ) ≡ [ θ ν ( k ) − θ ( k )] the gap between the excited levelsand the fundamental, the higher energy modes b ϕ ν cease to contribute tothe Green’s function when ∆ ν T ≫ 1, and their contributions to the abovesum die out exponentially as T grows. Eventually, only the lowest energymode θ ( k ) remains, and the solution tends to f T ( z ; k ) = A ( k ) e − z b ϕ ( z ; k ) e − θ ( k ) T , when T ≫ (∆ ) − , with A ( k ) = Z k − k e z b ϕ ( z i ; k ) f ( z i ) d z i . (12)Let us come back to the initial problem of the weighted Brownian bridgereaching its extremal value in [ a, b ]. If we are interested in the limit casewhere a is arbitrarily close to 0 and b close to 1, then T → ∞ and thesolution is thus given by P < ( k | T ) = A ( k ) e − θ ( k ) T Z k − k e − z b ϕ ( z ; k ) d z = e A ( k ) e − θ ( k ) T , with e A ( k ) ≡ √ πA ( k ) .We now compute explicitly the limit behavior of both θ ( k ) and e A ( k ). k → ∞ As k goes to infinity, the absorption rate θ ( k ) is expectedto converge toward 0: intuitively, an infinitely far barrier will not absorbanything. At the same time, P < ( k | T ) must tend to 1 in that limit. So e A ( k )necessarily tends to unity. Indeed, θ ( k ) k →∞ −−−−→ r π k e − k → , (13) e A ( k ) k →∞ −−−−→ (cid:18)Z ∞−∞ b ϕ ( z ; ∞ ) d z (cid:19) = 1 . une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance Some applications of first-passage ideas to finance In principle, we see from Eq. (12) that corrections to the latter ariseboth (and jointly) from the functional relative difference of the solution ǫ ( z ; k ) = y + ( θ ( k ); z ) /y + (0; z ) − 1, and from the finite integration limits( ± k instead of ±∞ ). However, it turns out that the correction of the firstkind is of second order in ǫ , see [4]. The correction to A ( k ) is thus domi-nated by the finite integration limits ± k , so that e A ( k → ∞ ) ≈ erf (cid:18) k √ (cid:19) . (14) k → For small k , the system behaves like a free particle in a sharpand infinitely deep well, since the quadratic potential is almost flat around0. The fundamental mode becomes then b ϕ ( z ; k → 0) = 1 √ k cos (cid:16) πz k (cid:17) , and consequently θ ( k ) k → −−−→ π k − , (15) e A ( k ) k → −−−→ π √ π k. (16)We show in Fig. 3 the functions θ ( k ) and e A ( k ) computed numericallyfrom the exact solution, together with their asymptotic analytic expres-sions. In intermediate values of k (roughly between 0.5 and 3) these limitexpressions fail to reproduce the exact solution. Higher modes and validity of the asymptotic ( N ≫ ) solution Higher modes ν > ν . /T must in principle be keptin the pre-asymptotic computation. This, however, is irrelevant in practicesince the gap θ − θ is never small. Indeed, b ϕ ( z ; k ) is proportional to theasymmetric solution y − ( θ ( k ); z ) and its energy θ ( k ) = inf θ>θ ( k ) (cid:8) θ : y − ( θ ; k ) = 0 (cid:9) is found numerically to be very close to 1 + 4 θ ( k ). In particular, ∆ > T ∆ ≫ une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance R. Chicheportiche, J.-P. Bouchaud Back to GoF testing Let us now come back to GoF testing. In order to convert the abovecalculations into a meaningful test, one must specify values of a and b . Thenatural choice would be a = 1 /N , corresponding to the min of the sampleseries since F (min x n ) ≈ F N (min x n ) = N . Eq. (8) above motivates aslightly different value of a = 1 / ( N + 1) and b = 1 − a , such that therelevant value of T is given correspondingly by T = ln s b (1 − a ) a (1 − b ) = ln N. This leads to our central result for the cdf of the weighted maximal Kol-mogorov distance K ( N +1 , NN +1 ) under the hypothesis that the tested andthe true distributions coincide: S ( N ; k ) = P < ( k | ln N ) = e A ( k ) N − θ ( k ) , (17)which is valid whenever N ≫ is greater than unity.The final cumulative distribution function (the test law) is depicted inFig. 5 for different values of the sample size N . Contrarily to the standardKS case, this distribution still depends on N : as N grows toward infinity,the curve is shifted to the right, and eventually S ( ∞ ; k ) is zero for any k . Inparticular, the threshold value k ∗ corresponding to a 95% confidence level(represented as a horizontal grey line) increases with N . Since for large N , k ∗ ≫ θ ( k ∗ ) ≈ − ln 0 . N ≈ r π k ∗ e − k ∗ , which gives k ∗ ≈ . , . , . , . 651 for, respectively, N =10 , , , . For exponentially large N and to logarithmic accuracy,one has: k ∗ ∼ p N ). This variation is very slow, but one sees thatas a matter of principle, the “acceptable” maximal value of the weighteddistance is much larger (for large N ) than in the KS case. une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance Some applications of first-passage ideas to finance k Θ H k L kà H k L Fig. 3. Left: Dependence of the exponent θ on k ; similar to Fig. 2 in Ref. [12], butin lin-log scale; see in particular Eqs. (9b) and (12) there. Right: Dependence of theprefactor e A on k . The red solid lines illustrate the analytical behavior in the limitingcases k → k → ∞ . k (cid:144) D H k L Fig. 4. 1 / ∆ ( k ) saturates to 1, sothat the condition N ≫ exp[1 / ∆ ( k )]is virtually always satisfied. kS H N;k L Fig. 5. Dependence of S ( N ; k ) on k for N = 10 , , , (from leftto right). The red solid lines illustratethe analytical behavior in the limitingcases k → k → ∞ . une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance R. Chicheportiche, J.-P. Bouchaud 3. Optimal time to sell a stock d Consider the problem of holding a stock at an initial date t = 0, and hopingto sell it back at a time t = τ before a deadline t = T . The goal is to findthe ex ante optimal selling time τ , i.e. take a decision at t = 0 as of whento sell it in the future for optimal profit. If the (log-)price can be modelledas a stationary random walk, this is not a restriction of generality, since atany later time the problem is identical with however a reduced horizon. Minimizing the expected distance to the maximum In technical terms, we aim at minimizing the expected (relative) spread S ( τ ; T ) = M T − X τ M T between the instantaneous price X τ and the ex post realized maximum overthe allowed horizon M T = max { X t , t ∈ [0 , T ] } .In order for this forward-looking problem to be handled analytically,we impose that the price process follows a (possibly drifted) geometricBrownian motion X t = e x t withd x t = µ d t + σ d B t or ˙ x = µ + ση where B t in the Stochastic Differential Equation (left) is a Wiener process,and η = d B t d t in the Langevin equation (right) is a standard White GaussianNoise. We rewrite the maximum value as M T = e m T with obviously m T =max { x t , t ∈ [0 , T ] } . The problem is clearly invariant under a shift of both x t and m T , so that we can arbitrarily set x = 0.The optimal time to sell is then defined as the solution of the minimiza-tion problem τ ∗ = arg min τ ∈ [0 ,T ] E [ln S ( τ ; T )] = arg min τ ∈ [0 ,T ] E [ s ( τ ; T )]where s ( τ ; T ) = m T − x τ . The expectation estimator is clearly inter-temporal, and the probability distribution function P µ of s ( τ ; T ) can bewritten in terms of the joint density f µ of ( x τ , m T ) as P µ ( s ; τ, T ) = Z ∞ Z ∞−∞ f µ ( x, m ; τ, T ) δ ( m − x − s ) d x d m = Z ∞ f µ ( m − s, m ; τ, T ) d m. (18) d Joint work with S. Majumdar [24], motivated by a paper by Shiryaev, Xu and Zhou [25]. une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance Some applications of first-passage ideas to finance This is equivalent to writing P µ ( s ; τ, T ) = R d F µ ( m − s, m ; τ, T ), with the(partial) cumulative distribution function F µ ( x, m ; τ, T ) = P [ x τ = x, m T ≤ m ]counting the fraction of the paths arriving in [ x, x + d x ] at time τ amongall paths never crossing m from below over the whole horizon [0 , T ]. Itis expressed in terms of the causal propagator G µ as the probability ofarriving in x at time τ without ever hitting m , and then arriving anywherebelow m in the remaining time T − τ : F µ ( x, m ; τ, T ) = G µ ( x, τ ; m ) Z m −∞ G µ ( x ′ , T − τ ; m − x ) d x ′ . (19)The propagator G µ ( x, τ ; m ) describes a µ -drifted diffusion close to afixed absorbing boundary, or equivalently a pure diffusion close to a bound-ary moving at constant velocity (“daredevil at the edge of a recedingcliff”, [12]), see Fig. 6. It can be written in terms of the propagator G of the zero-drift diffusion: G µ ( x, t ; m ) = exp (cid:18) − µ − µx σ (cid:19) G ( x, t ; m ) , where G can be computed in several ways — method of images [16, 26],path-integral method [24, 27], solution of the Fokker-Planck equation.The solution writes (up to a normalizing constant) as the difference G ( x, t ; m ) ∝ G ( x, t ; ∞ ) − G ( x − m, t ; ∞ ) between the free propagator G ( x, t ; ∞ ) = 1 √ πσ t exp (cid:18) − ( x − x ) σ t (cid:19) with initial positions at x = 0 and x = 2 m . As expected, G ( m, t ; m ) = 0at all times, saying that the probability of presence at the boundary is nil.Once G µ is known, the joint distribution f µ of x τ and m T is obtainedby differentiating Eq. (19) with respect to m , and the distribution of thespread is found from Eq. (18) to be P µ ( s ; τ, T ) = a µ ( s ; τ ) b − µ ( s, T − τ ) + a − µ ( s ; T − τ ) b µ ( s, τ ) , (20)where a µ ( s ; τ ) = µ σ exp (cid:18) − sµσ (cid:19) erfc (cid:18) s − µτ √ σ τ (cid:19) + 1 √ πσ τ exp (cid:18) − ( s + µτ ) σ τ (cid:19) b µ ( s ; τ ) = − exp (cid:18) − sµσ (cid:19) erfc (cid:18) s − µτ √ σ τ (cid:19) + erfc (cid:18) − s + µτ √ σ τ (cid:19) . une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance R. Chicheportiche, J.-P. Bouchaud Finally, the expected spread is E [ s ( τ, T )] = Z ∞ s P µ ( s ; τ, T ) d s = Z Z ∞ s f µ ( m − s, m ; τ, T ) d m d s, (21)and the optimal τ ∗ is found by minimizing this function with respect to τ : τ ∗ = ( T , µ ≥ , µ ≤ . (22)It is degenerate at µ = 0 where both τ ∗ = 0 and τ ∗ = T are optimal.This result states in technical terms a very intuitive truism: whenever thelog-prices are expected to increase in average ( µ > 0) one should keepthe stock as long as possible, and conversely if the log-prices are expectedto fall ( µ < 0) one should sell immediately. It should not be surprisingthat τ ∗ is not affected by the value of the so-called “volatility” parameter σ , since the optimization program only focused on “maximizing the gain”without controlling for the encountered risk, and thus the solution appliesto a risk-neutral agent only. − . − . − . . . . . . t [ units of T ] x ( t ) [ un i t s o f s ] m m − . − . − . . . . . . t [ units of T ] x ( t ) -m t [ un i t s o f s ] m -m t Fig. 6. Illustration for a positive drift ( µ > µ < 0, the upperbarrier moves away linearly. See Sect. 2.2 page 5 for an application of the bilateral case. Maximizing the occurrence time probability of maxi-mum Alternatively to minimizing the spread s ( τ ; T ) between the expected max-imum m T and the log-price x τ at the selling time, one can try to maximize une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance Some applications of first-passage ideas to finance the probability p µ ( τ ; T )d τ = d P [ x τ = m T ] that m T will occur at time τ ,whatever value it takes. But the joint probability that the global maximumover [0 , T ] has a value m T = m , and that this maximum is reached for thefirst (and in fact only) time at t = τ is nothing else than f µ ( m, m ; τ, T ).In order to avoid the issue of infinite crossings of the continuous Brown-ian motion [24, 28, 29], we allow for an infinitesimal spread s = m − x thatwe eventually take to 0: p µ ( τ ; T ) ∝ Z ∞ lim s → f µ ( m − s, m ; τ, T ) d m = P µ (0 + ; τ, T ) , with P µ given in Eq. (20). Noticing that a µ converges to a finite value a µ (0 , τ ) when s → 0, and that the expansion of b µ to first order in s around0 is b µ ( s → , τ ) ≈ s a µ (0 , τ ), we have P µ ( s → τ, T ) = 8 s a µ (0 , τ ) a − µ (0 , T − τ )and finally, normalizing with R T P µ ( s ; τ, T )d τ , we get p µ ( τ ; T ) = 2 σ a µ (0 , τ ) a − µ (0 , T − τ ) . (23)Notice that when µ = 0 the function a ( s, τ ) is the centered normal dis-tribution with variance σ τ . In particular a (0 , τ ) = 1 / √ πσ τ and onerecovers L´evy’s result [30]: p ( τ ; T ) = 1 π p τ ( T − τ ) , with two global maxima at τ ⋆ = 0 and τ ⋆ = T . For non zero µ ’s, thedistribution still have inverse square-root singularities both at τ = 0 and τ = T , but with unequal amplitudes. For µ < 0, the amplitude of the τ = 0singularity is larger than that of the τ = T singularity, and vice-versa when µ > 0. Therefore one concludes that: τ m = arg max τ ∈ [0 ,T ] p µ ( τ ; T ) = ( T , µ ≥ , µ ≤ τ ∗ , see Eq. (22).Whereas the minimization program of the previous section embeddedthe information of all the possible gaps s (as revealed by Eq. (21)), max-imizing the occurrence time distribution only cares for the infinitesimalproximity of the maximum s = m − x → 0. Nevertheless, although theobjective function is not the same (minimize the spread or maximize theprobability), the solution of the optimal time is not sensitive to the chosencriterion. une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance R. Chicheportiche, J.-P. Bouchaud 4. Optimal trading with linear costs e The problem addressed in this section is to determine the optimal strat-egy in the presence of “linear” trading costs (i.e. a fixed cost per share ,neglecting any price impact) and a constraint on the maximum size of theposition (both long and short). This problem is of very significant interestin practice, at least for small sizes. For large sizes, a quadratic cost can beadded to mimic price impact; the problem is however not (yet ?) solved infull generality.We consider an agent who wants to maximize his/her expected gains,by trading a single asset, of current price Price t , over a long period [0 , T ](we will later consider the limit T → ∞ ). The position (signed number ofshares/contracts) of the trader at time t is π t . We assume that the agenthas some signal p t that predicts the next price change r t = Price t +1 − Price t ,and is faced with the following constraints: • His/her risk control system is simply a cap on the absolute size of his/herposition : | π t | ≤ M , with no other risk control. • He/she has to pay linear costs Γ | ∆ π t | whenever he/she trades a quantity∆ π t ≡ π t +1 − π t We assume that the predictor has a number of “nice” (but natural) prop-erties; in particular, the predictability L t ( p ) = E [ r t | p t = p ] is an odd,continuous and strictly increasing function of p . We also assume that itis Markovian: ∀ ω t +1 , P [ ω t +1 | p t , p t − , . . . ] = P [ ω t +1 | p t ] where ω t +1 is anyevent at t + 1. In what follows, we will use the notation P t ( p ′ | p )d p ′ = P [ p t +1 = p ′ | p t = p ]d p ′ . We also define an integrated predictability at t = ∞ ,depending on p t : p ∞ ( p t ) = E [Price ∞ − Price t | p t ] = ∞ X n =0 E [ r t + n | p t ] . This quantity indicates how much one will gain in the future if one keeps afixed position π t ′ ≥ t = π : the expected gain is then p ∞ ( p t ) π . The Optimal Strategy A na¨ıve solution At first sight, the solution to this problem seems straightforward: if theexpected future gain (given by the integrated predictability) exceeds the e Joint work with J. de Lataillade, C. Deremble and M. Potters [31]. une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance Some applications of first-passage ideas to finance trading cost per contract Γ, then one trades in the direction of the signal(if not already at the maximum position), otherwise one does not. Thissolution obviously generates a positive average gain, but it has no reasonto be the optimal solution. Indeed, because the predictor is auto-correlatedin time, it might be worthy (and in general it will be) to wait for a largervalue of the predictor, in order to grab the opportunities that have the mostchances to get realized, and discard the others. As we shall see, the mistakein this na¨ıve reasoning is not to compare the future gain with the cost, butrather comes from a wrong definition of the future gain, which does notinclude future trading decisions. The Bellman method: general solution The framework to attack this problem is Bellman’s optimal control theory,or dynamic programming [32], which consists in solving the problem back-wards: by assuming one follows the optimal strategy for all future times t ′ > t , one can find the optimal solution at time t . As is usual in dynamicprogramming, one has a control variable π t , which needs to be optimized,and a state variable p t , which parameterizes the solution. The optimizationis done through a value function V t ( π, p ), which gives the maximal expectedgains between time t and + ∞ , considering that the position at t − π and the predictor’s value at t is p . The optimal solution of the system willbe denoted ( π ∗ t ) t ∈ [0 ,T ] .At the last time step t = T , the expected future return is really p ∞ ( p ) π T where p = p T , since no trading is allowed beyond that time. Any trade ∆ π T induces a cost Γ | ∆ π T | , so:If p ∞ ( p ) ≥ +Γ then π ∗ T = + M , and V T ( π, p ) = + p ∞ ( p ) M − Γ ( M − π )If p ∞ ( p ) ≤ − Γ then π ∗ T = − M , and V T ( π, p ) = − p ∞ ( p ) M − Γ ( M + π )If | p ∞ ( p ) | < Γ then π ∗ T = π , and V T ( π, p ) = p ∞ ( p ) π .Hence, one recovers exactly the na¨ıve solution in this case, but this is onlybecause there is no trading beyond t = T . Now at t < T , the quantity tobe maximized includes immediate gains, costs and future gains. This leadsto the following recursion relation: V t ( π, p ) = max | π ′ |≤ M (cid:26) L t ( p ) · π ′ − Γ | π ′ − π | + Z V t +1 ( π ′ , p ′ ) P t ( p ′ | p )d p ′ (cid:27) , (25)and π ∗ t is the value of π ′ which realises this maximum when π = π ∗ t − and p = p t . The general solution is given by the following construction [31]: une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance R. Chicheportiche, J.-P. Bouchaud • π ∗ t = ( π ∗ t − if | p t | < q t sign( p t ) · M if | p t | ≥ q t (with π − = 0) • q t is such that q t ≥ g ( t, q t ) = Γ, where g ( t, p ) is a continuous,strictly increasing function of p which satisfies, for t < T : g ( t, p ) = L t ( p ) + Γ "Z ∞ q t +1 − Z − q t +1 −∞ P t ( p ′ | p )d p ′ (26)+ Z q t +1 − q t +1 g ( t + 1 , p ′ ) P t ( p ′ | p )d p ′ The stationary solution The solution provided by Bellman’s method above exhibits in general adependence in t . Let us now consider the case where T → ∞ , and supposethat the predictor is stationary, i.e. P t ( p ′ | p ) = P ( p ′ | p ) is independent of t .Then we obtain a telescopic (self-consistent) equation for the one-variablefunction g , and the solution for the threshold q ∗ : g ( p ) = L ( p ) + Γ "Z ∞ q ∗ − Z − q ∗ −∞ P ( p ′ | p )d p ′ + Z q ∗ − q ∗ g ( p ′ ) P ( p ′ | p )d p ′ (27) g ( q ∗ ) = Γ (28)The optimal solution π ∗ t to the system is then similar to the generalsolution, but with a constant threshold q ∗ . Thus, we obtain a very simpletrading system, always saturated at ± M , with a threshold to decide at eachstep whether we should revert the position or not. This of course looks a lotlike the na¨ıve solution of page 20. The only difference lies in the value of thethreshold q ∗ = g − (Γ), defined by Eqs. (27,28), instead of q na¨ıve = p − ∞ (Γ)for the na¨ıve solution. Intuitively, these equations take our future tradinginto account, whereas the na¨ıve solution does not.If we look closely at Eq. (27), its interpretation becomes transparent:2 M g ( p ) is equal the expected difference in total future profit between thesituation where π = + M and the situation where π = − M . This differenceis made up of: • ∆ π L ( p ) which represents the difference in immediate gain • ∆ π Γ P [ p t +1 > q ∗ | p t = p ] which represents the loss if the current positionis − M and in the next time step the predictor goes over the positivethreshold q ∗ (hence π will go to + M ) une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance Some applications of first-passage ideas to finance • ∆ π Γ P [ p t +1 < − q ∗ | p t = p ] which represents the loss if the current positionis + M and in the next time step the predictor goes below the negativethreshold − q ∗ (hence π will go to − M ) • R q ∗ − q ∗ P ( p ′ | p ) 2 M g ( p ′ ) d p ′ which is the expected difference in total fu-ture profit if, in the next step, the predictor remains between the twothresholds (leaving π unchanged).Since the change of position between − M and + M costs 2 M Γ, it makessense to compare 2 M g ( p ) with it and only trade when g ( p ) is greater thanΓ. Hence, g ( p ) can be seen as the “gain per traded lot”.According to Eq. (27), | g ( p ) | ≥ | L ( p ) | and with Eq. (28) this impliesin particular that L ( q ∗ ) ≤ Γ. This property is actually rather intuitive:indeed, if the immediate expected gain was higher than the trading cost,then there would be no reason not to trade the maximal possible amount.From here on, we only consider a linear predictor, L t ( p ) = p . Reformulation as a path integral Although Eq. (27) is easy to interpret, it proves very difficult to solve inconcrete cases. It can be rewritten by expanding the function g : g ( p ) = p + Z q ∗ − q ∗ p P ( p | p )d p + Z q ∗ − q ∗ Z q ∗ − q ∗ p P ( p | p ) P ( p | p )d p d p + . . . + Γ · "Z + ∞ q ∗ P ( p | p )d p + Z + ∞ q ∗ Z q ∗ − q ∗ P ( p | p ) P ( p | p )d p d p + . . . − Γ · "Z − q ∗ −∞ P ( p | p )d p + Z − q ∗ −∞ Z q ∗ − q ∗ P ( p | p ) P ( p | p )d p d p + . . . = G ( p ) + Γ [ P + ( p ) − P − ( p )] , (29)and can thus be understood as a path integral: G ( p ) can be interpretedas the average over all possible exit times n of the cumulated predictor P n − i =0 p i , where the expectation is taken only over all paths that stay in[ − q ∗ , q ∗ ] until n . Similarly P + ( p ) and P − ( p ) are the probabilities for a pathstarting at p = p to exit (at any possible later time) above q ∗ or below − q ∗ , respectively.Using now the fact that g ( q ∗ ) = Γ, and P + ( q ∗ ) + P − ( q ∗ ) = 1, we get: G ( q ∗ ) − P − ( q ∗ ) = 0 . (30)In some cases, both sides of this equation will tend to be infinitesimal, so itis rather the ratio lim p → q ∗ G ( p ) / P − ( p ) that we will ask to equal 2Γ. Figure 7 une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance R. Chicheportiche, J.-P. Bouchaud illustrates our reformulation of the problem in terms of first passage timesproperties. −20 ff G ** − qq Fig. 7. Path integral representation of Eq. (30). The value of q ∗ is such that the“penalty” 2Γ over all paths exiting through − q ∗ is equal to the average gain over allpaths exiting either through q ∗ (e.g. φ , blue) or through − q ∗ (e.g. φ , red). Note that Eq. (30) is completely general provided the assumptions ofpage 20 are satisfied, it does not rely on any specific statistics of the pre-dictor. In the next section, we will explicitly solve this equation when thepredictor is Gaussian and follows an auto-regressive evolution. Application to an auto-regressive linear predictor Let us assume that the predictor follows a discrete auto-regressive dynam-ics: p t +1 = ρ · p t + β · ξ t , (31)where ( ξ t ) t ∈ R is a set of independent N (0 , 1) Gaussian random variables.One classical example of such a predictor is an exponential moving averageof price returns: p EMA t = K X t ′ 1, we have E [ p t + n | p t ] ≈ e − ǫn p t ,so τ = 1 /ǫ is the auto-correlation time of the predictor p t . The standarddeviation of the predictor, i.e. its average predictability, is σ p = p E [ p t ] = β/ √ ǫ . The integrated predictability is given by p ∞ ( p ) = ∞ X n =0 E [ p t + n | p t ] ≈ ∞ X n =0 e − ǫn p t ≈ p/ǫ, what implies that the na¨ıve threshold value is given by q na¨ıve = Γ ǫ , whilethe integrated average predictability is σ ∞ = β/ √ ǫ . In what follows, wewill study the problem by distinguishing between two cases: β ≫ Γ : the predictor can easily beat its transaction costs at every step.This situation (which is not very realistic) requires to keep a discretetime approach of the problem. β ≪ Γ : the predictor needs in general a large number of steps to beat thecosts. This will lead to a continuous formulation of the problem. Discrete case: β ≫ ΓWe already explained in page 23 that q ∗ ≤ Γ with a linear predictor. Con-sequently, whenever β ≫ Γ, we also have β ≫ q ∗ . This means that, startingat p = q ∗ , one will typically jump beyond q ∗ or − q ∗ in just one step. Thus: G ( q ∗ ) = q ∗ and P − ( q ∗ ) = Z + ∞ x ∗ e − x / √ π d x, where x ∗ = (2 − ǫ ) q ∗ /β . Since β ≫ q ∗ , one has x ∗ ≪ P − ( q ∗ ) ≈ / 2. Equation (30) finally gives: q ∗ = Γ . Hence, if the volatility of eachpredictor change is very large compared to the trading costs, then one needsto be as selective as possible. Continuous case: β ≪ ΓIf the threshold was of the order of the predictor’s surprise q ∗ ≈ β , thepredictor would have a significant probability of switching from above q ∗ une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance R. Chicheportiche, J.-P. Bouchaud to below − q ∗ in just one step. The optimal strategy would then requireto resell everything at cost 2Γ, whereas the immediate gain would onlybe of the order of magnitude of β . So when β ≪ Γ, we necessarily have q ∗ ≫ β , and many steps are required for the predictor to get from q ∗ ≫ β to − q ∗ ≪ − β . This is effectively the continuum limit, where the variationof the predictor at each time step is infinitesimal compared to q ∗ . We canthen approximate the dynamics of the predictor by the Ornstein-Uhlenbeckdrift-diffusion process: d p t = − ǫ p t d t + β d X t , (32)where ( X t ) t is a Wiener process.In such a continuous setting, the quantities G ( q ∗ ) and P − ( q ∗ ) are actu-ally ill-defined because the diffusion process starts on an absorbing bound-ary. This is a classical problem, which is handled by starting infinitesimallyclose to q ∗ . Therefore we consider G ( p ) and P − ( p ) for p = q ∗ − δ < q ∗ .It can be shown that these two functions obey two Kolmogorov backwardequations, that read:12 β ∂ G ∂p − ǫp ∂ G ∂p = − p and 12 β ∂ P − ∂p − ǫp ∂ P − ∂p = 0 , (33)with boundary conditions: G ( ± q ∗ ) = 0 and P − ( q ∗ ) = 0, P − ( − q ∗ ) = 1. Wetherefore encounter again the problem of a Brownian harmonic oscillatorconfined between two walls, already discussed in Sect. 2.3. The solution ofthese equations are G ( p ) = 1 ǫ (cid:18) p − q ∗ I ( p √ a ) I ( q ∗ √ a ) (cid:19) and P − ( p ) = 12 (cid:18) − I ( p √ a ) I ( q ∗ √ a ) (cid:19) , with I ( x ) = Z x e v d v and a = ǫβ . To first order in δ → 0, Eq. (30) becomes − δǫ + δq ∗ ǫ √ a · I ′ ( q ∗ √ a ) I ( q ∗ √ a ) ≈ Γ δ √ a I ′ ( q ∗ √ a ) I ( q ∗ √ a ) . As expected, δ disappears from the equation, to give the following solutionfor the threshold q ∗ : q ∗ = β √ ǫ F − (cid:18) Γ ǫ / β (cid:19) where F ( x ) = x − I ( x ) /I ′ ( x ) . (34) une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance Some applications of first-passage ideas to finance Note that when ǫ ≪ 1, this equation can be expressed entirely in terms ofthe integrated predictability: p ∞ ( q ∗ ) = σ ∞ √ · F − (cid:18) Γ σ ∞ √ (cid:19) . This means that we can find the optimal threshold for a predictor by study-ing only its total predictive power (if we suppose of course that it satisfiesall the required properties).One can now study the limits of Eq. (34) for large and small valuesof the only remaining adimensional parameter η = Γ ǫ / /β . Interestingly, η ≈ F ( x ) are as follows: • If x ≫ 1, then R x e v d v ≪ e x , so F ( x ) ≈ x . • If x ≪ 1, then F ( x ) ≃ x − (1 − x ) R x (1 − v )d v ≈ x / η ≫ 1, the threshold is simply given by q ∗ = Γ ǫ . Thisresult is rather intuitive: if β is very small then the predictability of thepredictor is weak, compared to the trading cost. Hence, it makes sense totry to catch any profitable opportunity, without taking future trading intoaccount. That is why we recover the na¨ıve solution of page 20. If on theother hand β ≫ Γ ǫ / then η ≪ 1, and F − ( η ) ≈ p η/ 2, which yields q ∗ = r · Γ β . This says that if β is large enough, the optimal threshold is independentof the mean-reversion parameter ǫ . The surprise, however, is the ratherunexpected dependence of the threshold q ∗ as the 1/3 power of the trad-ing costs. This result was obtained in the literature before, in the limitconsidered here of a continuous time random walk, see Refs. [33–35]. Ourformulation is however much more general, and would allow one to treatnon Gaussian and non stationnary situations as well. une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance R. Chicheportiche, J.-P. Bouchaud 5. Some open problems We presented three very different examples of “first passage time” problemscoming from quantitative finance. Let us discuss some extensions and openissues concerning these three problems.As far as the Kolmogorov-Smirnov goodness-of-fit test is concerned, webelieve that extensions of this test to higher-dimensional, multivariate set-tings, would be quite interesting. More precisely, the concept of “copulas”(that describe the correlation structure between dependent variables) hasbecome an important one in theoretical finance in the recent years. Forpairs of dependent variables, the copula C ( u, v ) is an increasing functionof both its arguments, from [0 , × [0 , 1] to [0 , C ( u, v ) = uv . It turns outthat it is always possible to transform an arbitrary copula into the indepen-dent one by an appropriate change of variables, ( u, v ) → ( s, t ) [36, 37]. Onecan then, in the spirit of KS, test the GoF in a copula independent manner.The problem boils down to estimating the distribution of the maximum ofa pinned “Brownian sheet” that generalizes the Brownian bridge describedabove. This is still an unsolved problem, but there is a hope that an exactsolution can be found. Extensions to weights that emphasize the “tails” ofthe copula, similar to our one-dimensional problem above, would be quiteinteresting too.The second problem, concerning the optimal selling time, is interestingfrom a mathematical/pedagogical point of view, but the final result turnsout to be quite trivial from a financial point of view. A more interestingproblem would be to add some correlations in the returns, accounting fortrends or mean-reversion, for example with an exponentially decaying corre-lation function of the lag that would allow to make the problem Markovian.Finally, the issue of optimal strategies in the presence of transactioncosts would deserve much more attention. One particularly relevant en-deavor would be to solve the problem in the presence of both linear and quadratic costs, i.e. when the cost of a change of position ∆ π is of the formΓ | ∆ π | + Γ ′ | ∆ π | . The case treated in this review corresponds to Γ ′ = 0,but in practice price impact is very important: prices tend to go up whenone buys, and down when one sells. une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance Some applications of first-passage ideas to finance References [1] E. Derman and P. Wilmott. The financial modelers’ manifesto. Online blog.[2] R. C. Merton, On the pricing of corporate debt: The risk structure of interestrates, The Journal of Finance . (2), 449–470 (1974).[3] J. C. Hull, Options, Futures and Other Derivatives . Prentice Hall financeseries, Prentice Hall Higher Education (2009).[4] R. Chicheportiche and J.-P. Bouchaud, Weighted Kolmogorov-Smirnov test:Accounting for the tails, Physical Review E . , 041115 (Oct, 2012).[5] A. N. Kolmogorov, Sulla determinazione empirica di una legge di dis-tribuzione, Giornale dell’Istituto Italiano degli Attuari . (1), 83–91 (1933).[6] N. Smirnov, Table for estimating the goodness of fit of empirical distribu-tions, The Annals of Mathematical Statistics . (2), 279–281 (1948).[7] J. L. Doob, Heuristic approach to the Kolmogorov-Smirnov theorems, TheAnnals of Mathematical Statistics . (3), 393–403 (1949).[8] E. V. Khmaladze, Martingale approach in the theory of goodness-of-fit tests, Theory of Probability and its Applications . , 240 (1982).[9] R. Chicheportiche and J.-P. Bouchaud, Goodness-of-fit tests with depen-dent observations, Journal of Statistical Mechanics: Theory and Experiment . (09), P09003 (2011).[10] T. W. Anderson and D. A. Darling, Asymptotic Theory of Certain “Good-ness of Fit” Criteria Based on Stochastic Processes, The Annals of Mathe-matical Statistics . (2), 193–212 (1952).[11] D. A. Darling, The Kolmogorov-Smirnov, Cramer-von Mises Tests, The An-nals of Mathematical Statistics . (4), 823–838 (1957).[12] P. L. Krapivsky and S. Redner, Life and death in an expanding cage andat the edge of a receding cliff, American Journal of Physics . (5), 546–551(1996).[13] A. J. Bray and R. Smith, The survival probability of a diffusing particleconstrained by two moving, absorbing boundaries, Journal of Physics A:Mathematical and Theoretical . (10), F235 (2007).[14] A. J. Bray and R. Smith, Survival of a diffusing particle in an expandingcage, Journal of Physics A: Mathematical and Theoretical . (36), 10965(2007).[15] A. Clauset, C. R. Shalizi, and M. E. J. Newman, Power-law distributions inempirical data, SIAM review . (4), 661–703 (2009).[16] S. Redner, A guide to first-passage processes . Cambridge University Press,Cambridge, UK (2001).[17] M. No´e and G. Vandewiele, The calculation of distributions of Kolmogorov-Smirnov type statistics including a table of significance points for a particularcase, The Annals of Mathematical Statistics . (1), 233–241 (1968).[18] M. No´e, The calculation of distributions of two-sided Kolmogorov-Smirnovtype statistics, The Annals of Mathematical Statistics . (1), 58–64 (1972).[19] H. Niederhausen. Tables of significance points for the variance-weightedKolmogorov-Smirnov statistics. Technical report, Stanford University, De-partment of Statistics (February, 1981). une 14, 2013 0:8 World Scientific Review Volume - 9in x 6in FPTinFinance R. Chicheportiche, J.-P. Bouchaud [20] R. R. Wilcox, Percentage points of a weighted Kolmogorov-Smirnov statistic, Communications in Statistics - Simulation and Computation . (1), 237–244(1989).[21] L. Turban, Anisotropic critical phenomena in parabolic geometries: the di-rected self-avoiding walk, Journal of Physics A: Mathematical and General . , L127 (1992).[22] W. N. Mei and Y. C. Lee, Harmonic oscillator with potential barriers —exact solutions and perturbative treatments, Journal of Physics A: Mathe-matical and General . , 1623 (1983).[23] I. S. Gradshteyn and I. M. Ryzhik, Table of Integrals, Series and Prod-ucts. Corrected and Enlarged Edition . Academic Press, New York, London,Toronto and Tokyo (1980).[24] S. N. Majumdar and J.-P. Bouchaud, Optimal time to sell a stock in theBlack-Scholes model: comment on Ref. [25], Quantitative Finance . (8),753–760 (2008).[25] A. Shiryaev, Z. Xu, and X. Y. Zhou, Thou shalt buy and hold, QuantitativeFinance . (8), 765–776 (2008).[26] W. Feller, An introduction to probability theory and its applications . vol. 1and 2, Wiley Series in Probability and Mathematical Statistics , John Wiley& Sons, New York (1968).[27] S. N. Majumdar, Brownian functionals in physics and computer science, Current Science . (12), 2076 (2005).[28] J. Randon-Furling and S. N. Majumdar, Distribution of the time at whichthe deviation of a Brownian motion is maximum before its first-passage time, Journal of Statistical Mechanics: Theory and Experiment . (10), P10008(2007).[29] S. N. Majumdar, J. Randon-Furling, M. J. Kearney, and M. Yor, On the timeto reach maximum for a variety of constrained Brownian motions, Journalof Physics A: Mathematical and Theoretical . (36), 365005 (2008).[30] P. L´evy, Sur certains processus stochastiques homog`enes, Compositio Math-ematica . , 283–339 (1939).[31] J. De Lataillade, C. Deremble, M. Potters, and J.-P. Bouchaud, Optimaltrading with linear costs, arXiv preprint q-fin.PM/1203.5957 (2012).[32] R. E. Bellman, Dynamic Programming . Dover Books on Mathematics, DoverPublications (2003).[33] L. C. G. Rogers. Why is the effect of proportional transaction costs O ( δ / )?In Contemporary Mathematics , vol. 351, pp. 303–308, American Mathemat-ical Society, Providence, RI (2004).[34] R. J. Martin and T. Sch¨oneborn, Mean reversion pays, but costs, Risk Mag-azine . pp. 96–101 (Feb, 2011).[35] R. J. Martin, Optimal multifactor trading under proportional transactioncosts, arXiv preprint q-fin.TR/1204.6488 (2012).[36] R. Chicheportiche.