## Figures

## Abstract

Geometric phases describe how in a continuous-time dynamical system the displacement of a variable (called phase variable) can be related to other variables (shape variables) undergoing a cyclic motion, according to an area rule. The aim of this paper is to show that geometric phases can exist also for discrete-time systems, and even when the cycles in shape space have zero area. A context in which this principle can be applied is stock trading. A zero-area cycle in shape space represents the type of trading operations normally carried out by high-frequency traders (entering and exiting a position on a fast time-scale), while the phase variable represents the cash balance of a trader. Under the assumption that trading impacts stock prices, even zero-area cyclic trading operations can induce geometric phases, i.e., profits or losses, without affecting the stock quote.

**Citation: **Altafini C (2016) The Geometric Phase of Stock Trading. PLoS ONE 11(8):
e0161538.
https://doi.org/10.1371/journal.pone.0161538

**Editor: **Zhong-Ke Gao,
Tianjin University, CHINA

**Received: **March 15, 2016; **Accepted: **August 8, 2016; **Published: ** August 24, 2016

**Copyright: ** © 2016 Claudio Altafini. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

**Data Availability: **All relevant data are within the paper and its Supporting Information files.

**Funding: **This work was funded in part by a grant from the Swedish Research Council (grant n. 2015-04390).

**Competing interests: ** The author has declared that no competing interests exist.

## Introduction

Geometric phases are “cycles that effect changes” [1]. They appear in systems in which a cyclic change in some of the variables (called *shape* variables) induces a non-zero net motion on other variables (called *phase* variables). They are well studied phenomena for instance in classical and quantum mechanics [2–4], molecular systems, [5], robotics [6, 7] and control theory [8]. They explain how a falling cat can manage to land always on its feet [9], how a bacterium can propel itself in a highly viscous fluid [10], and how we can parallel park a car [11], see [12] for an overview.

Originally introduced in quantum physics by Berry [13], they are normally used in conjunction with nonintegrable systems of continuous-time ordinary differential equations (ODEs). When a cyclic trajectory is generated in shape space, nonintegrability of the ODEs induces a motion which is non-periodic in phase space, see Fig 1(a). The amplitude of this phase displacement is proportional to the area of the cyclic path in shape space. In particular, a zero-area cycle yields no geometric phase.

Panel (a): classical picture for geometric phase of a continuous-time dynamical system: a cyclic path in shape space (orange curve) induces a net motion on the phase variable (blue curve), proportional to the area of the cycle in shape space, see Supplementary Notes for an explicit model. Panel (b): geometric phase for a discrete-time dynamical system. A cyclic trajectory, even of zero-area in shape space (orange), induces a net nonzero motion in the phase variable (blue). In the stock trading application, the shape variables are the amount of stocks owned by a trader and the stock quote. The phase variable is the cash balance of the trader.

The first aim of this work is to shown that the situation is different when we consider difference equations in discrete time. We show in the paper that for nonintegrable systems in discrete-time, the geometric phase need not obey an area rule, i.e., also a zero-area cycle in shape space can induce a nontrivial geometric phase. Some of the peculiarities of nonintegrable discrete-time dynamical systems have been known since several decades in control theory [14, 15]. For instance [15, 16] develop the discrete-time equivalent of a Volterra series and the elements of chronological calculus needed to deal with such formal power series; [14] survey the controllability of nonlinear discrete-time systems from a Lie-algebraic perspective; [17] studies invariance of discrete-time distributions of vector fields, [18] their linearization via feedback transformations, and so on. However, in our knowledge the properties of discrete-time geometric phases have never been investigated, let alone the existence of phase motions induced by zero-area shape cycles.

