Predicting Stock Market Prices with Physical Laws J. T. Manhire ∗ Texas A&M University School of Law WORKING PAPER
Abstract
This paper argues that one can calculate the probability of an asset’s price displacement in a specific direction assuming the asset complies with the physical principle principle of least action. action. It first suggests that the price displacemen displacementt of a financial asset is essentially dampened harmonic motion and then applies physical principles such as the Lagrangian and stationary action to analyze this motion. From this analysis, the paper constructs a method to predict the probability of an asset’s asset’s price displacement displacement in both magnitude magnitude and direction. direction. Initial Initial tests show that the method produces accurate probability predictions. econophysics; asset prices; market model; probability; principle of least action; stock market; statistical finance; predictability
Keywords:
1. Overvie Overview w
This paper seeks to show that the probability of an asset’s price displacement in a specific direction can be calculated assuming the asset complies with the physical physical principle of least (i.e., stationary stationary)) action. We hypothesize hypothesize that, just as in classical mechanics, the action of an asset is the time integral of its Lagrangian, which is simply a collection of the asset’s equations of motion expressed in terms of position and velocity. Others Others have have postula postulated ted that that analyz analyzing ing an object’s object’s motion motion using using the Lagrangian method and its stationary action can accurately predict the probability for a specific event. event .1 We adopt these postulates in part and outline a method for calculating discrete and continuous probabilities of an asset’s change in price using only physical analogs. This theory is testable in part. The probability of an asset’s price displacement can be currently assessed by observing the occurrence of certain price ∗ Corresponding author: 1515 Commerce Street, Fort Worth, TX 76102 Email address:
[email protected] ( J. T. Manhire) P. Feynman, Space-Time Space-Time Approach Approach to Non-Relativistic Non-Relativistic Quantum Mechanics Mechanics , 20 Rev. Mod. Phys. 367, 367 (1948). 1 See R.
Prep Prepri rint nt subm submit itte ted d to Econ Econop ophy hysi sics cs Collo Colloqu quiu ium, m, July July 2017 2017..
Febru ebruar ary y 11, 11, 2017 2017
J. T. MAN ANHI HIRE RE — Pred Predic ictting ing Stoc tock Ma Mark rket et Pric rices
2
displacements using a very large historical price sample for specific financial assets and comparing the predictions of the theory with the true probabilities occurring in the stock market. market .2 We attempt this comparison with only two assets in Appendix A to this paper. These limited results show that the probabilities predicted by the theory’s equations are within 0.02 points (2 percentage points) points) of the probabilities probabilities calculated from over 11 years years of historical historical data. Although some might dismiss out of hand the possibility of this theory by stating flatly that “economics is not physics,”3 there seems to be little that would restrict analyzing a system representing the information generated by human interactions simply because the object of that system happens to be the specific category category of human interactio interaction. n. While it is true that at the individual level level it might be impossible (or at least extremely complex) to express the personal decisions and actions of an individual human person in mathematical terms and relations, much of this individuality is lost in the aggregate; especially when the magnitude of the aggregate is regularly in the millions or even billions. billions .4 One might expect to simply apply the standard equations of physical motion to arrive at our conclusion, but this proves not possible .5 We must accept the fact that certain modifications must be made in order to ensure our results match match experience. experience. These modification modificationss are not blind leaps of faith, but they are not direct derivation derivationss either. Although Although we will certainly certainly adopt quite a few physical equations, our primary concern is to adopt the ideas of physical motion as they might apply to the price movemen movementt of financial financial assets. Perhaps Perhaps then economics is not physics, but that is not to say that it is impossible for the two to be very closely related variants of each other, especially on the macro-level. We must also be clear as to the limits of this paper. What does this frame2 In
this way, our use of the term “probability” is consistent with the frequentist interpretation. See generally Ian Hacking, Hacking, The Emergence Emergence of Probabilit Probability: y: A Philosophical Philosophical Study Study of Early Early Ideas about Probability Probability,, Induction, Induction, and Stat Statistic istical al Inference Inference (2d ed., 2006). 3 See Ludwig von Mises, Mises, Social J. Soc. Soc. Phil Phil.. & Jur. Jur. Social Science and Natural Natural Science , 7 J. action , not with objects (as physics III (1942)(“Economics deals with human action physics does)....”) (emphasis (emphasis in original). original). 4 I’ve I’ve written written previous previously ly on this topic topic in the limited limited context context of tax complianc compliance. e. Here Here I expand the notion to other human interactive systems. See J. T. Manhire, Tax Tax Compliance Fla. Tax Rev. 235 (2016); J. T. Manhire, Deriving the Expected as a Wicked System , 18 Fla. Value of the Tax Underreporting Rate 2 J. Pol’y & Complex Sys. 4 (2015); J. T. Manhire, There Is No Spoon: Reconsid Reconsidering ering the Tax Compliance Puzzle , 17 Fla. Tax Rev. 623, 25761 (2015) J. Manhire, Toward Toward a Perspective-Dep Perspective-Dependent endent Theory Theory of Audit Probability Probability for Tax Others have written written about the unity of Va. Tax Rev. 629 (2014). Others Compliance Compliance Models Models, 33 Va. ecosystems and how small-scale and large-scale dynamics support and affect each other. See, ., James H. Bunn, The Natural Natural Law of Cycles: Cycles: Governing Governing the Mobile Symmetries Symmetries e.g ., (2014). We see a simila similarr issue issue with the statis statistica ticall mechan mechanics ics of Animals and Machines Machines (2014). ¨ r die von der molekulark of Brownian motion. See Albert Einstein, Uber Ube molekularkineti inetischen schen Theorie Theorie der W¨ arme geforderte geforderte Bewegung Bewegung von in ruhenden ruhenden Fl¨ ussigkeiten suspendierten suspendierten Teilchen , 17 Annalen der Physik 549 (1905). 5 Although others have certainly tried. See, e.g ., ., Belal E. Baaquie, A Path Integral Approach proach to Option Pricing with Stochastic Volatility: Volatility: Some Exact Results, 7 J. Phys. I France 1733 (1997).
§
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
3
work mean for our understanding of the true nature of financial assets and their movements? This theory provides no explanation for these phenomena. By the end of this paper, the reader will know no better what an asset really is, other than a system of information. The paper merely provides a new theory for measuring one aspect of our experience; a construct that hopefully surmounts earlier contradictions between economics and physics. As a consequence, the theory reported in the following pages might very well be wrong,6 although the very close match between the predicted and actual probabilities suggests there is something here worth investigating. Even if parts end up being incorrect, there is still value in looking at something from a completely different angle and explaining it in a fresh way. As Richard Feynman wrote in his own work on the principle of least action, “there is always the hope that the new point of view will inspire an idea for the modification of present theories.”7 The paper begins with an examination of how prices move for financial assets traded on an exchange and concludes such is an analog to harmonic oscillation. It then turns to constructing probabilities for specific price movements of an asset using the Lagrangian method and its principle of stationary action. Lastly, it combines the probability computations for price displacement magnitude and direction to formulate a single method of predicting the probability for a specific price displacement in a specific direction. 2. How Does an Asset Move in Price?
We would like to understand what causes the price of an asset to move. We would like even more to explain this motion generally and not just in specific situations. Let’s begin by looking at a typical stock chart and seeing what we can deduce from it. A stock chart is merely a physical representation of information.8 Let’s see if this physical representation has something to tell us 6 In
which case this paper will end up as just one more attempt to accomplish the “pathetic.” Paul Samuelson, Maximum Principles in Analytical Economics , in Nobel Lectures 68 (Assar Lindbeck ed., 1992) (“There really is nothing more pathetic than to have [someone] try to force analogies between the concepts of physics and the concepts of economics. How many dreary papers have I had to referee in which the author is looking for something that corresponds to entropy or to one or another form of energy.”). My colleagues Professors James McGrath and Saurabh Vishnubhakat correctly point out that there very well might be other reasons why the results match historical data other than the proposition that information is subject to physical laws. Additionally, Professor Vishnubhakat sees an inferential leap in concluding that observations of information being compliant with physical laws is evidence of information being subject to physical laws. Both statements are patently correct and reflect my own concerns about explaining observed phenomena with a very specific theory when, in fact, the exact same results can be just as accurately explained with a completely different theory. In the end, I accept these criticisms and acknowledge that they might apply here. 7 Feynman, supra note 1, at 368. 8 Cf . Rolf Landauer, Information Is Physical , Physics Today 23 (May 1991): Information is inevitably tied to a physical representation. It can be engraved
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
4
about the degree to which the asset as a system of information complies with physical laws.
Figure 1: SPDR Dow Jones Industrial Average (Ticker Symbol: DIA)
The chart in Figure 1 shows the SPDR Dow Jones Industrial Average (Ticker Symbol: DIA) for one week of trading. The time axis t is the abscissa and the price axis x is the ordinate. Let’s call the state of this asset at the very beginning of this one-week period A = (tA , xA ), meaning that before the opening bell rings for this week, the asset starts at price xA . We’ll define the very end of this same one-week period as B = (tB , xB ), meaning that the moment after the bell rings to end this week of trading the asset is at price x B . For the sake of brevity, let’s call the elapsed time simply t and the change in price simply x. In other words, t B tA = ∆t = t and x B xA = ∆x = x, unless specified otherwise. We are concerned here only with the price displacement x and less concerned
−
−
on stone tablets, denoted by a spin up or down, a charge present or absent, a hole punched in a card, or many other alternative physical phenomena. It is not just an abstract entity; it does not exist except through a physical embo diment. It is, therefore, tied to the laws of physics and the parts available to us in our real physical universe.
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
5
about the actual values of x A and xB . For this reason, we can assume x A = 0 for any discussion of the price displacement as such. This is because the change in price is homogeneous even if prices themselves are heterogeneous. There is a difference between $100 and $20, but no difference between $100 minus $95 and $20 minus $15. In both cases x = $5. The same can be said of any elapsed time t, allowing us to assume that t A = 0. This is a version of a passive coordinate transformation that is allowable since the changes in price and time are homogeneous, or invariant under translation. This assumption also means changes in price and time are isotropic, or invariant under rotation. From Figure 1 we are tempted to see the asset’s price movement from xA to x B as a path that it takes through various prices from t A to t B . Indeed, we will call this the particle’s price “path” later in our discussion, but for now to view the fundamental dynamics of the system as a path through time can be misleading. The path is the end result of a much more basic dynamic. To examine this more fundamental price movement, we need to divide the time axis into infinitesimal slices and see what’s happening at each slice. For the movement of the asset from state A to state B along the price path, we can define a time sequence of tA = t 0 < t1 <
· · · < tn−1 < tn < tn+1 = tB .
(1)
We can make n quite large, which will divide this sequence into n + 1 infinitesimally small segments of τ = (tB tA )/(n + 1). In the limit as n , these time segments approximate a continuous change in time. The first question is then, “what’s happening at each time segment τ ?” The dynamics are quite simple. The asset is doing one of three things at any time slice. It is either moving up in price, down in price, or there is no change in price. That’s it. There is nothing more this system does at each moment than move up, down, or maintain its price. Everything else is just a scalar of this movement. The second question becomes, “what makes the asset move up, down, or not at all in price?” We assume as a postulate for this discussion that the asset’s change in price, even if that change is zero, is determined by only two types of external forces acting upon the asset. To generalize, we will call the source of the force that pushes the asset up in price “Buyers” and denote the source generally as U . Likewise, we will call the source of the force that pushes the asset down in price “Sellers” and denote this source as D. This theory holds that there are no other external forces that affect the asset’s price movement. 9 The third question becomes, “what are the dynamics of how these sources affect price movements?” The answer to this third question will consume the remainder of this section.
−
→ ∞
9 See Rosario
N. Mantegna & H. Eugene Stanley, An Introduction to Econophysics: Correlations and Complexity in Finance 8 (2000) (“Financial markets are sys-
tems in which a large number of traders interact with one another and react to external information in order to determine the best price for a given item.”).
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
6
2.1. Price Displacement
For now, let’s place to the side the external forces that drive the asset’s price movements and examine only the mechanics of the system itself. If the asset moves either up or down to varying degrees, we can assume that each price displacement at the time slice τ is proportional to some force acting upon the asset at that time slice, or x(τ ) F (τ ). This change in price is also affected by some scalar quantity we will call the asset’s “mass.” We do not introduce units of this mass here, so it would be more rigorous to denote this mass as [ m]. However, for the sake of brevity, we will use the notation m throughout this paper. 10 The “mass” is simply an inertial coefficient that scales how rapidly the price changes over time. This translates into a physical characteristic that the mass is the measure of an asset’s “willingness” to move in price from xA . The greater the mass, the greater the force required by either U or D to change the asset’s price. We shall see as a consequence of a later section that the greater the mass the higher the probability that an asset’s price displacement will be zero. From Newton’s second law we know that a force is the product of the mass and the acceleration, the latter being the second time derivative of a position. If our assumption that F (τ ) x(τ ) is correct, then our equation of motion should have the feature that the second derivative of some function of the price displacement is proportional to the same function of just the price displacement. This is without regard to a mass element. Two functions that have this quality are the sine and cosine functions, since
∝
∝
d2 sin x = dx2
− sin x
(2)
and
d2 cos x = cos x. (3) dx2 This suggests that our equation of motion might take a similar form. If we carry forward our assumption that F (τ ) x(τ ), we can conjecture that
−
∝
m
d2 [x(τ )] = dτ 2
−k[x(τ )],
(4)
where k is some constant of the system that is directly proportional to its mass. The brackets are just to highlight the original price displacement function. Note that the right-hand side of equation (4) is the price displacement and the lefthand side is the force acting upon the asset. Therefore, we obtain a possible expression for our assumption that F (τ ) x(τ ).
∝
10 It is likely more proper to call this “mass” a density since it ends up measuring the mass per unit volume. However, since we are dealing only in the single dimension of price, the mass per unit volume is really just the mass per unit length of the price displacement x. Assuming that price is measured in units of position where the unit price displacement is x unit = 1.00 point, then m/x unit = m. Therefore, it is appropriate to simply refer to this scalar as m.
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
7
Equation (4) describes the motion at a discrete time slice and is, therefore, time-independent. But we know from Figure 1 (and experience) that prices move forward in time, specifically here the elapsed time tA to tB . Therefore, we must modify equation (4) to reflect the fact that price displacements are ultimately time functions. With this modification, equation (4) becomes m
d2 x(t) = dt2
−kx(t).
(5)
This second-order linear differential equation is that of a harmonic oscillator. 11 2.2. Price Displacement Over Time
An asset’s price displacement is only up or down at any moment (time slice) τ , unless there is no price change. Equation (5) gives us a description of these up-and-down price movements through an elapsed period of time. Let’s imagine the asset as a “point particle” p that experiences motion subject to some external force acting upon it. 12 Besides k , it is conceivable that there is also some other scalar that is proportional to the asset’s mass that might contribute to its stopping when trading ceases (i.e., p does not continue to “drift” with a constant, uniform velocity that is a result of the final interaction between U and D). This scalar, let’s call it γ , must be proportional to the asset’s velocity v as well as its mass m since it opposes any current direction of price displacement immediately prior to the cessation of trading. This leads to a further modification of equation (5): m
d2 x(t) = dt2
−γ dx(t) − kx(t) dt
(6)
where dx(t)/dt v. This additional term is an analog to the dampening term in a dampened harmonic oscillator. We can re-write this with the terms associated
≡
11 For
simplicity, assume going froward that the price displacement is always a function of time unless otherwise specified; i.e., xj x j (t), j U, D , where xj is to be read as “the price displacement in the j direction.” 12 It is possible to imagine p as a “free particle” that moves in a constant, zero potential. As we shall see, we can most likely arrive at similar results for the probability of price displacements if we assume p is a free particle; however, this description does not appear correct. Let’s imagine that p moves in price as a result of external forces acting upon the asset. If the forces generated by U and D toss p back and forth like a ping pong ball, there would be a moment at the closing bell when the volley would stop and whoever got the last hit in—either U or D—would give p the push necessary to maintain a constant, uniform velocity and continue moving in price until the next opening bell when the opposite source gets a chance to hit it back. In the interim, p would continue to drift with a constant, uniform velocity per Newton’s first law. But we don’t see this drift. At the closing bell, trading stops and so do any changes in price that are not a result of some after-market interference (correction). The particle does not drift, but stops. When the next opening bell rings, the opening price, which is simply the price as a result of the first trade, might be different than the previous closing price, but this is due to U and D’s interactions at that moment, not due to a residual drift from the previous interaction. For these reasons, we hold that it would be incorrect to regard p a s a free particle.
≡
∈ {
}
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
8
with acceleration, velocity, and displacement all on the same side to get m
d2 x(t) dx(t) + γ + kx(t) = 0. 2 dt dt
(7)
To simplify notation and save space going forward, we will use Newton’s dot notation when possible indicating a time derivative. Accordingly, x x dx d x (displacement), x˙ ¨ dt (velocity), and x dt (acceleration).
≡
≡
≡
2
2
2.3. External Forces from Buyers and Sellers
As we can see, equation (7) becomes the equation of motion for the asset when the external forces acting on the asset have zero net value. There are two possible causes for this result. The first cause is that there are no external forces acting on the asset. This occurs when markets are not open for trading. If U and D are not acting upon the asset, the price does not move. The second cause is that there are external forces acting upon the asset, but they are forces that are equal and opposite in value. In other words, the forces are balanced . The net result is that these two forces, no matter how great their individual magnitudes, cancel each other out and there is no resulting change in price. So how can we generalize this notion? One way is to account for the external force in equation (7) as a function of time m¨ x + γ x˙ + kx = F (t).
(8)
This way we have more than just the two special cases of no external forces or balanced external forces. Equation (8) allows us to now explore the dynamics of unbalanced external forces. An external force need not come from the same source. In fact, F (t) in equation (8) is the net external force and, therefore, is the the sum of all the forces acting upon the asset at any time slice τ . The theory posited here holds that the force generated by activities of Buyers U at a time slice τ creates a positive price displacement, and the force generated by activities of Sellers D creates a negative price displacement. It is the sum of these forces—the sum of all the forces, not just those generated by some discrete U and D—that is responsible for an asset’s price displacement. We can begin to think about this more formally by imagining a net external force over some time slice τ that is the result of a single pulse from U ’s activities and a single pulse from D’s. Let’s call this a “pulse pair.” U and D are not taking turns interacting with the asset, but are doing so together even though each source might be exerting forces that do not balance with the other. The benefit to this approach is that if we can figure out the asset’s price response to a single pair of opposing pulses, then we can find the response to millions and even billions of these pulses by simply summing the single pairs of opposing pulses.
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
9
We can set up our initial pulse pair quite easily. Imagine that xU is a time-dependent price displacement resulting from the force F U generated by U . Likewise, x D results from force F D generated by D.13 From equation (8) we see that the net force generated by U becomes m¨ xU + γ x˙ U + kxU = F U ,
(9)
and because D’s force is always in the opposite direction,
− m¨xD − γ x˙ D − kxD = −F D .
(10)
Adding these together we get [m¨ xU + γ x˙ U + kx U ] + [ m¨ xD
− − γ x˙ D − kxD ] d [xU − xD ] d[xU − xD ] = m + γ + k[xU − xD ] 2
dt2
dt
(11)
= F U
− F D .
Therefore, we see that the net external force F = F U F D produces the price displacement x = x U xD . Of course, this is equivalent to F = F U + ( F D ) and x = x U + ( xD ). This essentially gives us a “superposition” of solutions that continues as we add up more and more pulse pairs. If we think of the time-dependent net external force as the sum of pulses over the interval t, then the price displacement x will be the sum of all responses to the individual pulse pairs. Note that we have succeeded in creating an ostensibly arbitrary function F (t) out of multiple pulse pairs. We can accomplish a similar feat by generating an arbitrary function out of sine and cosine waves. In other words, the force pulses generated by U and D can amount to a collection of sine and cosine waves generating pulses in slices of time τ through constructive interference. This idea is at the heart of Fourier analysis and is basically a Dirac delta function. It is what represents the mass of the idealized point particle p discussed in 2.2 previously.14 Specifically, we are looking to describe a system that is driven only by an external force where that force depends on time as before, only now it depends on time as a cosine or sine function at an angular frequency ω, which is the wave frequency ν multiplied by 2π radians (one rotation around the unit circle). Since sine and cosine functions are essentially the same functions with the only difference being how we define our initial condition t A , we can assign the cosine function to represent the interactions of U with the asset, and the sine function to represent the interactions of D with the asset. This is an arbitrary assignment and it can just as easily be made the other way around. As we shall see, these
−
−
−
−
§
13 Assume all forces are functions of time. For simplicity, F F j (t) unless specified otherj wise. F 0 indicates the critical point of the pulse pair, and F 0 = F .
≡
14 See George
B. Arfken & Hans J. Weber, Mathematical Methods for Physicists
84 (5th ed., 2000). Again, this is more accurately called the linear mass density of p, but we shall stick with “mass” for reasons already discussed.
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
10
assignments will not alter our resultant force. ψU is the wave generated by U ’s trading activities and ψ D is the wave generated by D’s trading activities. As a result, we get ψU = m¨ xU + γ x˙ U + kx U = F cos(ωt), (12) and ψD = m¨ xD + γ x˙ D + kxD = F sin(ωt).
(13)
Recall that the net external force is a sum of the pulse pair constituents, so we next must add equations (12) and (13) together. We can combine these equations by multiplying equation (13) by i = 1 and then taking the sum of equations (12) and (13). Doing this yields
√ −
m
d2 [xU + ixD ] d[xU + ixD ] + γ + k[xU + ixD ] = F [cos(ωt) + i sin(ωt)]. (14) dt2 dt
Expressed as waves, this becomes Ψ = ψU + iψD where Ψ is a complex function of time. Since, in general, any complex number z can be expressed in the complex plane with the real- and imaginary-axes and as
z = + i = |z |(cos ϕ + i sin ϕ) (15) where ϕ is the angle between z and the -axis, it is plausible to regard the
right-hand side of equation (14) as an expression where the net force is the magnitude of a complex force function, and the angle ϕ = ωt is the frequency over time in radians. This produces Ψ = F [cos(ωt) + i sin(ωt)]. As a result, we next make two minor modifications. The first is to recognize that x U + ixD is actually a single, complex, time-dependent function that we’ll call ξ (t). The second is to recall that, per Euler’s formula, cos(ωt) + i sin(ωt) = eiωt , where e = limn→∞ (1+1/n)n . We can, therefore, re-write equation (14) as
| |
¨(t) + γ ˙ξ (t) + kξ (t) = F eiωt . Ψ = m ξ
| |
(16)
If we guess a solution of the form
Aeλt
(17)
ξ ˙(t) = λ eλt
(18)
ξ (t) = we find that
A
and
¨(t) = λ 2 eλt , ξ
A
(19)
where is the complex amplitude of the complex wave function Ψ. Substituting these results into equation (16) we get
A
Ψ = mλ 2 eλt + γλ eλt + k eλt = F eiωt ,
A
A
A
| |
(20)
which we can consolidate as Ψ = (mλ2 + γλ + k) eλt = F eiωt .
A
| |
(21)
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
11
Figure 2: Ψ = F [cos(ωt) + i sin(ωt)]. The dotted curve is the real cosine function, the dashed curve is the imaginary sine function, and the solid curve is the complex resultant wave that is a superposition of the cosine and sine functions. The complex amplitude is proportional to the net force. In this Figure, F = 1.
| |
A
| |
Since the terms in parentheses are independent of time, we must conclude that λ = iω so that the two sides are equal at all times. This means the complex displacement function ξ (t) has to have the same angular frequency ω as the net external force F . From this we can conclude that if a pulse pair (F U , F D ) generates the net sinusoidal force F and angular frequency ω, the asset’s price displacement x will vary as a time-dependent sine or cosine function of the same angular frequency ω. We should expect this since the original equation of motion in equation (5) is linear. Because λ = iω, we can consolidate equation (21) further [m(iω)2 + γ (iω) + k]
A = (−mω2 + iγω + k)A = F.
(22)
Thus, the external force in terms of the complex amplitude and mass-related terms becomes ( mω2 + iγω + k) = F. (23)
−
A
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
12
If the angular frequency of the net external force is the same as the angular frequency of the asset (and this might not always be so), then mω 2 = k. In this case, the terms would cancel leaving F = (iγω) .
A
(24)
We can interpret this expression as stating that the dampening term iγω is some non-zero term that inversely affects the amplitude. As the dampening term approaches unity, the amplitude is very close to the net force generated by the pulse pair. When the dampening term is very large, the amplitude is much less than the net force. Therefore, the dampening term is inversely proportional to the amplitude.15 Note that the expression in equation (24) is surprisingly similar to equation (5) in that it is still a fundamental expression of F x. Our hope is to derive the resulting price displacement x from the amplitude , which is a realistic expectation given that the real part of the amplitude is directly proportional to the price displacement. But the amplitude in its current form is still complex and the price displacement is real, so in order to arrive at the asset’s resulting price displacement we must further modify . Recall that we can write any complex number as
∝
A
A
A = |A|eiϕ,
(25)
where ϕ is the phase shift in the complex plane relative to the net external force. The complex phase shift is then ϕ = arctan
-axis -axis
= arctan
|A| |A|
sin(ωt) cos(ωt)
= arctan[tan(ωt)].
(26)
From this, we see that if ϕ = 0 then ωt = ζ π, where ζ Z (set of all integers), and ωt = 0 when ϕ = ζ π, which again is some integer multiple of π. The real part of the complex function ξ (t) represents the price displacement x(t). We can break this down as follows:
∈
|A| |A|
[ξ (t)] = Aeiωt Therefore,
=
eiωt eiϕ =
x(t) =
ei(ωt+ϕ) =
|A|cos(ωt + ϕ).
|A|cos(ωt + ϕ). (27)
(28)
In other words, the price displacement is a cosine function of time and angular frequency with an amplitude and a phase shift ϕ. From this we can conclude the following about the direction of x(t) based on the angular frequency, elapsed
|A|
15 We do not attempt here to explain the nature of such a dampening term, only its function. Of course, it is always possible that no dampening term exists, or γ = 0. In such a case, mω 2 = k.
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
13
time, and phase shift:
x(t)
−
0 0 +
(ωt + ϕ) = π2 (ωt + ϕ) = 3π 2 3π 5π 2 < (ωt + ϕ) < 2 π 3π 2 < (ωt + ϕ) < 2
(29)
If we seek to make the price displacement independent of time (i.e., the price displacement at the arbitrarily-small time slice τ ), we can set ωt = 0 to remove the temporal term. This leaves us with x(τ ) =
|A|cos ϕ.
(30)
But if ωt = 0, then ϕ equals some integer multiple of π. This means cos ϕ = 1, which can account for the direction of x(τ ), i.e., positive implies up and negative implies down. This means can account for the magnitude of x(τ ). We can express this general result as
±
|A|
x(τ ) =
±|A(τ )|.
(31)
|x(τ )|= |A(τ )|.
(32)
or In other words, the magnitude of the price displacement at each time slice τ is the magnitude of the resulting pulse wave’s amplitude at that time slice. Recall that the relationship between and the net external force at the same time slice τ is dependent on the value of γ , which in turn is proportional to the mass of the asset and its velocity. 16 We can reasonably assume, therefore, that our resultant probability calculation must be some function of mass, price displacement magnitude, and velocity. Having derived the price displacement’s modulus at each time slice τ in equation (32), we next turn to our probability investigation.
|A|
16 It
is an interesting observation that the up and down motion of prices can also be described as a Tusi couple. Imagine a unit circle in the complex plane, only reverse the normal convention and make the abscissa the imaginary axis and the ordinate the real axis (i.e., rotate it a quarter turn counterclockwise). Inside this unit circle, construct another circle of 1/2 radius that rolls clockwise along the internal circumference of the unit circle. The point of contact between the circles is e iϕ and the center of the interior circle is e iϕ /2. If we trace the point where the two circles connect when starting the roll at the “top” we see that this point moves in a straight line from the top to the bottom and back again as the smaller circle makes its rotation inside the unit circle. This is the exact real motion of the asset we described as a harmonic oscillator. Tracking this motion we see that eiϕ 2
−e
i(π −ϕ)
2
=
eiϕ + e−iϕ = cos ϕ = 2
(eiϕ),
just as we derived in equation (27). It’s interesting to think of an asset’s linear price movement as potentially being the result of some grander circular motion.
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
14
3. Probabilities
We’ve shown that the price displacement of an asset can be expressed as a proportional result of the net force acting on the asset. Specifically, the magnitude of the price displacement at any moment τ is equal to the modulus of the amplitude of the wave Ψ, which is the superposition of U ’s force wave ψ U and D’s force wave ψ D . Yet, there is still more to glean from our approach of using sine and cosine functions to represent the pulses that generate an external force and, therefore, a net price displacement. We can use this same information to determine the probability that an asset will experience a specific price displacement in a specific direction. It is here that the theory perhaps makes the most significant contribution by offering a new method for computing probabilities of price displacements given only physical analogs for a specific asset. We begin by describing a method to calculate the probability of the direction of an asset’s price displacement, and then introduce a method to calculate the probability of the price displacement’s magnitude. In the next section, we’ll combine these two methods. 3.1. Probability of Direction
We can determine the general probability that an asset’s price displacement is either positive, negative, or non-existent, based on a cosine function of the phase shift between wave ψU carrying force F U and wave ψD carrying force F D . The force F D is strongest when the amplitude of the wave ψD is at its minimum, and the force F U is strongest when the amplitude of the wave ψU is at its maximum. We can determine the directional portion of a price displacement with the equation ϕ Pr(xj ) = cos2 , (33) 2 which is the probability of x being in the j direction from xA . We can understand this best by looking at a few examples. If ψU and ψD are completely in phase, i.e., ϕ = 0, then the waves’ amplitudes match each other at every point along the wave. When the amplitudes are at their maximum, ψ U is at its strongest—meaning F U is strongest—and ψ D and F D are at their weakest. In this case, we’re comparing two vectors (sometimes called “phasors”) both in the exact same up direction at the amplitude’s maximum.17 Employing equation (33), we see that the probability of displacement in the dominant direction is 1.00, or 100 percent.
Pr(xU ) = cos
17 For
2
0 2
= cos2 (0) = 1.
(34)
a history of the concept of phasors, see A. E. A. Ara´ u jo & D. A. V. Tonidandel,
Steinmetz and the Concept of Phasor: A Forgotten Story , 24 J. of Control, Automation & Electrical Sys. 388 (2013).
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
15
If we look at the same waves, still with a phase shift ϕ = 0, but this time when both are at the waves’ minimum amplitude, we find that F D is at its strongest and F U is at its weakest. Since the price displacement is a function of the net external force, we should expect a negative price displacement. The probability of getting a negative price displacement again comes from equation (33) Pr(xD ) = cos
2
0 2
= cos2 (0) = 1,
(35)
only this time in the down direction. Let’s next examine the probability at ϕ = π/2. The waves carrying the positive and negative forces are now skewed by a quarter rotation of 2 π. To find the probability of the price displacement moving in a specific direction, we again use equation (33), which yields Pr(xU ) = cos
2
· π 1 2 2
= cos
2
√ π 4
=
1 2
2
1 = . 2
(36)
Therefore, the probability that the price displacement will be in the up direction is 0.50, or 50%. The probability that the price displacement will be in the down direction is also 0.50, since Pr(xD ) = 1 Pr(xU ) in all but the extreme case we will examine next. If ϕ = π, then both the positive and the negative price forces are at their strongest and these forces balance (cancel each other out).
−
Pr(xU ) = Pr(xD ) = cos2
π 2
= 02 = 0,
(37)
meaning there is no probability that there will be any price displacement. Note that this probability measure does not tell us the magnitude of the price displacement, only the probability that the displacement will be either positive or negative, with a zero probability of either occurring in the special case when ϕ = π. So we see that we can compute probabilities from cosine waves, which means we should also be able to compute probabilities from sine waves just as easily since both functions have the same hidden information within them. Of course, we will need to look at more than just the phase shift ϕ if we want to find the probabilities of specific price displacements and not merely whether they will be positive or negative. To do this, we return to the dynamics responsible for any price displacement: the pulse pairs generated by U and D’s activities in the form of sine and cosine waves. 3.2. Probability of Displacement Magnitude 3.2.1. Discrete Probabilities
Recall from equation (11) that F (t) = F U +F D and that F D always moves in the negative direction while F U always in the positive direction. If we arbitrarily assign a sine and a cosine wave to each of the waves carrying the forces F U and [Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
16
F D as we did in 2.3 equation (14), we can state that ψU = cos α and ψ D = i sin α, where α is a shared parameter proportional to the price displacement x. Note that F = 1 making the probabilities a measure per unit of force. Since we desire probabilities, we must be careful to at all times maintain unitarity , which is just a fancy word meaning that probabilities cannot be less than zero and cannot be more than one. It would be helpful if we could somehow modify the expression Ψ(α) = cos α + i sin α to better represent the limits of unitarity. Just as we made a slight modification to the superposition of these waves in equation (14) by adding the imaginary unit i, we can make a different modification to remove the imaginary unit. Doing so turns the resultant force pulse into a real (non-complex) “probability pulse.” This is important since experience tells us that observed probabilities are real (non-complex). We call this probability pulse a Gaussian function, more commonly known as a “bell curve.” The transformation is rather simple. We can transform the resultant force pulse into a probability pulse by simply squaring the exponent that is a consequence of Euler’s formula
§
Ψ(α) = cos α + i sin α = eiα
2
⇒ e(iα)
2
= e−α ,
(38)
since the Gaussian function is defined as
|A|exp
− √ − α
xA 2σ
2
=
|A|exp
α2 2σ 2
−
2
= e −α ,
(39)
where = 1 is the height of the Gaussian form and σ is its standard deviation, which as we see is σ = 1/ 2. Recall that we can consider xA = 0 because of the homogeneity of the change in price discussed in 2. Note that this Gaussian function would still result from an expression cos α i sin α = e −iα , which is a legitimate expression since the the force F D is always negative as we see in equation (11). However, e(−iα) = e(iα) = e−α , so the resulting Gaussian function is the same no matter which expression we choose to use as our starting point. Our hope is to find a way to use the Gaussian function to measure the probability that a specific price displacement x will have the random value X . To achieve this, it helps to consider some basic examples of discrete probability to see what they can teach us about where to turn next. Again, we have to make sure our probability solutions using a Gaussian function maintain the principle of unitarity. Are there ways that we maintain unitarity in somewhat obvious measures of probability that might help us think how this works? Sure there are. In fact, we can look to the most basic problems of probability that we learned about in grade school, problems such as “if I have a bin that contains 4 blue balls, 3 red balls, and 3 green balls, what’s the probability that I will randomly select a blue ball?” The correct answer, of course, is 0.4 or 40 percent. But how did we arrive at this answer? One critical step was for us to divide the number of blue balls by the total number of balls in the bin. To
|A|
√
§
2
2
−
2
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
17
find the total number of balls in the bin we summed over all the balls and got 10. We then divided the number of blue balls, 4, by the sum of all balls, 10, and got our answer. The sum over all the balls acted as a normalizing factor in calculating the correct probability. This way any probability calculation we make concerning the 10 balls in the bin will be between 0 and 1, which puts us in compliance with the principle of unitarity. If we had said the probability of selecting a blue ball was just “4” without the normalizing factor, we would have been wildly inaccurate.18 The same is true for normalizing the Gaussian in equation (39). We need to divide by an equation that gives us a sum of all possible results to get a normalized probability measure.
|A|= 1 , x A = 0, and σ = √ 12 .
Figure 3: Plot of Gaussian Function;
If we look at a graph of equation ( 39) we see that all results on the probability axis (the ordinate) are positive regardless of whether the input is positive or negative. The exponent α is a parameter that is proportional to the price displacement. A price displacement can be either positive or negative depending on whether the asset’s price ends up higher or lower than its previous closing price. This means the exponent can take on all values from negative to positive infinity and still produce a positive probability measure that is no greater than unity as long as the amplitude factor is a maximum at unity. Consequently, we can take our first step towards deriving our normalizing term by taking the sum of all possible values for x, both positive and negative. As in the balls and bins hypothetical, we divide the main term by the normalizing term to maintain unitarity. For balls and bins, the sum of all balls was 10. We can either divide 4 by 10, or simply multiply 4 by 10−1 , which is the same as multiplying by 1/10. Generalized, this means we must give our normalizing term the exponent 1.
−
18 Admittedly, normalizing terms can be a bit more complicated than this simple example of “bins and balls,” so the analogy might fail after a certain point. But it helps to give us an intuition for what we are trying to accomplish with a normalizing term when we want our end result to be a probability measure with a value in the range [0 , 1].
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
18
Just as the normalizing term for balls and bins was the sum of all balls in the bin, the normalizing term for our generalized equation for the discrete probability of the price displacement equaling X is the sum of all price displacements in the Gaussian. Since the Gaussian is continuous, we integrate instead of taking a sum of discrete parts. Taking the integral over all possible price displacement values in the Gaussian means integrating from to + . The result is the normalizing factor
−∞
+
Q =
∞
−∞
exp
x2 2σ 2
− dx
−1
=
∞
√ 1
2πσ 2
.
(40)
√
2
Recall from equation (39) that for e−α , the standard deviation is σ = 1/ 2. Substituting this value of σ into equation (40) gives the normalizing term Q =
1 √ . 2 π
(41)
Equation (41) gives us only the proportionate normalizing term. The final term must also account for any constants or other terms that are not a function of the price displacement. To be clear, we now have a generalized Gaussian as a result of the generalized waves ψU and ψ D , but we must modify this generalized Gaussian so that it matches specific characteristics of specific assets, for the probability of the financial asset p 1 experiencing the price displacement x is not necessarily the same as the financial asset p 2 experiencing the same. If we consider what U and D contribute to an asset, we must conclude at the most general level that they contribute to the total energy in the asset. There is no evidence that the asset has its own inherent energy, at least not in the sense that the asset can move in price “on its own.” In fact, we often see lightly-traded assets experiencing no price change for relatively long periods of time. Why is this? Because either (1) U and D are in phase shift ϕ = π and the forces cancel each other out; or (2) there are no buyers or sellers interested in trading the asset for that interval. Without buyers and/or sellers, the asset does not experience a change in price. Thus, there is nothing inherent to the asset that can contribute to the change in its price. Considered this way, we can conclude that the pulse pairs of U and D contribute potential energy V into the system through the superpositon of ψ U and ψD . This potential energy causes work to be done on the asset, which results in its change in price. Through this process, the potential energy V is transformed into kinetic energy K . But once V = 0 (i.e., no interaction between U and D), there can be no further price movement without additional introductions of potential energy into the system through the interactions of U and D. We can, therefore, conclude that U and D are the sole sources of the total energy E in the system at any time slice τ . The total energy at τ is never more than the measure of V . This tells us a lot about the amount of energy in the asset at any single time slice. Since the only energy is potential and all potential is converted to kinetic [Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
19
energy, we can conclude that the total average potential energy and the total average kinetic energy are the same. The kinetic energy in a system is defined as 1 mx2 2 mv = . 2 2t2
(42)
It is easy to see that the kinetic energy at the time slice τ is the sum of all the net forces over the price displacement x(τ ), since mx(τ )2 mx(τ ) = (xU (τ ) 2 2τ 2τ 2
−
m¨ x(τ ) F xD (τ )) = x(τ ) = x(τ ) = 2 2
F dx(τ ), (43)
where the far left-hand side is the kinetic term and the far right-hand side is the potential term (sum of the external forces over the change in price). Since there is no trading immediately before the opening of an exchange, F U = F D = 0. The kinetic energy K 0 is equal to zero since there is no price movement. As trading commences, U and D engage in the trading activities that generate the forces F U and F D , which combine to form the net external force F . This net force is the catalyst for movement in price as long as F U = F D . At the end of the day’s session trading ceases. There are no external forces and, therefore, no work to produce the kinetic energy from price movement. From this we can state that the total energy in the system at any one time is the potential energy, which is fixed and equal to the measure of the kinetic energy. But what is that measure? The equation for kinetic energy of a harmonic oscillator is found in equation (42), and the equation for the potential energy is
| | | |
| | | |
V =
mω 2 x2 . 2
(44)
The price displacement from equation (30) is x(τ ) = cos ϕ. Since the velocity v is equivalent to the first derivative of x, we see that v(τ ) = ω A sin ϕ. We can modify equations (42) and (44) accordingly:
|A|
K (τ ) =
− | |
mv 2 m = ( ω 2 2
− |A|sin ϕ)2 = m2 |A|2ω2 sin2 ϕ,
(45)
and
mω 2 x2 m m 2 2 2 = ( ω cos ϕ) = ω cos2 ϕ. (46) 2 2 2 The total energy is the sum of the potential and kinetic energies, or E = K + V . Adding the two previous equation together yields V (τ ) =
E (τ ) =
|A|
|A|
m 2
|A|2ω2 sin2 ϕ + m2 |A|2ω2 cos2 ϕ = m2 |A|2ω2(cos2 ϕ + sin2 ϕ). (47)
Recall the trigonometric identity, cos 2 ϕ + sin2 ϕ = 1. Therefore, E (τ ) =
1 mω2 2
|A|2.
(48)
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
20
When mω 2 = k this becomes E (τ ) =
1 k 2
|A|2.
(49)
If the kinetic energy is at a maximum then the potential energy is zero and if the potential energy is at a maximum then the kinetic energy is zero. The question of how the energy is partitioned between the kinetic and potential depends entirely on when one makes the inquiry. Another way to look at this is to assume we are correct that the asset does not have its own energy and all energy is introduced into the system as potential energy resulting from the interactions of U and D. This is the same as claiming that E = V . If this is true, then E (τ ) = V (τ ), which is the same as saying 1 mω2 2
|A|2= 12 mω2|A|2cos2 ϕ.
(50)
This means that ϕ = π or some integer multiple thereof, which from our previous discussion occurs when F U and F D are both at their maximum strengths or one is at a maximum and the other at a minimum. This is consistent with the notion that E = V since F U = F D occurs when the total energy is distributed evenly over ψ U and ψ D . In other words, on average, half the energy of an asset is from U and half from D. When one is at a maximum and the other at a minimum, all the energy is from either F U or F D and none is from the other. Since this occurs about one-half of the time for each, we can say that on average the total energy is, again, distributed evenly over ψ U and ψ D . We can confirm this by employing an expectation function E[ ] to calculate the expected (average) total energy in the asset. Here, E (τ ) is the total energy of the asset at any random time slice τ . Therefore, the average of the system is E[cos2 ϕ] = E[sin2 ϕ] = 1/2 for any random time slice from the total elapsed time t = t B tA . As a result, the expected kinetic and potential energies become
·
−
E[K (τ )]
=
and
mω 2 2
2 |A|2 E[sin2 ϕ] = mω2|A|2 = mvmax
4
4
(51)
2 mω 2 2 mω 2 2 mvmax 2 E[cos ϕ] = = . (52) 2 4 4 This shows that, on average, the kinetic and potential energies of the asset are the same, each being exactly one half the total energy of the oscillating system. The total energy density of Ψ is then E[V (τ )] =
|A|
E[E (τ )] = E [K (τ )] + E[V (τ )]
|A|
=
2 mvmax 2
≡ mv2
2
.
(53)
If we think through the source of this energy from equation (53), we again confront the fact that it only comes about as a result of the activities of U and D interacting with the asset. The potential energy is ontologically prior to the kinetic energy. We can, therefore, conclude that the best description of the asset [Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
21
as a system in terms of energy must reference the amount of potential energy resulting from the forces generated by U and D. The resulting kinetic energy is only a by-product of this preexisting condition.19 Now that we are clear on the source of the energy and its total measure, we can try to tie these to a probability measure. Let’s sum up where we are so far: U and D contribute potential energy to the system via their trading activities with the asset. This change in potential energy with respect to price constitutes a force. U ’s force F U is positive and D’s force F D is negative. These forces propagate through the asset via longitudinal waves we call ψU and ψD . Per the superposition principle, these waves, and the forces they carry, combine at each time slice τ along the path from A to B to form a Gaussian function. The sum of all the Gaussian functions at each time slice is itself a Gaussian. We can analyze the asset’s price trajectory from A to B as a combined Gaussian function, but only after we’ve used a normalizing term Q to preserve unitarity. Our next task is to find a way of expressing the trajectory of an asset over the interval t in terms of the trajectory’s initial conditions, namely, price and its time derivative, velocity. We can achieve this through a Lagrangian, which is a function of the trajectory’s position and velocity. Let’s define a Lagrangian as (x, v) = K V . We’ve just concluded that the total energy of the resultant wave Ψ (the total energy in the system) is the potential energy V . Since E = K + V and E = V , we can assume the kinetic term equal to zero for purposes of describing a system by its energy. We can use this information to define the Lagrangian as
L
−
2
L(x, v) = K − V = −V = − mx . (54) 2t2 Let’s define the “action” S [x] as a functional equivalent to Hamilton’s first
principle function, or more basically, the time integral of the Lagrangian along the path from state A to state B .20 We can express this as tB
S [x] =
tA
L(x, v) dt.
(55)
Classical mechanics requires this action functional to be stationary for small variations in all the intermediate variables along the path from A to B .21 It is important to realize that this stationary action is entirely local . If the asset starts at xA and reaches an arbitrarily-chosen price xN , where N
∈
19 We
have to choose one or the other. If we define the kinetic and potential energies by their 1/4 averages in equations (51) and (52), the Lagrangian = K V becomes zero. As we shall see from Schr¨odinger’s work, choosing the potential makes the most sense. 20 Hamilton’s principle asserts that physical trajectories are paths between x and x , which A B are critical points of the action. William R. Hamilton, First Essay on On a General Method in Dynamics, Philosophical Transaction of the Royal Society 95 (1835); William R. Hamilton, Second Essay on On a General Method in Dynamics , Philosophical Transaction of the Royal Society 247 (1835). 21 Paul A. M. Dirac, The Lagrangian in Quantum Mechanics , 3 Physikalische Zeitschrift der Sowjetunion 64, 69 (1933).
L
−
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
22
{1, 2, ·· · , n}, sometime before reaching xB , there is no way the asset “knows” that its destination is xB . Therefore, the stationary action, meaning the first variation δ S = 0, cannot be in any sense global . Any global application must instead be a sum of all the local stationary contributions along the way at each intermediate state (tN , xN ). The asset “travels” the total path one stationary segment at a time. This is why the path for the asset DIA in Figure 1 is not simply a straight line from the beginning to the end of the week, but is rather a collection of smaller price movements x(τ ) that are each themselves critical points of the functional [x]. Substituting equation (54) into (55) we get
S
tB
S [x] =
tA
2
− mx 2t2
dt =
mx2 . 2t
(56)
This conclusion is consistent with the findings of others regarding the Lagrangian. First, the action as a physical quantity has the dimensions [energy] [time], which breaks down to dimensions of [mass] [distance]2 [time]−1 . These dimensions are consistent with the result in ( 56). Second, Erwin Schr¨ odinger points out the following as a “well-known principle:”22
·
∂ [x] = mv. ∂x
S
·
·
(57)
Schr¨odinger’s reference implies that the changes in the price displacement elements of the action constitute the momentum of the asset in configuration space at any elapsed time t. In other words, a small change in the action is equivalent to the quantity of the asset’s motion over any small change in price. So if we add up all of the quantity of motion over the total price change from x A to x B (i.e., the sum of all the changes in price along the path from xA to xB ), we should get the total action for that price displacement. Integrating both sides of equation (57) with respect to x gives us
S [x] = mx 2t
2
.
From equation (56) we see that mx2 [x] = = 2t
S
tB
tA
L(x, v) dt.
Differentiating both sides with respect to t yields the Lagrangian 2
L(x, v) = − mx , 2t2
(58)
22 E. Schr¨ odinger, An Undulatory Theory of the Mechanics of Atoms and Molecules, 28 Phys. Rev. 1049, 1052 (1926).
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
23
which is identical to what we see in equation (54) for the Lagrangian of the asset. It appears, therefore, that the Lagrangian is equivalent to the potential energy introduced externally from U and D, and thus is a function quadratic in velocity. Since our primary goal is to find a way to measure the probability of asset’s price displacement, we must look to a measure of the system’s energy that is proportional to its price displacement over the interval t. We find such a measure in equation (56). We can assume the mass of the asset is sufficiently fixed for our purposes and although t is variable, we are only looking for the price displacement over a fixed time duration, which means we can hold t constant. Both the mass and the time interval are elements of the action, and the only remaining variable is the square of the price displacement, or x 2 , which is what we assumed α2 is proportional to at the beginning of 2.2. Given that the price displacement is squared, we will be limited to predicting only the magnitude of the price displacement and not whether it is in the positive or negative direction. Accepting this limitation, we conjecture that α2 . Substituting this into −S equation (39) gives us e . This approach is quite similar to that taken by Paul Dirac and Richard Feynman in introducing the Lagrangian into quantum mechanics with the form eiS /h¯ .23 In natural units, ¯h = 1, thus making the primary difference that in the theory espoused here, the equation for the superposition of the pulse pairs √ i S is e , while for quantum mechanics its analog is eiS . This implies that the superposition of the pulse pair for each asset is, again, the addition of the pulse from U and the pulse from D, although more specifically ωt = , or 24 Ψ( ) = cos( ) + i sin( ). Note that in this section F and both equal unity. From equation (24), this implies that at least for our probability calculations, the dampening term iγω must also equal unity if mω 2 = k. This further implies that γ 2 = t2 and k = m/t 2 . Substituting α2 into the proportionate normalizing term in equation (41) and taking the product of the two terms becomes
§
≡ S
√ S
√ S
√ S
≡ S
| |
√ S |A|
−
e−S m Qe−S = . 2
πt
(59)
Note also that the proportionate normalizing term in equation (41) is strikingly similar to the normalizing term for the Feynman path integral derived by Jun Sakurai. The proportionate normalizing term here in terms of the action becomes m Q = , (60) 4πt
23 See Dirac, supra ,
note 21; Feynman, supra , note 1. believe that [cos( )]2 [i sin( )]2 = 1. This can be easily tested by taking the mean price displacement modulus for any asset x , the mean mass m, and fixing a trading interval at, say, weekly or t = 5. For DIA, the mean price displacement modulus is x = 2.15 and the mean mass is approximately m = 0.25. Substituting these for = x m/(2t) yields [cos( )]2 [i sin( )]2 = cos2 ( ) + sin2 ( ) = 1. 24 We
√ S −
√ S −
√ S
√ S
√ S
| |
√ S
√ S | | | |
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
24
and the Sakurai normalization term Q in natural units of ¯h is Q =
√
m . 2πit
(61)
Besides the factor of 1/ 2, the primary difference is the square root of the imaginary term.25 Following our logic so far, this should result in the discrete probability measure of the modulus of the price displacement x having the random value X for any interval t. But when we compare the predictions of this equation with the historical financial asset data, we see they do not match. However, if we square all of equation (59), the predicted probabilities match the historical data within an acceptable margin of error ( 0.02). Consequently, we conclude
| |
±
Pr( x = X ) =
||
e−S 2
m πt
2
=
me−2S e−2S = . 4πt 2πx2
S
(62)
3.2.2. Continuous Probabilities
The discrete probability calculation tells us the probability that the modulus of a price displacement for an asset will have some value that we can select at random. It tells us the probability of the asset’s price displacement being exactly that value. Yet, from a practical perspective, one can imagine that it might be more beneficial to determine the probability of an asset having some minimum or maximum price displacement, meaning the probability that the price displacement will be at most or at least some random value X . To solve this problem we must look to continuous instead of discrete probabilities. A possible solution for this problem is to get the Gaussian function into the forms of an error function and its complement. The error function will tell us the probability that the true price displacement x is between zero and some random value X . The complementary error function will tell us the probability that the true price displacement x is at least the value of some random value X . The error function and its complement are appropriate here because of the following assumptions. We can state that the starting price is x A = 0 since, as we stated in 2, we are concerned only with the change in, and not the objective, price. Therefore, we can also assume that the starting price is the mean of the Gaussian, or xA = µ. Since we are already working under the assumption that the standard deviation σ = 1/ 2, we can conclude that all results are distributed normally about the mean, and therefore, the error function describes the probability of the price displacement’s magnitude x falling in the noninclusive range ( x, x).
| |
| |
§
√
−
25 See J.
| |
J. Sakurai & Jim Napolitano, Modern Quantum Mechanics 118 at Eq. (2.6.16)
(2d ed., 2011).
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
25
The error function is defined as
|x |
2 erf( xN ) = π
| |
and its complement erfc( xN ) =
| |
or more simply
√ √
N
2
e−t dt
(63)
∞ 2 e−t dt, π |x |
(64)
0
erfc( xN ) = 1
| |
2
N
− erf(|xN |).
(65)
Because of the principle of unitarity, we can only find the probability of the magnitude of the price displacement x being less or greater than X . This is because the error function and its complement only return positive probability values for non-negative price displacement values. Of course, what we just finished describing are the probability calculations given price displacements that are normally distributed about the mean µ = 0. In order for us to use this tool to make our probability predictions concerning a specific financial asset, we must remember to normalize that asset as we did with discrete probabilities since the probabilities of the same price displacement are unique for each financial asset. What’s more, we will also have to square the normalized result in order for our predictions to match historical data just as we did with discrete probabilities. Fortunately, taking the integral of the Gaussian function yields the error function, but we must still normalize the result as before. Unlike with the discrete case where we normalized by dividing by the integral from to + , we must normalize here with an integral from 0 to + . This is because, as just discussed, we are restricted to non-negative values as evidenced by the ranges in equations (63) and (64). Using the same approach to normalize as we did in equation (40) and squaring the results we get
| |
−∞
∞
x 0 e
−S dx ∞ e−S dx
Pr( x < X ) =
||
and Pr( x
| |≥ X ) =
2
|| || m 2t
= erf x
0
∞ e−S dx ∞ e−S dx
x 0
2
= erfc
x
m 2t
2
= erf(
2
= erfc(
∞
√ 2 S ) ,
√ 2 S ) .
(66)
(67)
Accordingly, equations (62), (66), and (67) give us the proper methods for calculating the probabilities associated with any financial asset in terms of its action. 4. Probability of Displacement Magnitude and Direction
So far we have theorized that it is possible to calculate the direction of an asset’s price displacement as a cosine squared function of one half of the phase [Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
26
shift. We have also theorized that it is possible to calculate the magnitude of an asset’s price displacement with a normalized Gaussian based on the action of the asset. In this final section, we attempt to bring the two together and express, hopefully simply, the probability of both an asset’s price displacement magnitude and direction. We are looking for an expression that tells us the probability that a price displacement is of a certain magnitude and is in a certain direction. A conjunctive probability statement serves this purpose. The probability of event ε 1 and event ε 2 occurring is the product of the probabilities of each event occurring, or Pr(ε1
∧ ε2) = Pr(ε1)Pr(ε2).
(68)
Here, the first event we’re concerned with is that the magnitude of an asset’s price displacement is equal to some specified value, or ε1 := ( x = X ). The second event is that an asset’s price displacement is in a specific direction, or ε2 := (xj ), which should be read as the price displacement being in the j direction where j U, D . From equation (62) we see that
||
∈ {
}
S e−2S Pr(ε1 ) = Pr(|x|= X ) = . 2πx2
(69)
From equation (33) we see that ϕ . 2
S
Pr(ε2 ) = Pr(xj ) = cos2
(70)
Written as a conjunctive probability this becomes Pr(ε1
∧ ε2) = Pr[(|x|= X ) ∧ (xj )] =
e−2S ϕ cos2 . 2 2πx 2
(71)
We can expand this method to calculate the magnitude and direction for continuous probabilities by making the following substitutions for ε 1 :
√ S ) √ Pr(|x|≥ X ) = erfc( S ). Pr( x < X ) = erf(
(72)
||
and
(73)
5. Conclusion
It is possible to test this theory using, say, weekly historical data for an asset, in which case x is the difference in points between the closing price at the end of a weekly interval and the closing price at the end of the immediately-previous weekly interval, t = 5 days, and m (without units) can be approximated from a relatively small sample s of the asset’s weekly intervals using the equation
| |
E[m]
=
1 s
s
q=1
2t erfc−1
|
Pr( xN
|xN |
|≥ X N )
2
.
(74)
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
27
Taking 11 years of historical data for two major ETF Indices, DIA (already mentioned) and SPDER S&P 500 (ticker symbol: SPY), one can verify this theory at least to a limited extent. A quick sampling of historical weekly data employing equation (74) yields m = 0.2458 for DIA and m = 0.2069 for SPY. Calculating the probability of a price displacement’s magnitude using only equation (64) for each week over the 11-year period produces a maximum error of only 0.02.
±
Figure 4: Normalized Gaussian for the asset DIA.
Figure 5: Normalized Gaussian for the asset SPY.
One also sees that the mean magnitude of the price displacement for an asset with a higher mass such as DIA (m = 0.2458, E[ x ] = 2.15 points) is less than the same measure for an asset with a lower mass such as SPY ( m = 0.2069, E[ x ] = 2.38 points). This is consistent with the theory since a larger mass should result in the probability of the asset having a price displacement of zero being higher than an asset with a lower mass. This is also supported by
||
||
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
28
a graphical representation of each asset’s Gaussian. Notice that the maximum probability of x = 0 is higher for DIA (Fig. 4), the asset with the larger mass, than for SPY (Fig. 5). These initial findings are promising, but clearly incomplete. It will be interesting to see if this theory is eventually excluded on empirical grounds. On the other hand, if this theory corresponds to historical data for a significant number of additional assets, then the results suggest that the probability of an asset’s price displacement in a specific direction can be calculated assuming the asset complies with certain physical laws. Appendix A.
The following tables assume a statistically constant value for weekly elapsed time of t = 5 days and a statistically constant value for mass, the units of which we assume exist but as of yet do not know what to call. Asset Trading Symbol: DIA with E[m] = 0.2458
Week
|x|
Nov 19, 2006 Nov 26, 2006 Dec 03, 2006 Dec 10, 2006 Dec 17, 2006 Dec 24, 2006 Dec 31, 2006 Jan 07, 2007 Jan 14, 2007
0.58 0.63 0.95 1.15 0.97 1.23 0.67 1.92 0.11
Pr( x X ) Predicted 0.81 0.79 0.69 0.64 0.69 0.62 0.78 0.45 0.96
| |≥
Pr( x X ) Actual 0.82 0.80 0.70 0.63 0.69 0.61 0.78 0.45 0.96
| |≥
Pr( x = X ) Predicted 0.003 0.004 0.004 0.004 0.004 0.004 0.004 0.003 0.004
||
Pr( x = X ) Actual 0.004 0.002 0.004 0.002 0.004 0.004 0.002 0.003 0.004
||
[11 YEARS OF DATA ANALYSIS AVAILABLE IN EXCEL FORMAT] Asset Trading Symbol: SPY with E[m] = 0.2069
Week
|x|
Jan 22, 2006 Jan 29, 2006 Feb 05, 2006 Feb 12, 2006 Feb 19, 2006 Feb 26, 2006 Mar 05, 2006 Mar 12, 2006
2.57 2.27 0.37 2.17 0.60 0.65 0.17 2.03
Pr( x X ) Predicted 0.36 0.42 0.88 0.43 0.82 0.80 0.95 0.46
| |≥
Pr( x X ) Actual 0.36 0.41 0.88 0.43 0.82 0.81 0.94 0.47
| |≥
Pr( x = X ) Predicted 0.003 0.003 0.003 0.003 0.003 0.003 0.003 0.003
||
Pr( x = X ) Actual 0.002 0.003 0.002 0.002 0.002 0.003 0.003 0.003
||
[Submitted to Econophysics Colloquium, July 2017.]
J. T. MANHIRE — Predicting Stock Market Prices
29
[11 YEARS OF DATA ANALYSIS AVAILABLE IN EXCEL FORMAT]
[Submitted to Econophysics Colloquium, July 2017.]