A Mathematical Model Reveals That Both Randomness and Periodicity Are Essential for Sustainable Fluctuations in Stock Prices

Is it true that there is an implicit understanding that Brownian motion or fractional Brownian motion is the driving force behind stock price fluctuations? An analysis of daily prices and volumes of a particular stock revealed the following findings: 1) the logarithms of the moving averages of stock prices and volumes have a strong positive correlation, even though price and volume appear to be fluctuating independently of each other, 2) price and volume fluctuations are messy, but these time series are not necessarily Brownian motion by replacing each daily value by 1 or –1 when it rises or falls compared to the previous day’s value, and 3) the difference between the volume on the previous day and that on the current day is periodic by the frequency analysis. Using these findings, we constructed differential equations for stock prices, the number of buy orders, and the number of sell orders. These equations include terms for both randomness and periodicity. It is apparent that both randomness and periodicity are essential for stock price fluctuations to be sustainable, and that stock prices show large hill-like or valley-like fluctuations stochastically without any increasing or decreasing trend, and repeat themselves over a certain range. A Mathematical Model Reveals That Both Randomness and Periodicity Are Essential for Sustainable Fluctuations in Stock Prices.


Introduction
It is generally considered difficult to forecast the behavior of stock prices, and thus many methods have been proposed. For example, fundamental analysis and technical analysis are widely used approaches. Fundamental analysis involves investigating any data that can be expected to impact the price of a stock. The advantage of this method is that the estimation is objective because the selected economic indicators such as future growth, return on equity, and profit margins are inputted into a particular relational expression to predict the stock price. However, because there is often a time lag prior to the release of economic indicators, one drawback of this approach is that the economic indicators may be outdated. In contrast, technical analysis focuses only on the trading and price history of a stock. The principle underlying technical analysis is that the market price reflects all available information that could affect the stock market. As a result, there is no need to take new economic developments into account because they are already priced into a given security. Technical analysts generally believe that prices move in trends, and that history tends to repeat itself. However, these trends may be a product of chance, and there may actually be a chance that large hill-like or valley-like fluctuations are also considered to be trends. It seems that the market fluctuates based on psychological aspects. There are two major types of technical analysis: chart patterns and technical indicators. Chart patterns are a subjective form of analysis wherein technicians attempt to identify areas of support and resistance on a chart by observing specific patterns. These patterns, identified based on experience and behavioral economics, are designed to predict where prices are headed following a breakout or breakdown from a specific price point. Technical indicators are a statistical form wherein technicians apply various mathematical formulas to prices and volumes. The most common technical indicators are moving averages, which smooth price data to make it easier to spot trends.
Difficulties arise in terms of predicting stock prices because daily changes in stock prices seem to be quite random. In particular, fluctuations in stock prices are considered to follow Brownian motion, fluctuating independently of past stock prices. The notion of using a Brownian motion process to explain the behavior of stock prices was first proposed by Black et al. [1]. A Brownian motion process has the property of independent increments. This means that the present price does not affect future prices. However, the present stock price may influence the stock price at some time in the future. Hence, a Brownian motion process is not suitable for explaining stock price movements. Subsequently, a fractional Brownian motion process, which exhibits the property of long-range dependence, was proposed [2]. Meanwhile, it is also considered that there is a relationship between stock price and volume [3] [4]. Volume is an important aspect of technical analysis because it is used to confirm trends and chart patterns. Any price motion up or down with relatively high volume is seen as a stronger, more relevant move than a similar move with weak volume. Data that are available to general investors include time series of stock prices and volumes. As pointed out in the past, the trend of the stock price itself is random [5], and using this data alone, it is completely unpredictable how the price will change in the near future. However, since volume is a measure of how much interest sellers and buyers have in the stock, volume data provide a better understanding of stock price fluctuations. There is already a famous stochastic differential equation that attempts to mathematically elucidate the transition of one bond and one or more stock prices [1], but the purpose of this study is to reveal the driving force behind sustainable fluctuations in the price of an arbitrary stock using a mathematical model.
The rest of this paper is organized as follows. Sections 2 and 3 clarify the relationship between stock prices and volumes, Section 4 presents a model of the proposed relationship, Sections 5 and 6 present an interpretation of the simulation, and Section 7 discusses the effectiveness of the model by comparing the results of the simulation with real data.