The second aim of this paper is to present an application where discrete-time zero-area geometric phases admit a useful interpretation. The application we want to discuss is stock trading. In the idealized stock exchange we consider, we can take as shape variables the amount of a certain stock owned by a trader and the quote of that stock. The phase variable is the cash balance of our trader, which is a function of how many stocks are bough/sold but also of the quote at which they are bought/sold. The product of these two quantities gives the nonlinearity required to have a nonintegrable system of difference equations. The discrete events which constitute the time instants of interest for our model are the trading events that concern the stock we are dealing with. Using a discrete-time dynamics for them is natural, especially when fast time scales are considered. At the most microscopic time scale (microsecond or less), in fact, the dynamics of stock trading consists of a series of events like emission of orders by the traders and order execution by the stock exchange engine (other more complex processes like order redirections among different stock exchanges are not considered).

Assume that our trader is the only actor in our stock market, and that his market orders (i.e., orders to buy or sell at the current best available price) are executed against a limit order book, i.e., a book of orders to buy or sell at prespecified stock prices [19, 20]. Assume further that trading impacts prices, i.e., a buy order drives prices up, while a sell order drives prices down. When nothing else happens to our stock, a zero-area cyclic trajectory in shape space is a sequence of a buy order followed by a sell order of equal magnitude, see Fig 1(b). At the end of the cycle, the stock quote (a shape variable) is unchanged, as the two price impacts compensate each other. However the cash balance of the trader (the phase variable) is *not* zero at the end of the cycle. In fact, the quote at which the stocks are bought does not contain the price variation due to the action of buying itself. However, this price impact is incorporated in the quote at selling time, which makes the quote at which stocks are sold higher than that at which the stocks are bought, as an effect of the act of trading itself. This is the geometric phase of stock trading.

In what follows an idealized scenario is presented first, as a way to shown that nontrivial geometric phases for zero-area shape trajectories indeed exist. The scenario is then rendered more realistic by incorporating in the model a bid/ask spread for the stock quote, commission fees, a stock quote drift (representing the operations of all other traders of the same stock), and general models of price impact, without altering the nature of the geometric phase phenomenon just described.

Entering and liquidating a position, possibly very quickly, is the typical pattern of high-frequency trading (i.e., fast computerized trading with short holding periods and no inventory [21–24]). The small margins (“pennies”) of gains or losses resulting from such “round trip” operations resemble very much the tiny values that the discrete-time geometric phase accumulates at the end of a cycle. In order for such cyclic trade operations to yield a penny profit, there must be an increase of the stock quote between the event of buy and that of sell for a buy-then-sell cycle, or a decrease for a sell-then-buy cycle. Clearly many forces are normally at work in a stock market to induce such price changes, most of them out of control of a single trader. However, it is tempting to speculate that on the very short time scale also the “endogenous” price impact induced by the operations carried out by the trader performing the round trip contributes to move the prices in the right direction. When a stock quote has a big spread between its bid and ask prices, then such an endogenous quote movement is clearly not enough to compensate for the spread gap. However, when the spread is small and the limit order book has sufficient depth and a high rate of limit order arrival on both bid and ask sides (situation which is normally referred to as “locked” market [20] and which is not so uncommon for highly traded stocks), then geometric phases induced by endogenous price impacts may in principle be able to compensate for the quote spread, and may contribute actively to the penny profit of cyclic trade operations. Models are developed in the paper to try to quantify this contribution.

A situation in which the endogenous price impact is potentially playing a major role is when high frequency traders can anticipate (“front-run”) the operations of slower “classical” traders. We show in the paper that such interlacing of fast cycles and slow classical operations is essentially a way of increasing the price impact (and hence the geometric phase) of the fast trader performing a cycle in shape space, at the expense of the slow trader who looses part of his geometric phase (recall that the geometric phase corresponds to the cash balance of a trader). Practices like front-running are sometimes attributed to high-frequency trading [25].

## Models

Consider an idealized “stock exchange” scenario consisting of a single trader trading on a single stock through market orders, executed against a limit order book ([19], more details are given below). Denote *y*(*t*) the quantity of stocks owned by the trader at time *t* and with *s*(*t*) the stock quote. When the trader buys or sell stocks, his cash balance *z*(*t*) changes accordingly.

