Predicting the Stock Market? (Ok, well not exactly, but it could be possible)

Could it could be possible with statistics and CALCULUS??

Did you know that you can predict the stock market by using partial differential equations, if slightly altered? This is in theory, at least (I don’t know if it has actually been done before). But, there’s a first for everything, am I right?

So, you’re probably asking yourself, “hey, what is a partial differential equation (PDE) anyways, and who cares what it is?”. Well, to answer your question, here you go:

Before talking about partial differential equations, let’s talk about differential equations. A differential equation is is an equation involving derivatives of a function or functions. To be more specific, it’s a mathematical equation for an unknown function of one or several variables that relates the values of the function itself and of its derivatives of various orders. A matrix differential equation contains more than one function stacked into vector form with a matrix relating the functions to their derivatives. In order to solve a differential equation, you must use the Euler method, which is a first-order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic explicit method for numerical integration of ordinary differential equations and is the simplest Runge–Kutta method. The Euler method is named after Leonhard Euler, who treated it in his book Institutionum calculi integralis (published 1768–70).

FUN FACT: I have written an article on Leonhard Euler (specifically regarding the Königsberg Bridge Problem) quite recently; Euler was an insanely influential figure in mathematics, and his theories were revolutionary in many fields. Check it out by following this link.

Here’s an example of a differential equation being used in real life:

Here in the figure above, the Navier–Stokes differential equations are being used to simulate airflow around an obstruction. Just for background information, in physics, the Navier–Stokes equations describe the motion of viscous fluid substances. Viscous substances have a thick, sticky consistency between solid and liquid. Two examples of things that have viscosity would include maple syrup and melted marshmallows.

In order to completely understand differential equations (for those of you who just clicked on this article for fun but don’t know a ton of mathematics), you need to grasp the basics of calculus.

Essentially, Calculus is the study of limits. Not all limits are derivatives, but all derivatives are limits. In other words, the derivative is a specific kind of limit (using, in one form, the difference quotient). You use limits and derivatives to basically find the slopes and stuff of functions until you reach the closest you can get to a point. (PS you can never actually touch a point, but you can surely get extremely close to one). If you keep taking derivatives of the derivatives etc., you can eventually find the slope of the curve. Integrals can find the area under the curves of an oddly shaped function by using the derivative and yielding a differentiated value, which is the area under the curve. By making a bunch of rectangles, you can get extremely close to the actual value (this is the Riemann sum, which is incredibly important in integral calculus). People usually think that integrals and derivatives are two different things, but they are linked together (as stated in the fundamental theorem of calculus). SO, where does differentiation come into play? Well, a differentiable function of one real variable is a function whose derivative exists at each point in its domain. A function is differentiable at a point if, despite any side approach to the point in its domain, the derivative is the same and is a finite number. A function that has sharp corner points and points of discontinuity are NOT differentiable. Essentially, it has to do with the smoothness of a curve. I could go on and on about the basics, but that’d make us lose track on what we are actually meaning to talk about.

ANYWHO, so, partial differential equations are basically differential equations that contain unknown multivariable functions and their partial derivatives. A special case are ordinary differential equations (ODEs), which deal with functions of a single variable and their derivatives. A partial derivative is a derivative of a function of two or more variables with respect to one variable, the other(s) being treated as constant. And, of course, a derivative is a way to represent rate of change, that is — the amount by which a function is changing at one given point. For functions that act on the real numbers, it is the slope of the tangent line at a point on a graph.

Now, as for “who cares about what a PDE is”, PDEs can be used to describe a wide variety of phenomena such as sound, heat, electrostatics, electrodynamics, fluid flow, elasticity, or quantum mechanics. These seemingly distinct physical phenomena can be formalised similarly in terms of PDEs. Just as regular differential equations usually model one-dimensional dynamical systems, partial differential equations usually model multidimensional systems. In math systems theory, a multidimensional system (or an m-D system) is a system in which not only one independent variable exists (like time), but there are several independent variables. Multidimensional systems are the necessary mathematical background for modern digital image processing with many applications in biomedicine, X-ray technology and satellite communications. There are also some studies combining m-D systems with partial differential equations, which includes this paper that you are reading!