Characteristics of the Real Data
It is possible to obtain time-series data (e.g., closing prices and volumes) in relation to stock prices for free via the Internet. Although it is acceptable to use data from any source, because the author lives in Japan, data for 50 stocks on the First Section of the Tokyo Stock Exchange were used. It is considered that the results will not lose generality outside Japan.
As an example, time-series data on the stock price of the Takeda Pharmaceutical Company Limited, one of the leading pharmaceutical companies in Japan, was examined.      and volume reveals that Dv i appears to change periodically. Figure 2 shows that Dv i has a period of one to three days. Figure 3 shows that the present price is not correlated with the past stock price, and the stock price is not correlated with the volume, although the present volume is related to the volume over several days, especially that of the previous day. Bp i nor Bv i may be considered to follow a Brownian motion process. 4) Figure 1(e) shows that, for example, even if Dp i rises by only a little, Dp i /log e (v i ) will rise sharply when the volume is small. That is, Dp i /log e (v i ) represents the degree of interest in the stock. Figure 4 shows that LMp i and LMv i have a significant positive correlation, it follows that there is a positive correlation between the transition of prices and the transition of its volumes from the logarithm of moving average of 101 days in total.

5) Since
The following points can be used to construct a mathematical model from the above findings. a) From (2), fluctuations in price and volume seem to be random and independent, but Dv i appears to change periodically. b) From (5), LMp i and LMv i have a significant positive correlation.

Behavioral Psychology of Investors Affecting Stock Prices
A high volume of turnover means that there are numerous buyers and sellers who are interested in the stock. It has become clear that the average price over the long term (101 days in the above example) is significantly correlated with the average volume during the same period. Therefore, it is essential to know the investors' mindsets because the volume reflects the interest of buyers and sellers in the stock. Since Bv i indicates whether the volume is rising or falling, it reflects rising or falling interest on the part of buyers and sellers. The prospect theory of behavioral finance suggests that investors who are overly preoccupied with the negative effects of losses in comparison to an equivalent amount of gains tend to take a short-term view of an investment [6]. This leads those investors to pay far too much attention to the short-term volatility of their stock portfolios. Thus, in general, investors tend to limit their losses by selling their stocks, being overly preoccupied with their latest losses, even though the price of their stock may have subsequently risen.
The gambler's fallacy occurs when, during a series of coin tosses, the gambler thinks that a tail is due following a series of heads. This idea is often used in behavioral economics. In relation to investment, it is easy to become susceptible to the gambler's fallacy. For example, when prices rise over several successive days, many investors will come to believe that, even if there is no rational reason to think so, they will soon fall again. They have various criteria that they use in their decision-making, and even if they are not actually selling, there is a significant possibility that this feeling will affect their judgment. Investors think that the stock price will go up as they go down on a daily basis, and if the stock is bought, it will often happen that the stock price will go down further and lose. In summary, investors tend to sell in the short term to secure a slight profit because they dislike losses in accordance with the loss avoidance aspect of prospect theory. Meanwhile, they tend to think that prices that are continuing to rise should fall soon, based on the gambler's fallacy. However, there is also a tendency to think that prices will continue to rise. Then, the buying and selling behavior will be repeated periodically to some extent. This summary can be used to construct a mathematical model based on the following conditions. There are random fluctuations in relation to stock prices, the number of buy orders, and the number of sell orders. In particular, the number of buy orders and the number of sell orders fluctuate periodically.

Mathematical Model
Stock prices, the number of buy orders, and the number of sell orders are represented by P, B, and S, respectively. Figure 5 shows the interactions among P, B, and S. The formulations of these relationships are as follows:

t1 = 0, t2 = 0
Regardless of ( ) there are a couple of significant rises in prices, as if there was a trend (see Figure 6). However, the prices do not increase constantly. It can be seen from Figure 6(f) and Figure 6(g) that the number of times Bp i and Bv i cross the origin is extremely small. Figure 7 shows the relationship between LMv i and LMp i . The relationship is significant with a correlation coefficient of 0.7452 (at the 0.05 significance level).  > . When 0.001 < t 1 < 0.005, prices do not necessarily show an upward trend. When t 1 = 0.01, prices show a constant upward trend (see Figure 8). Thus, Bp i and Bv i are constantly increasing. Figure 9 shows the relationship between LMp i and LMv i . The relationship is significant with a correlation coefficient of 0.8778 (at the 0.05 significance level). The correlation between price and volume is stronger for the condition t 1 = 0.01, t 2 = 0 than for the condition t 1 = 0, t 2 = 0.

Mathematical Analysis
The parameters are the same as in Section 5.1, namely, a = 0.2, b = 2, c = 1, r 1 = 0.4, r 2 = 2, r 3 = 4, f = 0.2, t 1 = 0, and t 2 = 0. Then the prices do not increase constantly, and are confined within a certain range. This can be confirmed by mathematical analysis as follows. The volume, B -S, is represented by V.  As t 1 = 0, Equation (1) is expressed as follows.
The characteristic polynomial of Equation (6)  γ < − , one of the two eigenvalues is always positive.
As RND 2 and RND 3 are distributed uniformly in (0, 1), the probability density function, f(β), of β (=RND 2 − RND 3 ) is expressed as shown in Figure 11. The probability of β < −1/4 is 9/32, and the probability of β > 1/4 is 9/32. real numbers, two negative real numbers, and two complex numbers with negative real parts. In no cases do two positive real eigenvalues or two complex eigenvalues with positive real parts occur. P does not diverge to infinity or converge to zero because the two eigenvalues are not always positive real numbers (or complex numbers whose real parts are positive numbers) and not always negative real numbers. Hence, P fluctuates within a certain range.

Discussion
In this study, the relationship between the price and trading volume of a stock is examined. Fluctuations in prices and volumes seem to be random and independent, but LMp i and LMv i have a significant positive correlation. In particular, Dv i appears to change periodically, based on frequency analysis. The present volume is related to the volume over the last few days, especially the previous day.
A preliminary study indicated that RND 1 , RND 2 , RND 3 , and RND 4 are required for P, B, and S to fluctuate daily in the same manner as real data. These findings to fall if they have been rising. However, when the stock price rises further, they then try to buy it back, thinking it will continue to rise. Thus, there is repeated buying and selling over a short period without sound underlying reasons. This is why stock prices include a periodic factor. Thus, the differential equations consist of a component for randomness, as well as one for periodicity (see Figure 5).
The prices of an arbitrary stock generally display up-and-down motions, but are generally confined within a certain range. Although technical analysts believe that prices generally move in trends and that history tends to repeat itself, the findings in Section 5.1 indicate that stock prices show large hill-like or valley-like fluctuations stochastically without any increasing or decreasing trend, and repeat themselves over a certain range. This seems to be natural at first glance, but the question arises as to what is the driving force.
From Section 5, it can be seen that the stock price increases almost monotonically if the change in the price of a certain stock is accompanied by an increasing trend without noise (as well as a decreasing trend). However, in reality, it seems that randomness mixes with this increasing or decreasing trend.

Conclusion
The analysis of daily prices and volumes of a certain stock revealed the following findings: 1) price and volume fluctuations are random, 2) the difference between the volume on the previous day and that on the current day is periodic. Based on these findings, the differential equations of stock prices, the number of buy orders, and the number of sell orders were constructed. From simulation by these equations it is clear that both randomness and periodicity are essential for stock price fluctuations to be sustainable. In the future, I would like to clarify the conditions of the parameters in the mathematical model under which stock prices will continue to fluctuate within a certain range. This finding will reveal which parameters have a strong influence in order to make the stock price fluctuate continuously within the certain range.