We make the assumption that trades impact prices: selling stocks drives prices down, while buying stocks drives prices up. In discrete time an elementary model for the scenario being considered is the following:
(1) (2) (3)
Here *u*(*t*_{i}) = *y*(*t*_{i+1}) − *y*(*t*_{i}) is the amount of stock being bought (*u*(*t*_{i})>0) or sold (*u*(*t*_{i})<0) at time *t*_{i} by the trader. At time of execution, a buy order (*u*(*t*_{i})>0) raises the quote of the stock, i.e., *s*(*t*_{i+1})>*s*(*t*_{i}), while the cash balance decreases *z*(*t*_{i+1})<*z*(*t*_{i}). The events represented by eqs (1)–(3) all have the same time stamp *t*_{i}, meaning that for all 3 equations the variables are updated at the next time instant, *t*_{i+1}. The length of the time interval Δ*t*_{i} = *t*_{i+1} − *t*_{i} can be very small, provided that Δ*t*_{i} > 0. The coefficient *r* quantifies the price impact, i.e., how influential an order is for a certain stock. Its value may depend on the total volume of the stock, its liquidity, volatility, frequency of buy vs sell orders, number of traders, etc. A basic dynamical model is described for instance in [26]. For the purposes of this paper, and given that we are interested in tracking the activity of a single trader, assuming a constant *r* is enough, although a more general formula will be provided later on. In vector form, calling the state of the system, the eqs (1)–(3) can be written as
(4)
In eq (4), *u*(*t*) can be considered as the input of the system.

Assume that the trader performs a cyclic operation, consisting in buying a certain amount *k* of stocks at time *t*_{b} and then reselling them at a later time *t*_{s}. The time unfolding of events for this “buy-then-sell” cycle is shown in Fig 2, panels (a) and (b). Denote *t* = 0 the starting time, and *t*_{end} any time larger that *t*_{s}. The buy-then-sell cycle corresponds to the input pattern (see Fig 2(a), top subplot)
(5)
If no other trading operation happens during the time interval, the evolution of the state vector is
(6)
In other words, the net amount of stock owned by the trader at the end of the cycle is equal to that at the start: *y*(*t*_{end}) = *y*(0). When no other operation happens during the time interval then also *s*(*t*_{end}) = *s*(0), i.e., the stock quote is unchanged. However, if *r* > 0, the cash balance is positive, i.e, *z*(*t*_{end}) = *z*(0)+*rk*^{2} > *z*(0). Such a positive cash balance is solely due to the price impact of the transactions being made by our trader. It is proportional to the square of the number of stocks traded. A similar result occurs for a sell-then-buy cycle, which also leads to *z*(*t*_{end}) > *z*(0), see Fig 3. In both cases, while *y*(*t*) and *s*(*t*) accomplishes a cyclic trajectory returning to their starting point, *z*(*t*) does not. The key in understanding why a nonzero cash flow is generated by cyclic operations lies in the nonlinearity of the difference eq (3), namely *s*(*t*)*u*(*t*) is a bilinear term, i.e., linear, but simultaneously so, in both state and input. This nonlinearity introduces a behavior which is typical of nonintegrable vector fields [7, 8].

Panel (a): time profiles of the variables for a single buy-then-sell cycle. Panel (b): corresponding shape and phase space profiles. At time *t*_{b} = 20 the trader buys a unit of stock. The stock quote s increases consequently because of the price impact of the operation, while the cash balance *z* becomes negative. At time *t*_{s} = 80 the stock is sold and the stock quote returns to the level it had at *t* = 0. However, the cash balance *z* becomes positive because the stock is sold at a price higher than it was bought. The shape trajectory of the variables (*y*, *s*) is cyclic and has zero area (orange curve in panel (b)). The phase variable *z* experiences a net displacement because of the cycle, i.e., a geometric phase is produced (blue curve in panel (b); the starting point is the green dot and the final point is the red dot). Panels (c) and (d): When the stock quote is allowed to drift because of the operations of other traders, then periodic operations of a trader no longer result in cyclic trajectories in shape space (*y*, *s*). However a geometric phase in the *z* variable is still present and keeps building up whenever the trader completes a cycle of operations. In panel (c), the plot for s shows in black the stock quote in absence of trading cycles, and in red the deviations due to these trading cycles, visible only during the intervals in which stocks are hold (or shorted, for sell-then-buy cycles). Such red deviations are a direct consequence of our price impact assumption, and induce the accumulation of positive cash balance (green trace in (c)).