PDEs find their generalisation in stochastic partial differential equations. Stochastic partial differential equations (SPDEs) generalize partial differential equations via random force terms and coefficients, in the same way ordinary stochastic differential equations generalize ordinary differential equations. They have relevance to quantum field theory and statistical mechanics.

Well, anyways, back to stocks.

So, first off, you need to know what an “option” in the stock market. An option it is a contract giving the holder the right to buy or sell an asset at a set strike price (options can also be applied to other transactions, ). A stock option is a privilege (sold by one party to another) that gives the buyer the right (but not the obligation) to buy or sell a stock at an agreed-upon price within a certain period of time. An option, just like a stock or bond, is a security. American options, which make up most of the public exchange-traded stock options, can be exercised any time between the date of purchase and the expiration date of the option. On the other hand, European options, also known as “share options” in the United Kingdom, are slightly less common and can only be redeemed at the expiration date. However, we will not get into explaining European options because that’ll get us off track as far as what we are actually discussing.

An option price is the amount/share that an option buyer pays to the seller. Options trade in marketplaces, likewise to the assets on which they are based upon (hopefully you know that).

So, a man named Louis Bachelier proposed that the “correct” value of an option equaled the expected value of its payoffs, and by introducing a specific probabilistic model for the underlying price motion, he was able to calculate this expectation and compare his results with market prices.

In his formulation, the option holder and the option writer BOTH took on risk that was associated with fluctuations about this mean value. The surprising fact is that under suitable assumptions regarding the statistics of the asset price motion, the risk can be eliminated by following a hedging strategy that is suitable for the particular situation. The value of the option is then finally determined, respectfully. Again, the value is obtained by computing an expectation, which can be carried out by solving a partial differential equation, though the interpretation is quite different than in Bachelier’s model, which is why in the beginning I said that it is possible, “in theory”.

The efficient market hypothesis (a fundamental principle of finance) asserts that all information available to anyone, anywhere is instantly expressed in the current price, as market participants race to be the first to profit from new information. Thus successive price changes may be considered to be uncorrelated random variables, since they depend on as-yet unrevealed information. This principle is the subject of intensive analytical testing and some controversy, but is an excellent approximation for our purposes.

Although the directions of the price motions are completely unpredictable, statistics can tell us a lot about their expected size.

Since the fluctuations are uncorrelated and have mean near zero, this typical size is the single most important statistical quantity that we can extract from the price history. We may additionally ask about the form of this distribution, for example, whether or not it is a Gaussian.

For your information, a Gaussian function (which is often referred to as simply “Gaussian”) is a function of the form:

It’s for arbitrary real constants a, b and c, and was named after the mathematician Carl Friedrich Gauss. Gaussian functions are widely used in statistics where they describe the normal distributions, in signal processing where they serve to define Gaussian filters, in image processing where two-dimensional Gaussians are used for Gaussian blurs, and in mathematics where they are used to solve heat equations and diffusion equations, etc.

Now, even though we may not know too much about these things, it’s not an entirely new idea; look at the Black-Scholes theory. If you don’t know what that is, it’s “a Merton model is a mathematical model of a financial market containing derivative investment instruments. From the model, one can deduce the Black–Scholes formula, which gives a theoretical estimate of the price of European-style options” (this is the dictionary definition). Of course, this is a European model. However, maybe it could be possible that it could be utilised in order to fit other option styles too, such as the American option style.

The point is, if the variables are modified to an extent, they can possibly predict the stock market, and I think that’s super cool; econophysics and quantum finance is super interesting.

All of these concepts and whatnot tie back into quantum finance and econophysics, which were two things that I didn’t even know EXISTED until I researched all of this information, which is pretty interesting to learn about and understand.

Source(s):

  • P. Wilmott, S. Howison, and J. Dewynne. The Mathematics of Financial
    Derivatives: A Student Introduction. Cambridge University Press,
    1995.
  • J.-P. Fouque, G. Papanicolaou, and K. R. Sircar. Derivatives in Financial
    Markets with Stochastic Volatility. Cambridge University Press,
    2000.
  • I. Karatzas and S. E. Shreve. Methods of Mathematical Finance.
    Springer-Verlag, New York, 1998.