Panel (a): time profiles of the variables. Panel (b): shape and phase space profiles. Also in this case the trader obtains a profit from the cyclic operation (red dot in panel (b) is above the green dot), because the stock is bought at a lower price than it was sold.

The classical description of geometric phase one finds in the literature [3, 8] deals with nonlinear continuous-time vector fields, in which 2 or more of the variables (corresponding to our *y*(*t*) and *s*(*t*)) evolve on a shape space, and the remaining variables (here *z*(*t*)) on a phase space above the shape space, see Fig 1(a). Cyclic trajectories in shape space yield a net motion on the phase variable which is proportional to the area of the cyclic shape trajectory and it is zero when this area is zero, see Fig A of S1 File.

In discrete-time, however, the picture is different. As shown in Fig 2 and as computed explicitly in eq (6), even a zero-area cyclic trajectory in shape space yields a non-zero motion on the phase variable. In our specific example, the origin of the positive cash flow induced by a cyclic trajectory (entering then exiting a position) is due to the fact that stocks are bought at a lower price *s*(*t*_{b}) and are sold at a higher price *s*(*t*_{s}), see Fig 2. The price increase is due to our assumption that stock trades impact stock quotes. The argument is analogous if the cycle consists of a sell-then-buy: in this case the quote at selling time is higher than that at buying time, see Fig 3.

### Effect of a market drift

Let us now consider a scenario in which the stock price is driven by the operations of our trader but also by a random variable representing the trading operations of all other traders of the stock we are considering. The system eqs (1)–(3) modifies as
(7) (8) (9)
where we still assume that operations of our trader are cyclic and follow eq (5), but Eq (8) has an extra drift term. At the end of a buy-then-sell cycle, instead of eq (6) we have:
(10)
i.e., the stock trend in the hold interval [*t*_{b}, *t*_{s}] also affects the cash flow of our trader, but only as a first order term of the number of stocks held during the cycle, as opposed to the second order term of the noncommutative effect corresponding to the geometric phase. Iterating over many cyclic operations of our trader, initiated at time instants {*t*_{b}} drawn from a Poissson process, and drawing also {*t*_{s} − *t*_{b}} from a Poisson distribution of shorter mean arrival time, then the stochastic difference eqs (7)–(9) is such that at *t*_{end}, *y*(*t*_{end}) = *y*(0), while instead now the stock quote has a nontrivial trend *s*(*t*_{end}) ≠ *s*(0). From eq (10), the influence of the stock trend on the cash balance can be made small by reducing the length of the time interval [*t*_{b}, *t*_{s}], so that regardless of the value of the drift term {*w*(*t*_{i})}, it is possible to obtain *z*(*t*_{end}) > *z*(0) = 0. Hence, provided that a cycle is completed at sufficiently high frequency, the price impact induced by the cycle itself can still dominate the trend imposed by the market. A sample trajectory depicting this situation is shown in Fig 2(c) and 2(d). In panel (c), in the plot of *s*, the stock quote driven only by {*w*(*t*_{i})} is shown in black. The red deviations appearing in the plot correspond to the price impact of the operations carried out by our trader which in the model (8) are superimposed to {*w*(*t*_{i})}. In fact, combining eqs (6) and (10) for a single buy-then-sell cycle the value of *s* in the holding interval [*t*_{b}, *t*_{s}] is given by
i.e., the extra term *rk* must be added to {*w*(*t*_{i})}.

### Effect of bid-ask spread

In real stock exchanges a buy (market) order is compared with a limit order book: the limit order with best ask price is matched to the market order, and if needed the book is “walked” to the next ask offer and so on until the order is completely executed (order redirection towards other stock exchanges is neglected here) [19, 20]. Consequently the spread between the best ask and best bid price increases and the midprice (which in our model is the stock quote) is pushed up. If nothing else happens after the execution of the order, then when trying to complete the cycle the best bid price is unchanged (and below both the new and old original stock quote), hence the cycle results in a net loss rather than a profit as we are showing here, see Fig 4. However if the market has sufficient depth and the bid-ask spread is small and remains small throughout the process, for instance because new limit orders on both ask and bid side keep arriving at high rate (“locked” or “nearly locked” markets), then it may still happen that a raising stock price drives the new best bid price above the old ask price (value at which the stock was bought), see Fig 5.

The buy order empties the shaded red region of the ask side of the limit order book. The stock quote (midprice) consequently increases, while the best bid price (blue) remains unchanged. The sell order needed to complete the cycle settles at a price below the original buy price, hence the cycle results in a net loss for the trader.

In a deep market with many buy and sell orders arriving continuously, the spread remains small around the midprice, even after the execution of the buy order has raised the stock quote. Hence the price impact of the buy order can lead to a new best bid price which is above the quote at which the buy order was executed. In this case, completing the cycle indeed results in a net gain.

Assume that the stock quote *s*(*t*_{i}) is equal to the midprice between best ask *a*(*t*_{i}) and best bid *b*(*t*_{i}) prices, and that the bid-ask spread *q* around *s*(*t*_{i}) is constant (i.e., *a*(*t*_{i}) = *s*(*t*_{i}) + *q*/2, and *b*(*t*_{i}) = *s*(*t*_{i}) − *q*/2). To take into account the bid-ask spread in our model, Eq (3) must be replaced by
(11)
At the end of the cycle, the cash balance from eq (11) is *z*(*t*_{end}) = *z*(0) + *rk*^{2} − *qk*. If we include also a fee for each trading operation (assumed constant and equal to *c*), then
(12)
Hence a cycle yields a net profit if *z*(*t*_{end}) − *z*(0) = *rk*^{2} − *qk* − 2*c* > 0. See Fig 6 for an example of how spread can reduce gains (or induce losses) in *z*(*t*). In eq (12), if the market is deep enough and the spread limited enough, then *z*(*t*_{end}) − *z*(0) can be made positive by choosing a sufficiently high value for *k*. Regardless of its sign, the quantity *z*(*t*_{end}) − *z*(0) is still a geometric phase, representing profit when *z*(*t*_{end}) − *z*(0) > 0 or losses when *z*(*t*_{end}) − *z*(0) < 0.

Panel (a): In Eq (12), the presence of a quote spread decreases the value of *z*(*t*_{end}) − *z*(0) i.e., the geometric phase at the end of a cycle. In the plot for *z*, if the green curve corresponds to *q* = *c* = 0, the magenta and brown curves correspond to different choices of these parameters. Depending on the values of *r*, *q* and *c*, the geometric phase can correspond to a profit (green and magenta curves, *z*(*t*_{end}) > *z*(0)), or to a loss (brown, *z*(*t*_{end}) < *z*(0)). Panel (b): The geometric phase (and the corresponding profits or losses) accumulates over repeated trading cycles. For short trading cycles the presence of a stock drift {*w*(*t*_{i})} does not alter the result, i.e., what happens in a single cycle (panel (a)) to the cash balance *z*(*t*) happens also when many cycles are performed in presence of stock drift {*w*(*t*_{i})} (panel (b)).

In presence of a drift term {*w*(*t*_{i})} for the stock price as in eqs (7)–(9), the cash balance can be modified according to Eq (10) as
As already mentioned, when the hold interval [*t*_{b}, *t*_{s}] is short, so is the effect of the drift term on the final value of the cash balance. Fig 7 shows the value of *z*(*t*_{end}) as we vary the number of trading cycles and the average duration of the hold intervals for a large number of realizations {*w*(*t*_{i})}. When in a formula like eq (12) the geometric phase is positive (*z*(*t*_{end})>*z*(0)), then even in presence of drift the cash flow remains positive at least as long as [*t*_{b}, *t*_{s}] is sufficiently short compared to *σ*. Short-lived deviations in the stock quote are enough to manifest the noncommutativity effect we are describing here. In Fig 7, notice how rather than to the quote drift, *z*(*t*_{end}) is correlated to the number of trading cycles carried out in [0, *t*_{end}] (which follows from *r* being a constant).

Each dot is the result of 1000 simulations, under the assumption that *z*(*t*_{end}) − *z*(0) ≥ 0 when the stock drift is absent (formula (12)). The number of cyclic operations is considered itself a random variable (denoted “n. of trade cycles”), and so is the duration of the holding intervals [*t*_{b}, *t*_{s}] (denoted “mean duration of cycle”). For short cycles (with respect to the standard deviation *σ* of the stock drift term), the trader always obtains a profit (panel (a)). The profit is proportional to the number of trade cycles performed by the trader (panel (b)). The correlation tends to get lost when the mean duration of the trade cycles becomes large (red dots in panels (b) and (c)). For short cycles, the profit happens independently of the stock trend (blue dots in panel (d)). Also when the trade cycles become long and profit may be lost, there is no significant correlation between *z* and *s* (panel (d)).

### Effect of more complex price impact formulas

All models discussed in the paper make use of a linear and constant formula for describing the price impact of trading operations on the stock quote. However, any nonlinear function of the trader’s orders can be used instead of eq (2), for instance
(13)
where *r*(*u*) is any time-invariant function of *u* such that
(14)
If *r*(⋅) is an odd function, i.e., *r*(−*u*) = −*r*(*u*), then the neutrality of the stock quote to cyclic trades is preserved, that is, in absence of drift *s*(*t*_{end}) = *s*(0) and our arguments are still valid. For instance, combining eqs (13) and (14) with the spread model (11) and the constant trading fee *c* yields
which becomes
when also the drift term {*w*(*t*_{i})} is considered.

### Gaining phase by front-running an order

When multiple traders are considered simultaneously, an “easy” way to guarantee that a trader has a positive cash balance is to have him front-run somebody’s else orders, a strategy sometimes imputed to certain aggressive high-frequency traders [25]. Consider two traders, one “classical” (indexed by *c*) and one high-frequency (indexed by *h*). Assume that each order entered by the classical trader is executed slowly and front-run (i.e., anticipated) by the high-frequency trader. Practically, this can be achieved by a combination of lower latency in order execution, colocalization and order rerouting among different physical stock exchanges [25]. If and are the execution times of the buy and sell order of the classical trader, then let and , be those of the high-frequency trader. As shown in Fig 8, a buy order initiated by the classical trader triggers a first price increase at (high-frequency trader order execution) and a second one at (classical trader order execution). If the high-frequency trader resells his stocks right after , then he can benefit (also) of this second price increase to make a profit. Using equations similar to eqs (1)–(3) to describe the system:
(15) (16) (17)
At the end of a cycle for both traders (
), we have
(18) (19)
where *k*_{c} and *k*_{h} are the amount of stocks traded by the classical and high-frequency trader during the cycle. Comparing eqs (18) and (19) with eq (6), it can be seen that , meaning that for the classical trader the “benefit” of the geometric phase in terms of cash balance is eroded when a high-frequency trader front-runs his orders. On the contrary, for the high-frequency trader , meaning that front-running the order leads to an extra gain. In particular, if the quantities traded by the two actors are equal, *k*_{h} = *k*_{c}, then
i.e., the price increase of the classical trader in cyclic operations is completely lost, to the benefit of the high-frequency trader. If instead *k*_{h} > *k*_{c}, then the cycle always results in a loss for the classical trader: *z*_{c}(*t*_{end}) < *z*_{c}(0). Analogous considerations apply to the more complex models discussed in this paper, incorporating quote drift, quote spread and alternative price impact formulas.

A high-frequency trader that can anticipate the operations of a slower classical trader can benefit of the price impact created by the latter, in addition to the one induced by his own trades. In the top plot of both panels, the high-frequency trader input *u*_{h} (green) always precedes the moves of the classical trader (*u*_{c}, blue). In the plot for *s* of both panels the black trace (denoted *s*_{o}) represents the stock quote in absence of high frequency trader, while the red trace (*s*) is the stock quote in presence of a front-running high-frequency trader. The geometric phase (and hence any possible profit) tends to swap from the classical trader to the high-frequency trader. For the classical trader, the profit in presence of a front-runner is reduced (blue curve in the lower plot of both panels, denoted *z*_{c}) with respect to the same curve in absence of front-run (magenta curve, denoted ).

## Discussion

A continuous-time equivalent of the models (1)–(3) is presented in the Supplementary Notes. For it, a periodic input trajectory induces a zero-area cyclic path in shape space, which however results in no neat motion of the phase variable, see Fig A of S1 File. Only when the area of the cyclic path in shape space becomes nonzero a geometric phase can appear, but for that to happen we have to modify the continuous-time model (for instance adding a time delay in the update law for the stock quote, see Fig B of S1 File). This confirms that the geometric phase described in this paper is intrinsically a discrete-time phenomenon, with no continuous-time counterpart.

Repeating a multitude of cycles on a fast time scale is a hallmark of high-frequency trading, which nowadays in certain equity markets like the US stock market constitutes around 50% of the total trading volume [21, 22, 24]. There is no consensus in the literature on what are the sources of profit of high frequency trading operations of this type [20, 23, 24, 27, 28], other than “penny” profits must accumulate from each trading cycle. What the existence of a geometric phase suggests is that in principle tiny profits (or losses, when *z*(*t*_{end}) − *z*(0) < 0) can be made through pure speculation, without holding any inventory position except for imperceptible amounts of time.

If information on future market operations is available (like when speed is used to front-run upcoming orders), then this can be used to increase the chances of making profits by incorporating the geometric phase induced by the operations of the trader being front-run into that of the front-runner doing a cycle.

Another conceptual consideration that follows from our models is that, as long as one considers cyclic operations, in principle profits or losses can be made with stock trading in a way that does not affect the main observable of a stock market, namely the quote of a stock. Making such profits (or losses) does not require any knowledge of market fundamentals, as the geometric phase just uses the price momentum induced by the act of trading itself, a bit like a self-fulfilling prophecy. And this notwithstanding any “efficient market” theory.

## Supporting Information

### S1 File. Contains supplementary text (continuous-time model) and supplementary figures.

https://doi.org/10.1371/journal.pone.0161538.s001

(PDF)

## Author Contributions

**Conceptualization:**CA.**Data curation:**CA.**Formal analysis:**CA.**Funding acquisition:**CA.**Investigation:**CA.**Methodology:**CA.**Project administration:**CA.**Resources:**CA.**Software:**CA.**Supervision:**CA.**Visualization:**CA.**Writing – original draft:**CA.**Writing – review & editing:**CA.

## References

- 1.
Brockett RW. Cycles That Effect Change. In: National Research Council, editor. Motion, Control and Geometry. Proc. of a Symposium. http://www.nap.edu/catalog/5772.html: National Academy Press; 1997.
- 2. Berry M. Anticipations of the geometric phase. Physics Today. 1990;43(12):34–40.
- 3.
Marsden JE, Ratiu TS. Introduction to Mechanics and Symmetry. vol. 17 of Texts in Applied Mathematics. 2nd ed. Springer-Verlag; 1999.
- 4.
Wilczek F, Shapere A. Geometric Phases in Physics. Advanced Series on Directions in High Energy Physics. World Scientific; 1989.
- 5. Mead CA. The geometric phase in molecular systems. Rev Mod Phys. 1992;64:51–85.
- 6.
Laumond JP, editor. Robot Motion Planning and Control. Lecture notes in control and information sciences. London, UK: Springer-Verlag; 1998. https://doi.org/10.1007/BFb0036069
- 7.
Murray RM, Li Z, Sastry SS, Sastry SS. A Mathematical Introduction to Robotic Manipulation. Taylor & Francis; 1994.
- 8.
Bloch AM. Nonholonomic Mechanics and Control. vol. 24 of Interdisciplinary Applied Mathematics. Springer-Verlag; 2003.
- 9.
Montgomery R. Gauge theory of the falling cat. In: Enos MJ, editor. Dynamics and control of mechanical systems: The falling cat and related problems. Providence, RI: American Mathematical Society; 1993. p. 193–218.
- 10. Shapere A, Wilczek F. Geometry of self-propulsion at low Reynolds number. Journal of Fluid Mechanics. 1989;198:557–585.
- 11. Murray R, Sastry S. Nonholonomic motion planning: steering with sinusoids. IEEE Trans on Automatic Control. 1993;38:700–716.
- 12. Batterman RW. Falling cats, parallel parking, and polarized light. Studies in History and Philosophy of Science Part B: Studies in History and Philosophy of Modern Physics. 2003;34(4):527–557.
- 13. Berry MV. Quantal Phase Factors Accompanying Adiabatic Changes. Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences. 1984;392(1802):45–57.
- 14. Jakubczyk B, Sontag ED. Controllability of Nonlinear Discrete-Time Systems: A Lie-Algebraic Approach. SIAM Journal on Control and Optimization. 1990;28(1):1–33.
- 15.
Monaco S, Normand-Cyrot D. Nonlinear Systems in Discrete Time. In: Fliess M, Hazewinkel M, editors. Algebraic and Geometric Methods in Nonlinear Control Theory. Dordrecht: Springer Netherlands; 1986. p. 411–430. https://doi.org/10.1007/978-94-009-4706-1_21
- 16. Monaco S, Normand-Cyrot D, Califano C. From Chronological Calculus to Exponential Representations of Continuous and Discrete-Time Dynamics: A Lie-Algebraic Approach. IEEE Transactions on Automatic Control. 2007;52(12):2227–2241.
- 17. Monaco S, Normand-Cyrot D. Invariant distributions for discrete-time nonlinear systems. Systems & Control Letters. 1984;5(3):191–196.
- 18. Grizzle JW, Kokotovic PV. Feedback linearization of sampled-data systems. IEEE Transactions on Automatic Control. 1988;33(9):857–859.
- 19. Gould MD, Porter MA, Williams S, McDonald M, Fenn DJ, Howison SD. Limit order books. Quantitative Finance. 2013;13(11):1709–1742.
- 20.
Cartea Á, Jaimungal S, Penalva J. Algorithmic and High-Frequency Trading. Mathematics, Finance and Risk. Cambridge University Press; 2015.
- 21.
Duhigg C. Stock Traders Find Speed Pays, in Milliseconds. New York Times. 2009;.
- 22.
Aldridge I. High-Frequency Trading: A Practical Guide to Algorithmic Strategies and Trading Systems. Wiley Trading. Wiley; 2013.
- 23. Brogaard J, Hendershott T, Riordan R. High-Frequency Trading and Price Discovery. Review of Financial Studies. 2014;
- 24. Carrion A. Very fast money: High-frequency trading on the NASDAQ. Journal of Financial Markets. 2013;16(4):680–711.
- 25.
Lewis M. Flash Boys: A Wall Street Revolt. W. W. Norton; 2014.
- 26. Cont R, Kukanov A, Stoikov S. The Price Impact of Order Book Events. Journal of Financial Econometrics. 2013;.
- 27. Hasbrouck J, Saar G. Low-latency trading. Journal of Financial Markets. 2013;16(4):646–679.
- 28. Menkveld AJ. High frequency trading and the new market makers. Journal of Financial Markets. 2013;16(4):712–740.