Next Article in Journal
Matching and Rewriting Rules in Object-Oriented Databases
Previous Article in Journal
A Penalized Empirical Likelihood Approach for Estimating Population Sizes under the Negative Binomial Regression Model
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Game Theory for Predicting Stocks’ Closing Prices

by
João Costa Freitas
1,*,
Alberto Adrego Pinto
1,2,* and
Óscar Felgueiras
1,3,*
1
Faculty of Sciences, University of Porto, R Campo Alegre, 4169-007 Porto, Portugal
2
Artificial Intelligence and Decision Support (LIAAD)—Institute for Systems and Computer Engineering, Technology and Science (INESC TEC), University of Porto, R Campo Alegre, 4169-007 Porto, Portugal
3
Centro de Matemática da Universidade do Porto (CMUP), University of Porto, R Campo Alegre, 4169-007 Porto, Portugal
*
Authors to whom correspondence should be addressed.
Mathematics 2024, 12(17), 2676; https://doi.org/10.3390/math12172676
Submission received: 16 July 2024 / Revised: 20 August 2024 / Accepted: 27 August 2024 / Published: 28 August 2024
(This article belongs to the Special Issue Econophysics, Financial Markets, and Artificial Intelligence)

Abstract

:
We model the financial markets as a game and make predictions using Markov chain estimators. We extract the possible patterns displayed by the financial markets, define a game where one of the players is the speculator, whose strategies depend on his/her risk-to-reward preferences, and the market is the other player, whose strategies are the previously observed patterns. Then, we estimate the market’s mixed probabilities by defining Markov chains and utilizing its transition matrices. Afterwards, we use these probabilities to determine which is the optimal strategy for the speculator. Finally, we apply these models to real-time market data to determine its feasibility. From this, we obtained a model for the financial markets that has a good performance in terms of accuracy and profitability.
MSC:
91G15; 91A35; 60J10

1. Introduction

Due to the rise in automated systems that perform prediction tasks and posterior execution, we thought it would be beneficial to create a theoretical framework for an automated system that outputs the probabilities of different market states where traders can define clear trading rules based on these probabilities and their risk tolerance, which can help execute trades swiftly based on the model’s output. The presented methods can be utilized as indicators for the purchase of certain financial assets, but would be optimal if they were utilized as an automated system to purchase barrier options.
Thus, in this article, we will present and apply methods specifically designed to model the financial market, but, before starting to discuss the models, we need to make a brief introduction to the data that we will be working with.
Our data consists of financial asset prices from several stock exchanges, with special attention to the New York Stock Exchange, the London Stock Exchange and the Lisbon Stock Exchange. Also, we focus on stock and forex (foreign exchange market) prices, because these present higher volatility and volume (i.e., more trades), and the data related to these assets is easier to obtain. Here, volatility is a statistical measure of the dispersion of returns for a given financial asset. It is often measured as either the standard deviation or variance between returns from that same asset.
Moving further we will often use the terms “stock exchange” and “financial market” interchangeably, but they differ slightly. The term “financial market” broadly refers to any marketplace where the trading of securities occurs, including the stock market, bond market, forex market and derivatives market, among others, whilst the “stock exchange” is a facility where stockbrokers and traders can buy and sell securities, such as shares of stock, bonds and other financial instruments. However, whenever we refer to the financial market we will be referring to the stock exchange.
The data were retrieved from Yahoo Finance [1] and AlphaVantage [2], but they can be found in the dataset related to article [3].
We will study daily closing prices, that is, the price of the asset at the end of the day, and also intraday closing prices, i.e., the prices of the asset at the end of each minute. Also, we will look into several assets within multiple stock exchanges. Specifically, we will analyze the following:
  • Three theoretical datasets with 1000 observations;
  • One hundred datasets with 1000 observations of stocks’ daily closing prices from several stock exchanges;
  • One hundred datasets with 1000 observations of stocks’ intraday closing prices from several stock exchanges.
Hence, we will obtain all kinds of data, with different characteristics and statistical properties. Moreover, since we cannot access the assets’ future prices, we will split the datasets into training and test sets. All the analyzed datasets have 1000 observations and 20 % of these will be part of the test sets. This is performed so that we can apply our models to the training set and “compare” their predictions with the test set’s values.
To exemplify, consider the following datasets from the New York Stock Exchange (Figure 1 and Figure 2) and from the Lisbon Stock Exchange (Figure 3 and Figure 4):
Measuring past price changes to determine their dispersion should yield a probabilistic result. Additionally, price changes, in stock prices (or in any other financial instruments), usually pattern themselves in a normal distribution (for further details see [4,5,6] and/or [7]), which is the familiar bell-shaped curve (for further details see, for example, [8]). There are numerous different ways to determine the probability function for a financial instrument. Also, price changes can be measured and quantified empirically, either by the percentage change in the instrument’s value over specified time intervals or by the change in the logarithm of the price over the time intervals.
Oftentimes when you are thinking in terms of compounding percentage changes, the mathematically cleaner concept is to think in terms of log differences. When you are repeatedly multiplying terms together, usually, it is more convenient to work in logs and add terms together. So, let us say our wealth at time T is given by the following:
W T = t = 1 T 1 + R t l o g W T = t = 1 T r t ,
where R t is the (overall) return at time t and r t = l o g ( 1 + R t ) = l o g W t l o g W t 1 .
An idea from calculus is that you can approximate a smooth function with a line (for further details see, for example, [9]). The linear approximation is simply the first two terms of a Taylor Series. The first-order Taylor Expansion of l o g ( x ) around x = 1 is given by the following:
l o g ( x ) l o g ( 1 ) + d d x l o g ( x ) | x = 1 ( x 1 ) .
The right hand side simplifies to 0 + 1 1 ( x 1 ) ; hence,
l o g ( x ) x 1 .
So, for x in the neighborhood of 1, we can approximate l o g ( x ) with the line y = x 1 .
Now, consider two variables x 1 and x 2 such that x 2 x 1 1 . Then, the log difference is approximately the percentage change x 2 x 1 1 = x 2 x 1 x 1 :
l o g x 2 l o g x 1 = l o g x 2 x 1 x 2 x 1 1 .
Note that, for big percentage changes, the log difference is not the same thing as the percentage change because approximating the curve y = l o g ( x ) with the line y = x 1 becomes worse and worse the further away you get from x = 1 .
Thus, we have the following:
  • The logarithmic method is well documented. The Black–Scholes formula for option pricing assumes a lognormal dispersion of prices, and there is a theoretical lognormal distribution than can be inferred from the Black–Scholes formula. However, the discussion of the lognormal derivation of price changes is not necessary for this paper (but, for further details, see [10] and/or [11]).
  • Measuring percentage price changes yields a nearly equivalent result to the lognormal method, especially for price changes less than 15 % (for further details see [7]). Also, this method affords a fair approximation of the real world, while being fairly simple to calculate.
However, if we simply analyzed the price change (between consecutive intervals) of a large sample from some financial instrument, the analysis would be skewed by the change in the price level, hence the need for measuring percentage changes in prices. Thus, any statistical method used to analyze price changes has to be able to account for the increase in the price level of the instrument. This can be taken care of by looking at the prices’ percentage changes, rather than the actual price changes. Also, there is the added property that percentage price changes should (theoretically) follow a normal distribution.
We have to note that the literature commonly uses the logarithmic returns for its statistical properties, but we intend to use this model in a business setting, so the simple returns are more intuitive and still hold the necessary statistical properties for our model (for further details see [12] and/or [13]).
Nonetheless, most real-world measurements vary from the standard normal distribution. The theoretical lognormal distribution for stock prices has a slight skew to the positive side, because there is an inherent upward bias in stock prices (for further details see [14]). This is because, since the turn of the century, stocks have appreciated at approximately a 5–10% annual rate; this is partly due to inflation (or even to investor overconfidence), but it is also due to increases in productivity, or the economic surplus society generates (for further details see [15] and/or [16]). Thus, the skewing in the positive side of the theoretic lognormal is understandable. Also, note that factors that have a bearing on assets’ prices, such as wars, depression, peace, prosperity, oil shortages, foreign competition, market crashes, pandemics and so forth, are all contained in its data. So, henceforth, we will consider that all the data used is transformed using the percentage change transformation, i.e., we will apply the Percentage Returns transformation U t = X t X t 1 X t 1 , so each entry on the obtained datasets represents the percentage return from the previous iteration to the present one. Thus, we will apply all of our models to this transformed data. For example, the transformation applied to the previous datasets yields the following Figure 5, Figure 6, Figure 7 and Figure 8:
Note that we can apply this transformation because all of our values represent asset prices in a stock exchange; thus, they are always strictly positive. Also, due to this transformation, we will “lose” one observation, but gain several important properties, which were previously described.

2. Models

In this section, we will make use of game theory (presented in [17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]) to develop the game theoretical model and Markov chains (presented in [32,33,34,35,36,37,38,39,40,41,42,43]) to estimate the game’s probabilities in order to design suitable models for financial data (specifically, for the data that were described in the previous section); then, we will describe how we applied our models using R 4.0.4 software.
We will also compare our results against classical time series theory (presented in [12,13,44,45,46,47,48,49,50]); thus, we need to explain how we will apply these models and compare their outcomes.

2.1. The Game Theoretical Model

Since the focus of this article is to apply game theory to the financial markets, we will start by presenting the game proposed in [31] and the subsequent decision model that we developed from it. But, before constructing a game model for the market, we need to understand how the market works, how we can model it and what our goals are. Thus, we will start by identifying what kind of player in the market we will be, because there are two kinds of participants in the financial markets:
  • Investors: these participants are interested in making a predictable rate of return from their investments, through interest payments, dividends and so on.
  • Speculators: these are interested in trying to profit from changes in the price of an asset.
Thus, since our goal is to predict prices and then act according to our predictions, henceforth, we will take the part of a speculator. Also, to be a participant in the market, we must accept some level of risk (high- or low-risk acceptance level) and we also must have a clear profit objective in mind. Formally, the speculator needs to set quantities for “Less Risk”, “More Risk” and “profit objective”, always assuming that the asset will be held until the price reaches one of these targets. So, these targets must represent an individual’s actual risk and reward appetites, because, if they are set randomly, then it is possible that neither are reached or that they are reached sooner than expected. Thus, these must have some basis in reality and the asset should stand a chance of hitting one of them.
Once the decision has been made to take a position in the market (by buying or selling a particular asset), the interaction between the asset’s price fluctuation and the speculator’s risk acceptance level and profit objective will determine whether or not a profit will be made.
Remark 1.
Note that this is consistent with game theory, where the outcome is determined by the choices made by both players, not just one.
Thus, speculators take positions in markets and market prices fluctuate. As such, the speculators’ strategies involve determining how much risk to accept; then, the market will fluctuate the prices. It is the interaction between the speculator’s and the market’s actions that determine whether a trade is profitable or not. Hence, after setting the profit objective and risk acceptance levels, we have the following scenarios:
  • Zero Adversity: when there is no price fluctuation against the speculator’s position severe enough to cause the trade to hit either risk acceptance levels. In this case, it does not matter how much risk is accepted, because the market movement is completely favorable. We will term this pattern of price movement Zero Adversity.
  • Minor (or Moderate) Adversity: when the market moves somewhat against the speculator’s position, which will cause the speculator to lose money if Less Risk were accepted but would have resulted in a profit if More Risk were accepted. So, any pattern of price movement that will cause a loss if Less Risk is accepted, yet still yield a profit if More Risk is accepted falls into this category, which we will term Minor Adversity.
  • Major Adversity: when the market moves completely against both risk acceptance positions, so the Less Risk acceptance position results in a small loss and the large risk acceptance position results in a large loss. Also, the profit objective was never reached. We will term this pattern of price movement Major Adversity.
Note that many different price movement patterns yield the same result and that it is possible to classify all market price movements into these three categories. These classifications are as follows:
  • The speculator accepts Less Risk and then the prices move favorably, resulting in a profit for the speculator;
  • The speculator accepts More Risk and then the prices move favorably, resulting in a profit for the speculator;
  • The speculator accepts Less Risk and the prices move moderately against the position, resulting in a small loss to the speculator;
  • The speculator accepts More Risk and the prices move moderately against the position, resulting in a profit for the speculator;
  • The speculator accepts Less Risk and the prices move severely against the position, resulting in a small loss to the speculator;
  • The speculator accepts More Risk and the prices move severely against the position, resulting in a large loss to the speculator.
Thus, if we quantify our risk acceptance levels and profit objective, the pattern of price fluctuation that subsequently occurs will result in one of the six outcomes previously described. Also, there is no price line that can be drawn that will not yield one of the above six results, which are shown on the following Figure 9:
However, even though there are six categories, there are only three possible outcomes that can result from any trade, because the speculator must decide between accepting More Risk or Less Risk on any particular trade, and there are three outcomes associated with either of these actions. In other words, the speculator must decide on how much risk to take, and either take More Risk or take Less Risk; then, the market decides on how to fluctuate the prices, either fluctuate them so as to cause the speculator Zero Adversity, Minor Adversity or Major Adversity. So, after the speculator’s decision, one of three possible states of nature will prevail.
The previous discussion also holds true for short sales. A short sale is where the individual sells a particular asset first, then buys it back at a later date. Typically, the shorted asset is “borrowed” from the brokerage firm, and the broker will require a high margin against the short. Intuitively, a short sale is the inverse of a long position (i.e., the buy–sell position that we have been discussing so far), so short sellers make a profit when the value of an asset declines and lose money when the prices rise. Thus, the risk acceptance levels are set at prices higher than the price that initiated the trade. However, there is no significant difference in the concepts of risk acceptance levels and profit objectives between being either long or short in the market. But, because of the added costs of being a short seller, profit objectives generally have to be higher in order to recoup margin costs. Thus, henceforth, we will only concentrate on long positions, and their risk acceptance levels and profit objectives.

2.1.1. The Financial Game

To create the game that mimics the financial markets, we need to meet game theory’s requirement to have at least two players and that their identities are known; in our case, the players are the speculator and the market. However, the market is an abstract entity; thus, we enter the subclass of games (developed in [19,20,27,30]) called games against nature, where one of the players is an abstract entity.
In spite of this being a standard game against nature, we must make some important observations and assumptions:
  • The market does not come up with prices in a vacuum, rather the prices are the net result of the buying and selling decisions of all the individual participants in the market.
  • Generally, an individual has no influence on nature; yet, in the financial markets, a participant may have an effect on the price movements due to his/her own actions. Of course, this depends on the individual and on the market. For instance, if the market is small and thinly traded, a large order will tend to move the prices either up or down, or if a person making the order is known (to other participants) to be astute, then his/her actions may also influence the prices. However, since the majority of individuals cannot affect “large” markets (such as in the USA, EU and UK markets), we will assume that we are working on a large market and that the effect of any individual is negligible.
  • Since the payoffs of each individual are unrelated, we will assume that the market plays the same game against all participants. This also guarantees that all the individuals are playing against the market separately.
  • We will also assume that the goal of the speculator is to make a profit and that the goal of the market is to try to make the speculator lose money.
Note that, with the previous assumptions, we have a game against nature where we assume Wald’s (max–min) Criterion (for more details check [19,20,27] and/or [30]). That is, we apply Wald’s (max–min) Criterion to model the interaction between the speculator and the market within a game against nature framework, where we assume the market acts adversarially, aiming to minimize the speculator’s gains while the speculator aims to maximize their profit under the worst-case scenario of market behavior. This approach helps determine a strategy that guarantees the best possible outcome for the speculator, even in the face of unpredictable market fluctuations.
Here, the market “tries” to make the speculator lose money by attempting to fluctuate the prices in such a manner as to make it impossible to find a good combination of risk acceptance levels and profit objectives. Also, because we are using a theory that will enable an individual to find a way to beat the market, assuming that the market is also trying to beat the individual is the most conservative approach. So, ascribing a motive to the market allows us to analyze the market’s strategies as if it is a rational player in the game.
In order to have a game theoretic construction, we need to be able to draw a game matrix outlining the strategies of each player as well as the payoffs. Also, this should be carried out from the perspective of the individual speculator, because the point of this analysis is to find a set of strategies that will enable an individual to beat the market. Thus, the possible strategies for the speculator are accepting More Risk or relatively Less Risk. And the market’s strategies are price movements relative to the speculator’s position, i.e., the market can “choose” between three price movements: Zero Adversity, Minor Adversity or Major Adversity.
With this, we have that there are two possible strategies that the speculator can play and three possible strategies the market can play, resulting in six possible outcomes from the interaction between price movements and risk acceptance levels, the combination of which results in the following game Table 1:
Remark 2.
Note that, in the game table, we added between parentheses some notation so that we can refer to those strategies in a simpler manner.
Looking at the game table suggests that we should play the strategy of Less Risk, because this column has a minimum of a small loss, which is larger than the minimum in the More Risk column, which is a large loss. Similarly the market will “look” at the payoff table and “decide” to play a strategy that leaves us with the smallest minimum, i.e., the market will choose to play the Major Adversity strategy, because this row’s maximum is a small loss, which is the smallest maximum available. Hence, the most likely outcome is that the speculator will lose money, which makes this game rather unattractive. However, in the real world, a lot of people play the markets and some of them make money (at least some of the time).
Note that the solution Major Adversity, Less Risk is based on the concept of pure strategies. So this solution requires that the speculator always plays the strategy of Less Risk and the market always plays the strategy of Major Adversity. Thus, this renders the game entirely pointless from the speculator’s point of view. But there are some caveats: the market is simultaneously playing against a myriad of players and, as such, it does not know all of the risk acceptance levels, the profit objectives and how many are short sellers or long traders. So, the market has to make its decision on which strategy to play under conditions of both risk and uncertainty.
Given the multitude of players and their strategies, the market will try to fluctuate prices in such a manner that as many people as possible lose money. Also, from the point of view of any individual speculator, these fluctuations will make it look as if the market is varying its strategy each different time the game is played. All of this (and considering the theory so far) implies that playing each different strategy with some probability is called playing mixed strategies (for further details see [18,21,22,26,29] and/or [28]).
The speculator may also play mixed strategies, if they vary their risk and reward amounts each time they play the game. Also, they do not know how advantageous it is to play either strategy with any regularity, due to the market’s continually changing mixed strategies. But, in the financial markets, the players do not usually change their strategies, i.e., they pick the risk acceptance levels and then wait for the assets’ prices to hit the corresponding thresholds. So, with this in mind, we will only consider pure strategies for the speculator to play in the financial game.
Now, we need to be able to calculate the payoffs to the speculator for any set of strategies he/she plays against any set of mixed strategies that the market may play, in order to determine the merits of playing any one strategy at any particular point in time. Furthermore, this has to be performed in the general case, because, to have a coherent theory, the solutions must hold true for each and every individual speculator, no matter what strategy they play.
The market will play one of three strategies: fluctuate the prices in a way that causes major adversity to the speculator, fluctuate the prices in a manner that causes minor adversity to the speculator, or fluctuate the prices in a manner favorable to the speculator. Also, the market will choose one of the strategies in an unknown manner to the speculator, so each strategy will have a certain probability of being played. Thus, we will use the following notation:
  • p 1 := the probability the market plays Minor Adversity;
  • p 2 := the probability the market plays Major Adversity;
  • p 0 := the probability the market plays Zero Adversity.
This notation is in terms of the probability that either event will occur and, because the market is playing mixed strategies, the sum of the probabilities of playing all of the strategies must equal 1. Therefore, if the market plays Minor Adversity with a probability of p 1 and Major Adversity with probability p 2 , then it follows that Zero Adversity occurs with a probability of p 0 = 1 p 1 p 2 .
Regarding the speculator, theoretically, he/she may play two different strategies: More Risk or Less Risk. Analogously to the market, the speculator may play the More Risk strategy with some probability and the Less Risk strategy with some probability. Thus, the speculator is playing mixed strategies, just as the market is. With this, we can define the probabilities of playing the two strategies as follows:
  • q = the probability the speculator plays More Risk;
  • 1 q = the probability the speculator plays Less Risk.
Once again, the sum of the probabilities of playing both strategies must equal one.
Next, we need to make a representation of the payoffs. Recall that there are three different results for this game: a speculator may make a profit, lose money equal to the Less Risk amount or lose money equal to the More Risk amount. We will denote this as follows:
  • w := profit to the speculator (this corresponds to a “win” for the speculator);
  • x := loss equal to the “Less Risk” amount (this corresponds to a “small loss” to the speculator);
  • y := loss equal to the “More Risk” amount (this corresponds to a “large loss” to the speculator).
Here, w , x , y R + and w y > x . So, with this notation, we do not need to specify monetary amounts associated with a profit, a small loss, or a large loss, because we have the relative magnitude of these variables. Thus, putting together the above ideas into a game table, we obtain the results in Table 2.
Note that Table 2 is the game’s decision matrix (also known as payoff matrix); however, it only presents the payoffs for the speculator since the market’s payoffs cannot be quantifiable.
Now, to determine when it is advantageous to play one strategy or the other, we need to start by isolating the pure strategies in terms of their expected profitability, and each of the speculator’s strategies must be compared with each of the market’s strategies; also, all the results must be quantified.
Remark 3.
Even though we presented the probabilities associated with the speculator’s strategies, we will not consider them for our model.
We know that there are three outcomes that can take place after the speculator takes a position in the market: a profit (equal to the profit objective), a small loss (equal to the Less Risk amount) or a large loss (equal to the More Risk amount). And each of these three outcomes takes place with some unknown probability. Also, these events are mutually exclusive, i.e., only one of them can happen at any one point in time (or trade). This is because, if the speculator gets stopped out of the market, he/she made a profit or suffered a loss (large or relatively small), and the highest probability that any event can occur is 100 % . Given this, it is possible (although unlikely) that one of the three outcomes takes place with 100 % probability but, since we want to develop our model in terms of the speculator getting stopped out for either a large loss or a small loss, we will construct a diagram (specifically, a probability triangle) which will reflect these two possibilities.
Remark 4.
The diagram that we will be constructing goes along with the algebraic exposition, in order to make the model much easier to interpret.

2.1.2. The Probability Triangle

For the diagram, consider the market’s probability of playing Major Adversity on the vertical axis and the market’s probability of playing Minor Adversity on the horizontal axis. Also, since the highest value either axis can have is 100 % (because neither condition can prevail more than 100 % of the time), this implies that all combinations of Major Adversity and Minor Adversity can never sum to more than 100 % . This being the case, a diagonal line must be drawn between the 100 % mark on both axes, which will contain all possible combinations of the market’s strategies of Major Adversity and Minor Adversity. Thus, with all of this, we obtain the following probability triangle Figure 10:
We will divide this probability triangle into several regions, which will reflect when it is more advantageous to accept More or Less Risk, or even when it is advantageous not to play the game at all. Furthermore, since game theory gives us methods to determine when a player is guaranteed a certain payoff, we can solve for when it is optimal to accept either More or Less Risk.
So far, we have concentrated on the speculator’s strategies which involve taking a position in the market. However, in reality, if we know when to take a position (i.e., when to play the game), we also know when not to take a position in the market (i.e., when not to play the game). So we will develop this model in order to determine when it is advantageous to take a position, along with when it is disadvantageous to do so. Thus, conditions where it is disadvantageous to take a position will correspond to the “Do Not Play” region of the probability triangle.
Now, we can determine, with the aid of Table 2, the expected payoffs from playing each of the speculator’s strategies:
  • The expected payoff from playing Less Risk ( R ):
E S ( R ) = ( 1 p 1 p 2 ) w + p 1 ( x ) + p 2 ( x ) = w ( p 1 + p 2 ) ( w + x )
  • The expected payoff from playing More Risk ( R + ):
E S ( R + ) = ( 1 p 1 p 2 ) w + p 1 w + p 2 ( y ) = w p 2 ( w + y )
Equation (1) represents the expected payoff from playing the pure strategy Less Risk ( R ) and is written with several variables: the amount that can be won (w), the amount that can be lost due to a small stop (x), and the probability that the market will either give us minor adversity ( p 1 ) or major adversity ( p 2 ). Note that the speculator determines the values of w and x by his/her risk-to-reward appetite, but the market determines the probabilities p 1 and p 2 .
If Equation (1) is greater than zero, the speculator expects a profit but, if it is less than zero, the speculator expects to lose money. Also, because the speculator is only in control of the variables x and w, we need to express the equation as a strict inequality, and solve it in terms of p 1 and p 2 . In other words, we need to find out for which market conditions it is always advantageous to accept Less Risk by finding out when the expected payoff from playing Less Risk is greater than zero. Thus, we obtain the following:
E S ( R ) > 0 w ( p 1 + p 2 ) ( w + x ) > 0 p 1 + p 2 < w w + x
Note that we are considering a strict inequality because if E S ( R ) = 0 it is not profitable to play the Less Risk strategy, because its expected payoff is zero.
With all of this, we can incorporate Equation (3) into the probability triangle yielding the following Figure 11:
Remark 5.
Note that, by the definitions of w and x,
w < w + x w w + x < 1
The “Play Less Risk” area contains the points where it is profitable to play the strategy of Less Risk, and the “Do Not Play” region contains money-losing strategies. Also, because Equation (3) was developed as a strict inequality, the line diving the two regions is not included in the “Play Less Risk” area, so the points on the line ( E S ( R ) = 0 ) are included in the area of loss.
Again, the line dividing these areas is determined exclusively by the parameters set by the speculator, so this line will vary from individual to individual, always based on each individual’s risk-to-reward appetites; also, the value yielded by w / ( w + x ) is not a constant that holds true for all players in the market. But, since we are developing a model in the general case, it must hold true for each and every person, no matter what their individual circumstances are.
Moving forward, we can now focus on determining when it is advantageous to accept More Risk; however, it is not as straightforward as it was for Less Risk, because it is only advantageous to accept More Risk when the market is playing Minor Adversity. And, under this condition, a strategy of Less Risk will cause a small loss, but a strategy of More Risk results in a profit.
Looking back at Table 2,
  • Under market conditions of Zero Adversity, both strategies yield a profit, so the speculator is indifferent between the strategies;
  • Under market conditions of Minor Adversity, a strategy of More Risk generates a profit, and the strategy of Less Risk causes a loss, so it is advantageous to utilize the More Risk strategy;
  • If the market conditions correspond to Major Adversity, both the speculator’s strategies are unprofitable, but the Less Risk strategy causes a smaller loss than does the More Risk strategy, so it is less advantageous to play More Risk.
We know that, from Equations (1) and (3), if the expected payoff from the Less Risk strategy is positive, then we are “guaranteed” a positive payoff when Less Risk is played. So, to find out when the strategy of More Risk yields a positive payoff when the strategy of Less Risk does not, we need to analyze Equation (2) while (1) is negative.
So, we need to to find out for which market conditions it is always advantageous to accept More Risk by finding out when the Expected Payoff from playing More Risk ( R + ) is greater than zero, assuming that E S ( R ) < 0 . Thus, we obtain the following:
E S ( R + ) > 0 w p 2 ( w + y ) > 0 p 2 < w w + y
Note that we are considering a strict inequality because if E S ( R + ) = 0 it is not profitable to play the More Risk strategy, since its expected payoff is zero. Also, observe that Equation (5) is only in terms of Major Adversity ( p 2 ) and it implies that if the probability of Major Adversity is greater than w / ( w + y ) then the trade will lose money; otherwise, the trade will make money. In terms of game theory, if the probability of Major Adversity is greater than w / ( w + y ) , then we will not play the game and, if the probability of Major Adversity is less than w / ( w + y ) , then we play the pure strategy of More Risk. Additionally, if the probability of Major Adversity is equal to w / ( w + y ) , then the trade will result in a profit of zero; thus, we will also not play the game.
With all of this, we can incorporate Equation (5) into the probability triangle yielding the following Figure 12:
Remark 6.
Regarding the previous probability triangle, note the following:
  • By the definitions of w and y, w < w + y w w + y < 1 ;
  • p 2 = w w + y p 1 + p 2 = 1 p 2 = w w + y p 1 = 1 w w + y .
Here, the lower region contains the conditions where it is advantageous to play the pure strategy of More Risk, and the upper region is where it is disadvantageous to play More Risk. Also, once again, the points in the separating line ( E S ( R + ) = 0 ) are included in the Do Not Play area.
The same reasoning used to understand the implications of playing the pure strategy of Less Risk hold true for the strategy of More Risk, i.e., points within the “Play More Risk” area represent profitable trades and points within the “Do Not Play” area represent losses. Also, once again, the solutions must be interpreted in a probabilistic sense.
Now that we know when it is advantageous to play More Risk (assuming that the result of playing Less Risk is negative), we need to determine when it is advantageous to play More Risk despite the result of playing Less Risk, because there is a region of the probability triangle where the two strategies overlap. So, we still need to determine when it is advantageous to play More Risk, irrespective of the merit of playing Less Risk. Thus, we need to solve the following equations:
E S ( R + ) > 0 w p 2 ( w + y ) > 0 p 2 < w w + y ;
E S ( R ) < E S ( R + ) w ( p 1 + p 2 ) ( w + x ) < w p 2 ( w + y ) p 1 > p 2 y x w + x .
Consider that Equation (7) was developed as an equality; then, if the probability of Minor Adversity is equal to zero (i.e., p 1 = 0 ), then the probability of Major Adversity has to equal to zero as well (i.e., p 2 = 0 ). However, in the inequality, if p 1 were zero, then p 2 would have to be less than zero, but this is in conflict with the variables’ definitions, because probabilities can only take values between zero and one; thus, they cannot be negative. Also, the probability of Major Adversity occurring in the real world is not less than zero, because, if this were true, all the players in the market would always win. Moreover, since the formula that expresses the slope of the line ( ( y x ) / ( w + x ) ) is always a positive number (as the variables x, y and w are all positive numbers), whenever p 1 is zero, then p 2 has to be zero, and vice versa. Also, the line itself represents the boundary where it is equally advantageous to play the pure risk strategies of either Less Risk or More Risk, and the area above the line defines where it is advantageous to play Less Risk.
All of these results are combined in the following probability triangle Figure 13:
Remark 7.
Regarding the previous probability triangle, note the following:
  • w w + x > 1 w w + y w ( w + y ) + w ( w + x ) ( w + x ) ( w + y ) > 1 2 w 2 + w x + w y w 2 + w y + w x + x y > 1 2 w 2 + w x + w y > w 2 + w y + w x + x y w 2 > x y , which is true because, by definition, w y > x ;
  • 1 w w + y > w ( y x ) ( w + x ) ( w + y ) 1 > w w + x x > 0 , which is true by definition of x;
  • p 1 = p 2 y x w + x p 2 = w w + y p 1 = w ( y x ) ( w + x ) ( w + y ) p 2 = w w + y ;
  • p 1 = p 2 y x w + x p 1 + p 2 = w w + x p 1 = w ( y x ) ( w + x ) ( w + y ) p 2 = w w + y ;
  • p 1 + p 2 = w w + x p 2 = w w + y p 1 = w ( y x ) ( w + x ) ( w + y ) p 2 = w w + y .
In the previous probability triangle, there are three regions: the Do Not Play region, the Less Risk region and the More Risk region. Also, the dotted lines show the location of the original regions, as well some relevant intersection points. Note that all of the interior lines intersect at one point ( p 1 = ( w ( y x ) ) / ( ( w + x ) ( w + y ) ) , p 2 = w / ( w + y ) ), and that we included the separation line between the Less Risk and More Risk regions (i.e., p 1 = p 2 y x w + x ) in the Less Risk region, but the intersection point between all the interior lines is considered a part of the Do Not Play region.
Finally, observe that, in all of the obtained probability triangles, a “Do Not Play” region has appeared which is not related to any possible strategy (in the presented financial game) that the speculator can choose from. However, the “Do Not Play” strategy is implicit in Table 1 and Table 2. To see this, consider Table 2 and that the speculator has an additional “Do Not Play” strategy. So, if the speculator chooses this strategy, then he/she will not enter the trade, and thus will not lose or win with the trade. Hence, the payoffs from this strategy are always zero independently of the market’s strategy. So, Table 2 becomes the following Table 3.
However, the payoffs from adding this strategy do not change any of the calculations that we made to determine the several probability triangles; also, these would only be relevant if we wanted to determine the best mixed strategy for the speculator to play (specifically, the probabilities q 1 , q 2 and 1 q 1 q 2 would be important). But, since we only want to determine the best pure strategy that the speculator should play (i.e., one of the speculator’s probabilities will be equal to one) by taking into account the market’s probabilities ( p 0 , p 1 and p 2 ), the “Do Not Play” strategy being explicit or not in the game table is not relevant, but this strategy is still important overall, because it complements the speculator’s other two strategies (Play More Risk and Play Less Risk).
So, the complete model, which incorporates all of the previous calculations and graphic representations, has the general form shown by the probability triangle in Figure 13. Also, this probability triangle represents the situation a speculator faces in a financial market, because it takes into account the speculator accepting either More Risk or Less Risk, and the market generating conditions of either Zero Adversity, Minor Adversity or Major Adversity (always with respect to the speculator’s position). Additionally, the probability triangle has Minor Adversity and Major Adversity as its axes, yet it also shows the condition of Zero Adversity, which is the complete absence of both Major Adversity and Minor Adversity, which is represented by the origin point on the probability triangle.
Always have in mind that the model has to be interpreted in terms of “if these certain probabilities exist, then we should play a specific strategy”. So the model cannot tell us what the probabilities are, it only tells us that, if certain probabilities exist, then a particular strategy should be employed. Thus, if we play the financial game repeatedly, under some predetermined circumstances, the wins will outweigh the losses, and the net result of our successive plays will be profitable; this is because we need to interpret the model in the probabilistic sense rather than in an absolute sense. For instance, the model does not suggest that each and every trade that falls within the parameters of w / ( w + x ) will necessarily be profitable, only that over time the amount won will be greater than that lost.
Now that we have the complete model, we need to estimate the probabilities of the market playing the strategies of Major Adversity and Minor Adversity. Furthermore, we need to make these estimates as accurate as possible, because, if they are not, the model will lose its predictive value. And we will accomplish this in the next section, with the aid of Markov chains.

2.1.3. Parallel to Barrier Options

As it was mentioned before, the presented methods would be optimal if they were utilized as an automated system to purchase barrier options. Thus, we will briefly present barrier options and their parallelism to our financial game.
Barrier options are a type of exotic financial derivative where the payoff depends on whether the underlying asset reaches or exceeds a predetermined price, known as the barrier. They are more complex than standard options and are considered path-dependent because their value changes based on the underlying asset’s price movements during the option’s term.
There are two main types of barrier options:
  • Knock-in Options: These options only become active if the underlying asset’s price reaches a specified barrier. They can be further classified into the following:
    -
    Up-and-In Call: Activated when the asset’s price rises above the barrier.
    -
    Down-and-In Put: Activated when the asset’s price falls below the barrier.
  • Knock-out Options: These options become void if the underlying asset’s price reaches a specified barrier. They can be further classified into the following:
    -
    Up-and-Out Call: Ceases to exist when the asset’s price rises above the barrier.
    -
    Down-and-Out Put: Ceases to exist when the asset’s price falls below the barrier.
Barrier options are often used for hedging or speculative purposes and typically have lower premiums compared to standard options due to the added complexity and conditions (for further details on barrier options see [51]).
In Section 2.1.1, for the financial game, we defined the speculator’s possible strategies and with each strategy will be associated a threshold related to the speculator possible profits or losses (Less Risk, More Risk and profit thresholds); in the next sections (Section 2.2 and Section 2.4) we will specifically define these thresholds for each strategy.
Each threshold will be link to the asset’s own value, which will result in a profit/loss to the speculator when it is achieved by the asset’s price. So, these thresholds can be directly linked to the barriers on the barrier options, that is,
  • When the model predicts Zero Adversity or Minor Adversity, the speculator can purchase an Up-and-In Call Option with the a barrier of More Risk, which will yield a profit associated with the More Risk threshold.
  • When the model predicts Major Adversity, the speculator can purchase a Down-and-In Put Option with the barrier of More Risk, which will yield a profit associated with the More Risk threshold.
These are the straightforward strategies using barrier options than can be considered using the predicted strategies.

2.2. The Markov Chain Model

As we have seen in the previous section, playing the markets is an iterated game, so the next important task that we have to address is the (probabilistic) method that we will use to estimate the probabilities of the market playing Zero Adversity, Minor Adversity and Major Adversity ( p 0 , p 1 and p 2 , respectively).
Remark 8.
Here, we need to note that Bayes’ Theorem [52] will not be the primary method used because we will use Markov chains to model market behavior. Markov chains excel at capturing sequences of events where the probability of the next event depends solely on the current state, not the entire history, which does not allow us to directly apply Bayes’ theorem. Instead, we focus on estimating transition probabilities within the Markov chain. These probabilities represent the likelihood of the market shifting from one strategy (e.g., “Minor Adversity”) to another (e.g., “Major Adversity”) in a single time step.
The financial assets’ prices fluctuate in a variety of ranges (but are always strictly positive). Thus, we need to split the data into classes in order for us to make some kind of probabilistic analysis. For this, consider the standard deviation ( α ) of a dataset transformed with the percentage change transformation, and define the strategies’ thresholds as follows:
  • The Less Risk threshold corresponds to minus two times the standard deviation of the data ( 2 α );
  • The More Risk threshold corresponds to minus three times the standard deviation of the data ( 3 α );
  • The profit threshold corresponds to three times the standard deviation of the data ( 3 α ).
Since different assets from the stock market have different price ranges and levels of volatility, by defining the thresholds in this manner, we will maintain a certain coherence across all the datasets. Also, note that the Less and More Risk thresholds have to be negative, because they correspond to possible losses. Additionally, since the datasets’ unit of measure is the percentage change, the standard deviation’s unit of measure is also the percentage change.
After defining the thresholds, we can formally say what the relationship is between the market’s chosen strategies and an asset’s price. Thus, to accomplish this, we will assume the following:
  • The asset’s price drops further than the Less Risk threshold if and only if the market chooses to play the Minor Adversity strategy;
  • The asset’s price drops further than the More Risk threshold if and only if the market chooses to play the Major Adversity strategy;
  • The asset’s price increases further than the profit threshold if and only if the market chooses to play the Zero Adversity strategy.
Now, consider that we observed the asset’s percentage price change for N successive and mutually independent financial market games, and that we want to determine the mentioned probabilities for the next ( N + 1 ) game. Also, the percentage price change of game i is denoted by X i , i = 1 , , N + 1 . Additionally, assume that, if the thresholds of Major Adversity or Zero Adversity are reached in a game—suppose that it was in game k { 1 , , N } —then the speculator will not play in the following games, k + 1 , , N ; otherwise, the speculator will continue to play. We need to assume this because, if the speculator loses or wins in a game, then we will not continue playing, due to the trade being closed, and if the price does not reach one of the thresholds, the speculator will not win or lose the game, so he/she needs to keep playing, because the trade is still open.
Remark 9.
Note that, if the market chooses to play Minor Adversity, the speculator only has to stop playing if he/she played the Less Risk strategy.
With all of this, we can start estimating the desired probabilities for the ( N + 1 ) t h game, knowing that the probability of the market playing a certain strategy at game N + 1 is related to the probabilities of the market’s choices on the N previous games, i.e., we want to determine
p 0 = P ( X N + 1 3 · α | X 1 , , X N ) ,
p 2 = P ( X N + 1 3 · α | X 1 , , X N ) ,
p 1 = 1 p 0 p 2 .
Remark 10.
Note that we will not directly estimate p 1 , because it is simpler to estimate p 0 and p 2 , due to the way we defined these probabilities. Also, we can do this because p 0 + p 1 + p 2 = 1 . So, moving forward, we will not reference the estimator of p 1 unless we see fit to do so.
Firstly, suppose that we only consider one game to determine our probabilities, i.e., we will start by considering N = 1 , so we have the following:
p 2 = P ( X 2 3 · α | X 1 ) = P ( X 1 3 · α ) ;
p 0 = P ( X 2 3 · α | X 1 ) = P ( X 1 3 · α ) .
We can interpret Equation (8) for the probability of the market playing Major Adversity as follows: if the percentage price change reaches the More Risk threshold in game 1, then the speculator stops playing. So, the probability of the price change reaching the More Risk threshold is obtained by simply calculating the probability of the percentage change reaching the More Risk threshold in the previous game, i.e., P ( X 1 3 · α ) .
Similarly, the probability of the market playing the Zero Adversity strategy is obtained by calculating the probability of the percentage change reaching the profit objective threshold in the previous game, i.e., P ( X 1 3 · α ) .
However, since we have access to more historical data of the asset’s price, we can determine these probabilities more accurately by taking into account more games. Now, consider that we will use the results of two past games to determine our probabilities, i.e., we will consider N = 2 ; thus, we obtain the following:
p 2 = P ( X 3 3 · α X 2 , X 1 ) = P ( X 1 3 · α ) + P ( 3 · α < X 1 3 · α X 2 3 · α ) ;
p 0 = P ( X 3 3 · α X 2 , X 1 ) = P ( X 1 3 · α ) + P ( X 1 < 3 · α X 2 3 · α ) .
Thus, we can can interpret the new Equation (10) for the probability of the market playing Major Adversity as follows: the speculator stops playing if the percentage price change reaches the More Risk threshold in game 1 or if the threshold is only reached in game 2 (implying that, in game 1, no threshold was reached). So, the probability of the price change reaching the More Risk threshold is obtained by adding the probability of the percentage change reaching the More Risk threshold in game 1 to the probability of the percentage change reaching the More Risk threshold in game 2 without reaching it in game 1. And a similar interpretation can be given of Equation (11).
Finally, we can obtain even more accurate probabilities if we consider the results of all the played games (i.e., by considering all the historical price data). Thus, considering the results of N games, the equations for the desired probabilities are as follows:
p 2 = P ( X N + 1 3 · α | X N , , X 1 ) = P ( X 1 3 · α ) + P ( 3 · α < X 1 < 3 · α X 2 3 · α ) + P ( 3 · α < X 1 < 3 · α 3 · α < X 2 < 3 · α X 3 3 · α ) + + P ( 3 · α < X 1 < 3 · α 3 · α < X 2 < 3 · α 3 · α < X 3 < 3 · α 3 · X N 3 · α ) .
p 0 = P ( X N + 1 3 · α | X N , , X 1 ) = P ( X 1 3 · α ) + P ( X 1 < 3 · α X 2 3 · α ) + P ( X 1 < 3 · α X 2 < 3 · α X 3 3 · α ) + + P ( X 1 < 3 · α X 2 < 3 · α X 3 < 3 · α X N 3 · α ) ;
The intuition behind the obtained Equations (12) and (13) is similar to the one that we used to obtain Equations (8) and (9). Also, because the N games are mutually independent, from basic probability theory, we have that Equations (12) and (13) are equivalent to the following:
p 2 = P ( X N + 1 3 · α | X N , , X 1 ) = P ( X 1 3 · α ) + P ( 3 · α < X 1 < 3 · α ) P ( X 2 3 · α ) + P ( 3 · α < X 1 < 3 · α ) P ( 3 · α < X 2 < 3 · α ) P ( X 3 3 · α ) + + P ( 3 · α < X 1 < 3 · α ) P ( 3 · α < X 2 < 3 · α ) P ( 3 · α < X 3 < 3 · α ) P ( 3 · X N 3 · α )
p 0 = P ( X N + 1 3 · α | X N , , X 1 ) = P ( X 1 3 · α ) + P ( X 1 < 3 · α ) P ( X 2 3 · α ) + P ( X 1 < 3 · α ) P ( X 2 < 3 · α ) P ( X 3 3 · α ) + + P ( X 1 < 3 · α ) P ( X 2 < 3 · α ) P ( X 3 < 3 · α ) P ( X N 3 · α ) ;
From these equations we can see that, for example, to estimate p 0 (and p 2 ), we would have to estimate ( N ( N + 1 ) ) / 2 probabilities, which would be computationally inefficient and the error from the final estimate would increase due to the large number of individual estimates. So, to overcome these problems, we will use Markov chains to estimate the probabilities p 0 , p 1 and p 2 .
Thus, using the same assumptions and notations as before,
  • The asset’s percentage price change for N successive financial market games is known;
  • The percentage price change in game i is denoted by X i , i = 1 , , N + 1 ;
  • We want to determine the mentioned probabilities for the ( N + 1 ) t h game;
  • If any of thresholds is reached in a game—suppose that it was in game k { 1 , , N } —then the speculator will not play in the following games, k + 1 , , N ; otherwise, the speculator will continue to play.
Now, because we will use Markov chains, we need to assume that the probabilities associated with each game are related through the Markov property (for further details see [33]):
Definition 1
(Markov Property). A stochastic process { x t , t = 0 , 1 , 2 , } with a discrete and finite (or countable) state space S is said to be a Markov chain if for all states i 0 , i 1 , , i t 1 , i , j and (steps) t 0 the following applies:
P ( x t + 1 = j | x 0 = i 0 , , x t 1 = i t 1 , x t = i ) = P ( x t + 1 = j | x t = i ) = p i j t , t + 1 .
So, we obtain the following estimators for p 0 and p 2 :
p 0 = P ( X N + 1 3 · α | X N , , X 1 ) = P ( X N + 1 3 · α | X N ) ;
p 2 = P ( X N + 1 3 · α | X N , , X 1 ) = P ( X N + 1 3 · α | X N ) .
In order for us to be able to use the percentage price change (of a given asset) in game i (i.e., to use X i ) as the underlying stochastic process of the Markov chain, we need to split the data into classes (or states). Also, by defining the Markov chain, we will obtain its probability matrix, which will allow us to estimate p 0 and p 2 .
Before moving further, we need to note that, for instance, if the price is (at a certain time) in a lower price class (relative to the initial price), then it will have a higher probability of transitioning to a higher price class, due to the nature of the data that we are utilizing, and a similar argument can be made if the price is in a higher class (as we have seen in Section 1). However, this is represented by the Markov property, because the probability of the Markov chain being in a certain state at time t only depends on which state the chain was in at time t 1 , so this probability may change according to which states the chain encounters itself in time t 1 . And this fact will also affect how we will define the chain’s classes.
To define the classes, we can utilize the standard deviation (which we previously denoted by α ) of the dataset, and since we defined (and used) the strategies’ thresholds, we will split the data “around” these thresholds’ values; also, the classes’ ranges and distance between them will be α .
Additionally, due to the mentioned volatility and wide range of the assets’ prices, they may reach one of the thresholds in the first game (or iteration), or they may not reach them at all. So, for these reasons, we will define some intermediate classes between the classes associated with the thresholds (or market strategies). Thus, with all of this, we obtain that the classes (or states) are as follows:
The Major Adversity class is   s M = { X t : X t 2.5 · α } ;
The Minor Adversity class is   s m = { X t : 2.5 · α < X t 1.5 · α } ;
The intermediate classes between the Minor Adversity and Zero Adversity classes are as follows:
s 1 = { X t : 1.5 · α < X t 0.5 · α } ;
s 2 = { X t : 0.5 · α < X t 0.5 · α } ;
s 3 = { X t : 0.5 · α < X t 1.5 · α } ;
s 4 = { X t : 1.5 · α < X t 2.5 · α } .
The Zero Adversity (or profit) class is   s Z = { X t : X t > 2.5 · α } .
Remark 11.
Note that, instead of using the previously defined threshold to limit the classes, we chose to define the classes around these thresholds, in order to include them. However, if all the classes maintain a certain coherence according to the thresholds and have the same range (excluding the s M and s Z classes), then we will obtain similar results after applying our models.
As an example, consider the dataset
{ 45.00 , 44.49 , 43.44 , 40.17 , 41.05 , 41.53 , 41.36 , 40.68 , 40.46 , 38.42 }
to be the prices of some financial asset for ten consecutive days, then its percentage change transformed dataset (rounded to two decimal cases) is as follows:
{ 1.13 , 2.36 , 7.53 , 2.19 , 1.17 , 0.41 , 1.64 , 0.54 , 5.04 } ,
which was obtained by applying the percentage change transformation. So, the standard deviation of this transformed dataset is 3.00 (which also is a percentage), i.e., α = 3.00 . Hence, the classes, for this example, are as follows:
  • s M = { X t : X t 2.5 · α } = { X t : X t 7.5 } ;
  • s m = { X t : 2.5 · α < X t 1.5 · α } = { X t : 7.5 < X t 4.5 } ;
  • s 1 = { X t : 1.5 · α < X t 0.5 · α } = { X t : 4.5 < X t 1.5 } ;
  • s 2 = { X t : 0.5 · α < X t 0.5 · α } = { X t : 1.5 < X t 1.5 } ;
  • s 3 = { X t : 0.5 · α < X t 1.5 · α } = { X t : 1.5 < X t 4.5 } ;
  • s 4 = { X t : 1.5 · α < X t 2.5 · α } = { X t : 4.5 < X t 7.5 } ;
  • s Z = { X t : X t > 2.5 · α } = { X t : X t > 7.5 } .

2.2.1. Defining the Markov Chains

Before formally defining the necessary Markov chains, we need to make some observations about the described classes. According to our assumptions, if the market chooses to play Major Adversity or Zero Adversity, the speculator will have to stop playing (which will result in a major a loss or in a profit, respectively) independently of the speculator’s chosen strategy, but if the market chooses to play Minor Adversity, the speculator only has to stop playing if he/she chose the Less Risk strategy.
Also, with the aid of Table 2 (from Section 2.1), we can see that the results of the market playing the Major Adversity strategy are only noticeable if the speculator chooses to play the More Risk strategy, because if the speculator chooses the Less Risk strategy he/she will stop playing the game immediately after the Less Risk threshold is reached, thus he/she will not know if the price further increased or decreased.
Thus, assuming that the speculator chose the More Risk strategy, we can determine the probability of the market playing the Major Adversity strategy. Also, if we assume that the speculator chose to play the Less Risk strategy, then we can determine the probability of the market playing the Zero Adversity strategy; this is because, in this case, the speculator only has a profit if the market chooses this strategy.
So, for these reasons, we will define two Markov chains, one where we consider that the speculator chose the Less Risk strategy and another where he/she chose to play the More Risk strategy. However, we will always use the same assumptions, strategies’ thresholds and data for both the Markov chains, so that we can utilize the probability matrices from each to estimate the probabilities p 0 , p 1 and p 2 . Also, we will assume that s 2 = { X t : 0.5 · α < X t 0.5 · α } is the initial state for both the Markov chains, because, when the speculator enters for trade of a certain asset, then the asset’s initial percentage price change will be 0 % which is an element of the s 2 class.
Regarding the Markov chain where we assume that the speculator chose to play the More Risk strategy, we have the following observations about its states (or classes):
  • The classes s M , s m , s 1 , , s 4 , s Z will retain the same definitions as before.
  • To represent the fact that the speculator only stops playing if the price enters the Major Adversity class ( s M ) or the Zero Adversity class ( s Z ) in the Markov chain, we must simply define these classes as absorbing states, i.e., if the price enters one of these classes, then it will never exit them (for more details see [32,33] and/or [36]).
  • Since the speculator does not stop playing if the price is in one of the remaining classes, the price may go to any class (including staying in the same class). And, to represent this in terms of Markov chains, we simply define these classes as transient (for more details see [32,33,36] and/or [37]). Also, these states ( s m , s 1 , , s 4 ) communicate between themselves; thus, they form a communicating class in the Markov chain.
In terms of Markov chains, for this Markov chain, we are considering the stochastic process { X t , t = 1 , 2 , , N } , where X t is the percentage price change at game t, with a discrete and finite state space S = { s M , s m , s 1 , , s 4 , s Z } , where for all states S 0 , S 1 , , S t 1 , S i , S j S and steps (or games) t { 1 , , N } the following applies:
P ( X t + 1 = S j | X 1 = S 0 , , X t 1 = S t 1 , X t = S i ) = P ( X t + 1 = S j | X t = S i ) = : p i j t , t + 1 .
Here, the steps of the Markov chain represent each successive game from 1 up until N, and S i represents a state from the state space S = { s M , s m , s Z , s 1 , , s 4 } , which is composed of the classes that we previously defined; thus, they have the mentioned properties. Also, the 7 × 7 transition matrix P M associated with this chain will be defined as follows:
P M = s M   s m   s 1     s 4   s Z   s M s m s 1 s 4 s Z p 11 p 12 p 13 p 16 p 17 p 21 p 22 p 23 p 26 p 27 p 31 p 32 p 33 p 36 p 37 p 61 p 62 p 63 p 66 p 67 p 71 p 72 p 73 p 76 p 77
To visualize this Markov chain, we can use the following diagram Figure 14:
Note that we could have simplified the previous diagram by joining the states s m , s 1 , , s 4 in the same communicating class. However, it is useful for us to present the Markov chain in this manner, because it allows us to make more conclusions on how the chain develops as we move forward in time.
So, assuming that the initial state is s 2 (i.e., assuming that π = ( 0 , 0 , 0 , 1 , 0 , 0 , 0 ) T ) and that the transition matrix P M related to the Markov chain is well defined, the probability of the market playing the Major Adversity strategy ( p 2 ) at time (or game) t is given by the first element of π P M t .
Now, regarding the Markov chain where we assume that the speculator chose to play the Less Risk strategy, we can make similar observations to before, but with some modifications:
  • The Major Adversity class is not necessary for this Markov chain, because the speculator will stop playing if the price reaches the Minor Adversity class. So, the s M class will be “included” in the s m class; thus, s m is altered to s m = { X t : X t 1.5 · α } (considering Example (25), this class becomes s m = { X t : X t 4.5 } ).
  • The classes s Z , s 1 , , s 4 are defined as before.
  • To represent the fact that the speculator stops playing if the price enters the Minor Adversity class ( s m ) or the Zero Adversity class ( s Z ) in the Markov chain, we must simply define these classes as absorbing states, i.e., if the price enters one of these classes, then it will never exit them (for more details see [32,33] and/or [36]).
  • Since the speculator does not stop playing if the price is in one of the remaining classes, the price may go to any class (including staying in the same class). And, to represent this in terms of Markov chains, we simply define these classes as transient (for more details see [32,33,36] and/or [37]).
As before, in terms of Markov chains, we are considering the same stochastic process { X t , t = 1 , 2 , , N } , where X t is the percentage price change in game t, with a discrete and finite state space S = { s m , s Z , s 1 , , s 4 } , where for all states S 0 , S 1 , , S t 1 , S i , S j S and steps (or games) t { 1 , , N } the following applies:
P ( X t + 1 = S j | X 1 = S 0 , , X t 1 = S t 1 , X t = S i ) = P ( X t + 1 = S j | X t = S i ) = : p i j t , t + 1 .
Here, the steps of the Markov chain represent each successive game from 1 up until N, and S i represents a state from the state space S = { s m , s Z , s 1 , , s 4 } , which is composed of the classes that we previously defined; thus, they have the mentioned properties. Also, the 6 × 6 transition matrix P L associated with this chain will be defined as follows:
P L = s M     s 1     s 4   s Z           s M s 1 s 4 s Z p 11 p 12 p 13 p 16 p 16 p 21 p 22 p 23 p 26 p 26 p 51 p 52 p 53 p 56 p 56 p 61 p 62 p 63 p 66 p 66
To visualize this Markov chain, we can use the following diagram Figure 15:
Regarding this diagram, note that it is similar to the previous one (Figure 14); however, in this one, the state s M is included in the state s m . Additionally, we could have simplified the diagram by joining the states s 1 , , s 4 in the same communicating class. But again, it is useful for us to present the Markov chain in this manner, for the same reasons as before.
So, assuming that the initial state is s 2 (i.e., assuming that π = ( 0 , 0 , 1 , 0 , 0 , 0 ) T ) and that the transition matrix P L related to the Markov chain is well defined, the probability of the market playing the Zero Adversity strategy ( p 0 ) at time/game t is given by the last element of π P L t .
With all of this, we have the necessary methods to estimate the probabilities of the market playing Zero Adversity, Minor Adversity and Major Adversity; thus, we also have a method for how to choose the best strategy for a certain dataset. However, the estimation method for the market’s probabilities is not complete, because we still have to estimate the transition probability matrix for each of the defined Markov chains. So, this is what we will focus on until the end of this section. But, before moving further, note the following:
  • We will always use the same (percentage change transformed) dataset for all of the estimations;
  • Since the s Z state is absorbing in both of the chains, we do not need to estimate its transition probabilities, i.e., the last row of both the transition matrices ((27) and (28)) is of the form ( 0 , , 0 , 1 ) ;
  • The state s M in the Markov chain related to the More Risk strategy, like the s Z state, is absorbing; thus, the first row of transition matrix (27) is of the form ( 1 , 0 , , 0 ) ;
  • The state s m in the Markov chain related to the Less Risk strategy, like the s Z state, is absorbing; thus, the first row of transition matrix (28) is of the form ( 1 , 0 , , 0 ) .

2.2.2. Estimation of the Transition Probabilities

To estimate the transition probabilities for each of the Markov chains, let us start by considering the one where we assume that the speculator chose to play the More Risk strategy, represented by the following transition matrix (similar to the previously presented matrix (27)):
P M = s M   s m   s 1     s 4   s Z   s M s m s 1 s 4 s Z 1 0 0 0 0 p 21 p 22 p 23 p 26 p 27 p 31 p 32 p 33 p 36 p 37 p 61 p 62 p 63 p 66 p 67 0 0 0 0 1 .
Now, let us consider that we are departing from state s 2 = { X t : 0.5 · α < X t 0.5 · α } (the assumed initial state of the chain); so, to estimate the transition probabilities { p 41 , p 42 , p 43 , , p 47 } , we will simply determine the relative frequency of each of the states using the dataset, and we will use these frequencies on the corresponding row of the transition matrix.
Utilizing Example (25), the relative frequencies for the transformed dataset for these classes are as follows in the Table 4:
And, replacing in the transition matrix (related to Example (25)’s Markov chain), we obtain the following:
P M = s M     s m     s 1     s 2     s 3     s 4     s Z     s M s m s 1 s 2 s 3 s 4 s Z 1 0 0 0 0 0 0 p 21 p 22 p 23 p 24 p 25 p 26 p 27 p 31 p 32 p 33 p 34 p 35 p 36 p 37 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 p 51 p 52 p 53 p 54 p 55 p 56 p 57 p 61 p 62 p 63 p 64 p 65 p 66 p 67 0 0 0 0 0 0 1 .
As it was previously observed, the probabilities of transitioning from state s 2 (to any other state) are not the same as if we considered that we started from a different state. Thus, in order to take this into account and to still use the relative frequency “method” to estimate the transition probabilities, we need to slightly alter the classes from which we will determine the relative frequencies.
For example, consider the classes obtained from Example (25); if the price increases 3 % (of its initial price) at the first iteration of the chain, i.e., the price goes from 100 % to 103 % of its (initial) value (which translates to a ( ( 103 100 ) / 100 ) × 100 = 3 % percentage change in price), then the chain moves from state s 2 to the state s 3 . However, if the price is now at state s 3 and it further increases 3 % (comparing to the initial price), the chain will not move from the s 3 state to the s 4 state, because, in this case, the price goes from 103 % to 106 % of its (initial) value, so the percentage change in price is ( ( 106 103 ) / 103 ) × 100 2.91 % , which is not a member of the s 4 state; thus, the chain will remain in the s 3 state. So, the transition from the s 3 state to all of the other states is not the same (in terms of percentage change) as the transition from s 2 to all of the other states. And a similar argument can be made if we consider that we start from any state different from s 2 .
With this in mind, if we want to use the relative frequencies of the dataset to estimate the transitions from any state to any other, then we need to “re-calculate” the classes in order for the estimation to be coherent with what we assumed and defined. So, to accomplish this, we need to consider the percentage change in price regarding the previous iteration of the chain, and not the percentage change regarding the initial price.
Again, for example, to estimate the transition from the s 3 state to the s 4 state, we need to assume that the initial state is the s 3 state and that we want to transition to the s 4 state, i.e., we need to assume the percentage price change (relative to the s 2 ) is at 103 % and that we want to know what the percentage price change is if the percentage price change transitioned to 106 % (relative to the s 2 ), which would be ( ( 106 103 ) / 103 ) × 100 2.91 % . Also, because we are dealing with classes, this obtained percentage change between classes will be used as the “new” α to determine the limits (and ranges) of the classes; this is because s 3 and s 4 are consecutive classes in terms of their range of values (as s 2 and s 3 were in the base classes). Thus, in this case, the s 4 state (or class) becomes s 4 = { X t : 1.46 < X t 4.37 } . So, we need to use these “re-calculated” classes to obtain the relative frequency table, which will be the estimation for the transition probabilities if we consider that we started from state s 3 .
To generally define the classes which we will use in the relative frequency table, we need to consider the direct correspondence f : { s m , s 1 , s 2 , s 3 , s 4 } { 2 , 1 , 0 , 1 , 2 } defined as follows:
f ( s m ) = 2 f ( s 1 ) = 1 f ( s 2 ) = 0 f ( s 3 ) = 1 f ( s 4 ) = 2
So, the “altered” classes (or states) obtained considering that we started from state s { s m , s 1 , s 2 , s 3 , s 4 } are as follows:
s M = { X t : X t ( 2.5 + f ( s ) ) · α } ;
s m = { X t : ( 2.5 + f ( s ) ) · α < X t ( 1.5 + f ( s ) ) · α } ;
s 1 = { X t : ( 1.5 + f ( s ) ) · α < X t ( 0.5 + f ( s ) ) · α } ;
s 2 = { X t : ( 0.5 + f ( s ) ) · α < X t ( 0.5 + f ( s ) ) · α } ;
s 3 = { X t : ( 0.5 + f ( s ) ) · α < X t ( 1.5 + f ( s ) ) · α } ;
s 4 = { X t : ( 1.5 + f ( s ) ) · α < X t ( 2.5 + f ( s ) ) · α } ;
s Z = { X t : X t > ( 2.5 + f ( s ) ) · α } .
Note that the value of α used in the equations of the new classes also needs to be re-calculated, which we will see how to do after determining the “re-calculated” classes for Example (25) considering that we started from the s 3 state with α = 2.91 , which are as follows:
  • s M = { X t : X t 10.185 } ;
  • s m = { X t : 10.185 < X t 7.275 } ;
  • s 1 = { X t : 7.275 < X t 4.365 } ;
  • s 2 = { X t : 4.365 < X t 1.455 } ;
  • s 3 = { X t : 1.455 < X t 1.455 } ;
  • s 4 = { X t : 1.455 < X t 4.365 } ;
  • s Z = { X t : X t > 4.365 } .
Utilizing the dataset from Example (25), we have the following relative frequency Table 5 for these classes:
Replacing in the transition matrix (30) (related to Example (25)’s Markov chain), we obtain the following:
P M = s M     s m     s 1     s 2     s 3     s 4     s Z     s M s m s 1 s 2 s 3 s 4 s Z 1 0 0 0 0 0 0 p 21 p 22 p 23 p 24 p 25 p 26 p 27 p 31 p 32 p 33 p 34 p 35 p 36 p 37 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 0 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 p 61 p 62 p 63 p 64 p 65 p 66 p 67 0 0 0 0 0 0 1 .
Now, for the general case, consider that we want to determine the relative frequencies assuming that we are departing from the s i { s m , s 1 , , s 4 } state; then, we need to determine the range of each class, i.e., we need to determine the α that we will use in the previously presented Formulas (31)–(37). For this, we need to consider s i ’s consecutive class, which is the class that contains the values immediately before the lower limit of s i or after the upper limit of s i , and we will denote it as s j . Also, it is not relevant which of the two that we choose. For instance, if s i = s m , then its consecutive classes are s M and s 1 , so s j can be either s M or s m ; likewise, the (only) consecutive class of s i = s M is s j = s m . Thus, after obtaining the consecutive class, consider m i and m j to be the midpoints of s i and s j , respectively. But, if s j is s M or s Z , m j will be m i + ( i n f ( s i ) s u p ( s i ) ) or m i + ( s u p ( s i ) i n f ( s i ) ) , respectively.
So, the α value is obtained by the following:
α = m j m i m i + 100 100 .
Remark 12.
Note that we did not include s M and s Z into the set of possible states that s i can be; this is because the probabilities of departing from these states are fixed, as we saw when we built the transition matrix (29). Also, in the calculation of the α, we need to consider the absolute value, in case s j is related to lower limit of s i .
Afterwards, we simply have to determine the classes by replacing the obtained α in all of Equations (31)–(37), which we will use to calculate the relative frequency table of the (same transformed) dataset. Finally, we simply replace the obtained relative frequencies in the row of the transition matrix related to the s i state (or class).
Applying all of this to example (25), we obtain the following transition matrix:
P M = s M     s m     s 1     s 2       s 3     s 4     s Z s M s m s 1 s 2 s 3 s 4 s Z 1 0 0 0 0 0 0 4 / 9 4 / 9 1 / 9 0 0 0 0 2 / 9 2 / 9 4 / 9 1 / 9 0 0 0 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 0 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 0 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 0 0 0 0 1 .
All the presented estimators and examples are related to the Markov chain where we assume that the speculator chose to play the More Risk strategy. So, we estimate the transition probabilities for the Markov chain where we assume that the speculator chose to play the Less Risk strategy, which is represented by the following transition matrix (similar to the previously presented matrix (28)):
P L = s m   s 1     s 4   s Z       s m s 1 s 4 s Z 1 0 0 0 0 p 21 p 22 p 23 p 25 p 26 p 51 p 52 p 53 p 55 p 56 0 0 0 0 1 .
And, like in the P M case, we will determine the relative frequency tables considering that the chain started from each of the states s 1 , , s 4 . So, again assume that we are departing from the s i { s 1 , , s 4 } state; then, we need to determine the range of each class, i.e., we need to determine the α that we will use in formulas similar to the previously presented ones ((31)–(37)). So, as before, consider a consecutive class to s i , denoted as s j . For instance, if s i = s 1 , then its consecutive classes are s m and s 2 , so s j can be either s m or s 2 ; likewise, the (only) consecutive class of s i = s m is s j = s 1 . After obtaining the consecutive class, consider m i and m j to be the midpoints of s i and s j , respectively. But, if s j is s m or s Z , m j will be m i + ( i n f ( s i ) s u p ( s i ) ) or m i + ( s u p ( s i ) i n f ( s i ) ) , respectively.
So, the α value is obtained by the following:
α = m j m i m i + 100 100 .
Remark 13.
Note that the equation to obtain α in the P L case is the same as Equation (39). Also, we did not include s m and s Z into the set of possible states that s i can be; this is because the probabilities of departing from these states are fixed, as we observed when we built the transition matrix (28).
As in the P M case, the transition probabilities are not the same as if we considered that the chain started from different states. Thus, in order to take this into account and to still use the relative frequency “method” to estimate the transition probabilities, we need to slightly alter the classes from which we will determine the relative frequencies. So, again consider the direct correspondence f : { s 1 , , s 4 } { 2 , 1 , 0 , 1 , 2 } defined as follows:
f ( s 1 ) = 1 f ( s 2 ) = 0 f ( s 3 ) = 1 f ( s 4 ) = 2
So, the “altered” classes (or states) for the P L matrix considering that we started from a state s { s 1 , , s 4 } are as follows:
s m = { X t : X t ( 1.5 + f ( s ) ) · α } ;
s 1 = { X t : ( 1.5 + f ( s ) ) · α < X t ( 0.5 + f ( s ) ) · α } ;
s 2 = { X t : ( 0.5 + f ( s ) ) · α < X t ( 0.5 + f ( s ) ) · α } ;
s 3 = { X t : ( 0.5 + f ( s ) ) · α < X t ( 1.5 + f ( s ) ) · α } ;
s 4 = { X t : ( 1.5 + f ( s ) ) · α < X t ( 2.5 + f ( s ) ) · α } .
s Z = { X t : X t > ( 2.5 + f ( s ) ) · α } .
Now, we will estimate the P L matrix for the same dataset
{ 45.00 , 44.49 , 43.44 , 40.17 , 41.05 , 41.53 , 41.36 , 40.68 , 40.46 , 38.42 }
from Example (25), which results in the transformed dataset
{ 1.13 , 2.36 , 7.53 , 2.19 , 1.17 , 0.41 , 1.64 , 0.54 , 5.04 } .
Considering that we started from the s 3 state (with the consecutive state s 4 ), i.e., considering that
α = m j m i m i + 100 100 = 6 3 3 + 100 100 2.91 .
We obtain the classes
  • s m = { X t : X t 7.275 } ;
  • s 1 = { X t : 7.275 < X t 4.365 } ;
  • s 2 = { X t : 4.365 < X t 1.455 } ;
  • s 3 = { X t : 1.455 < X t 1.455 } ;
  • s 4 = { X t : 1.455 < X t 4.365 } ;
  • s Z = { X t : X t > 4.365 } .
And, by replacing the relative frequencies, P L is as follows:
P L = s m     s 1     s 2     s 3     s 4     s Z     s m s 1 s 2 s 3 s 4 s Z 1 0 0 0 0 0 4 / 9 4 / 9 1 / 9 0 0 0 2 / 9 2 / 9 4 / 9 1 / 9 0 0 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 0 0 0 1 .

2.2.3. Estimating the Market’s Probabilities

Now, we have everything that we need to estimate the probabilities of the market playing Zero Adversity ( p 0 ), Minor Adversity ( p 1 ) and Major Adversity ( p 2 ). And, to accomplish this, we will use two Markov chains to estimate p 2 and p 0 , as it was previously explained.
To estimate p 2 we will make the use of the Markov chain where we assume that the speculator chose to play the More Risk strategy, which is represented by the following transition matrix (29):
P M = s M   s m   s 1     s Z   s M s m s 1 s 4 s Z 1 0 0 0 p 21 p 22 p 23 p 27 p 31 p 32 p 33 p 37 p 61 p 62 p 63 p 67 0 0 0 1 .
Also, as before, we will assume that the initial state of the chain is s 2 , i.e., the probability distribution of X 0 (the first percentage price change of the chain) is given by π 0 M = ( 0 , 0 , 0 , 1 , 0 , 0 , 0 ) T .
Since we want to predict what will happen to an asset’s price after we buy it, that is, we want to know if we will have a profit or a loss (according to the financial game that we established) after we enter a trade, it is sensible to consider what will happen immediately after we buy the asset and/or what the asset’s price is tending to. So, to this end, we will consider two separate estimators and analyze the obtained results. Thus, p 2 will be estimated by the following:
  • The probability of the chain reaching the s M state after one iteration;
  • The long-run probability of the chain being at state s M .
Regarding the first estimator, we will simply compute the probability of the chain being at state s M after one iteration of the chain, so we will compute the following:
π 1 M = π 0 M P M = 0 0 0 1 0 0 0 1 0 0 0 0 0 0 p 21 p 22 p 23 p 24 p 25 p 26 p 27 p 31 p 32 p 33 p 34 p 35 p 36 p 37 p 41 p 42 p 43 p 44 p 45 p 46 p 47 p 51 p 52 p 53 p 54 p 55 p 56 p 57 p 61 p 62 p 63 p 64 p 65 p 66 p 67 0 0 0 0 0 0 1 =   s M     s m     s 1     s 2     s 3     s 4     s Z     p 41 p 42 p 43 p 44 p 45 p 46 p 47 .
where, after the matrix multiplication, we obtain a 1 × 7 vector π 1 M , which is the probability distribution of the chain after one iteration. Here, note that π 1 M is simply the transition probabilities starting from the s 2 state, which makes sense considering that the initial state is s 2 and we only want to know the probability distribution after one iteration of the chain. Thus, the first entry of π 1 M is the probability of the chain being in state s M after one iteration and our estimator for p 2 is p 2 p 41 .
As we can see, this estimator is fairly simple, both in theoretical and in practical terms. So, to try to understand how the percentage price will evolve, we will also consider an estimator related to the long-term distribution of the chain. However, we need to note that this probability distribution may not exist, because our chain is not irreducible. So, we cannot use Theorem II.C.3 from [33] to guarantee that such a distribution exists. Also, if such a distribution does exist, we know (from [32,36]) that the chain will tend to its absorbing states; thus, in our case, the long-run probability distribution would be a 1 × 7 vector π where one of the absorbing states ( s M or s Z ) has a probability of one. But, we do not know when this will happen or which state will have a probability of one. Hence, to overcome these issues, we will compute the probability distribution of the chain after  n < iterations:
π n M = π 0 M P M n = 0 0 0 1 0 0 0 1 0 0 0 0 0 0 p 21 p 22 p 23 p 24 p 25 p 26 p 27 p 31 p 32 p 33 p 34 p 35 p 36 p 37 p 41 p 42 p 43 p 44 p 45 p 46 p 47 p 51 p 52 p 53 p 54 p 55 p 56 p 57 p 61 p 62 p 63 p 64 p 65 p 66 p 67 0 0 0 0 0 0 1 n
= s M     s m     s 1     s 2     s 3     s 4     s Z     π n 1 π n 2 π n 3 π n 4 π n 5 π n 6 π n 7 .
Thus, after the matrix multiplication, we obtain a 1 × 7 vector π n M , and its first entry is the probability of the chain being in state s M after n iterations, so our estimator for p 2 is p 2 π n 1 .
Observe that we cannot apply Theorem II.C.3 from [33] to determine the long-run probability distribution π of the chain, because it is not irreducible. So, we do need to compute the n matrix multiplications.
Now, similarly to the estimator of p 2 , we will estimate p 0 using the Markov chain where we assumed that the speculator chose to play the Less Risk strategy, which is represented by the following transition matrix (41):
P L = s m   s 1     s 4   s Z   s m s 1 s 4 s Z 1 0 0 0 p 21 p 22 p 23 p 27 p 51 p 52 p 53 p 57 0 0 0 1 .
As before, we will assume that the initial state of the chain is s 2 , i.e., we will assume that π 0 L = ( 0 , 0 , 1 , 0 , 0 , 0 ) T . So, for the same reasons as before, p 0 will be estimated by the following:
  • The probability of the chain reaching the s Z state after one iteration;
  • The long-run probability of the chain being at state s Z .
Regarding the first estimator, we will simply compute the probability of the chain being at state s Z after one iteration of the chain, i.e., we will compute the following:
π 1 L = π 0 L P L = 0 0 1 0 0 0 1 0 0 0 0 0 p 21 p 22 p 23 p 24 p 25 p 26 p 31 p 32 p 33 p 34 p 35 p 36 p 41 p 42 p 43 p 44 p 45 p 46 p 51 p 52 p 53 p 54 p 55 p 56 0 0 0 0 0 1 = s m   s 1   s 2   s 3   s 4   s Z   p 41 p 42 p 43 p 44 p 45 p 46 .
where, after the matrix multiplication, we obtain a 1 × 6 vector π 1 L . And, again, note that π 1 is simply the transition probabilities starting from the s 2 state. Also, the last entry of π 1 L is the probability of the chain being in state s Z after one iteration, so our estimator for p 0 is p 0 p 46 .
As before, this estimator is fairly simple and, because this chain is also not irreducible, we will compute the probability distribution ( π n L ) of the chain again after n < iterations:
π n L = π 0 L P L n = 0 0 1 0 0 0 1 0 0 0 0 0 p 21 p 22 p 23 p 24 p 25 p 26 p 31 p 32 p 33 p 34 p 35 p 36 p 41 p 42 p 43 p 44 p 45 p 46 p 51 p 52 p 53 p 54 p 55 p 56 0 0 0 0 0 1 n = s m   s 1   s 2   s 3   s 4   s Z   p n 1 p n 2 p n 3 p n 4 p n 5 p n 6 ,
which, after the matrix multiplication, yields a 1 × 6 vector π n . And its last entry is the probability of the chain being in state s Z after n iterations, so our estimator for p 0 is p 0 p n 6 .
Observe that we have the same issues in both estimators, because the chains are not irreducible; also, we use the same number of iterations n (to determine the long-run estimator) in both chains, so that we can compare the obtained results from the different chains. Finally, we need to note that these estimators (for p 0 and p 2 ) sum up to a value 1 , because, from Section 2.2, the theoretical probabilities that we are estimating have this property, and from the fact that we are under-estimating the market’s probabilities, since theoretically we should determine the long-run estimator by using infinite iterations (and not only n).
Remark 14.
Even though the notations used for both estimators are similar, the obtained estimated probabilities result from (n iterations of) different chains, so they represent different probabilities. Additionally, the estimator for p 1 is simply p 1 = 1 p 0 p 2 , for both cases.
So, with all of this, we can estimate the probabilities of the market playing a certain strategy and thus choose the speculator’s optimal strategy according to the previously presented financial game.
To finalize this section, we will simply pick up the dataset from Example (25) (from the previous section) and compute the estimators for the market’s probabilities. For this, recall that the obtained transition matrix related to the chain where we assumed the More Risk strategy is as follows:
P M = s M     s m     s 1     s 2     s 3     s 4     s Z     s M s m s 1 s 2 s 3 s 4 s Z 1 0 0 0 0 0 0 4 / 9 4 / 9 1 / 9 0 0 0 0 2 / 9 2 / 9 4 / 9 1 / 9 0 0 0 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 0 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 0 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 0 0 0 0 1 .
The obtained transition matrix related to the chain where we assumed the Less Risk strategy is as follows:
P L =   s m     s 1     s 2     s 3     s 4     s Z   s m s 1 s 2 s 3 s 4 s Z 1 0 0 0 0 0 4 / 9 4 / 9 1 / 9 0 0 0 2 / 9 2 / 9 4 / 9 1 / 9 0 0 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 0 0 0 1 .
So, assuming π 0 M = ( 0 , 0 , 0 , 1 , 0 , 0 , 0 ) T , we have the following:
π 1 M = π 0 M P M = 0 0 0 1 0 0 0 1 0 0 0 0 0 0 4 / 9 4 / 9 1 / 9 0 0 0 0 2 / 9 2 / 9 4 / 9 1 / 9 0 0 0 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 0 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 0 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 0 0 0 0 1 =   s M     s m     s 1     s 2     s 3     s 4 s Z     1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 .
And, with π 0 M = ( 0 , 0 , 0 , 1 , 0 , 0 , 0 ) T , we have the following:
π 1 L = π 0 L P L = 0 0 1 0 0 0 1 0 0 0 0 0 4 / 9 4 / 9 1 / 9 0 0 0 2 / 9 2 / 9 4 / 9 1 / 9 0 0 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 0 0 0 1 =     s m     s 1     s 2     s 3     s 4 s Z     2 / 9 2 / 9 4 / 9 1 / 9 0 0 .
So, the one-iteration estimators for the market’s probabilities, for this example, are as follows:
p 0 = 0 p 1 = 8 / 9 0.89 p 2 = 1 / 9 0.11
Regarding the long-run estimator with n = 10 iterations, we have the following:
π n M = π 0 M P M n = 0 0 0 1 0 0 0 1 0 0 0 0 0 0 4 / 9 4 / 9 1 / 9 0 0 0 0 2 / 9 2 / 9 4 / 9 1 / 9 0 0 0 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 0 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 0 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 0 0 0 0 1 n = s M     s m         s 1     s 2     s 3     s 4     s Z 0.9 0.03 0.03 0.02 0.01 0.01
π n L = π 0 L P L n = 0 0 1 0 0 0 1 0 0 0 0 0 4 / 9 4 / 9 1 / 9 0 0 0 2 / 9 2 / 9 4 / 9 1 / 9 0 0 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 1 / 9 1 / 9 2 / 9 4 / 9 1 / 9 0 0 0 0 0 1 n = s m     s 1         s 2     s 3     s 4     s Z 0.95 0.02 0.01 0.01 0.01
Remark 15.
Note that the presented values are rounded with two decimal cases.
So, the long-run estimators for the market’s probabilities, for this example, are as follows:
p 0 = 0.01 p 1 = 0.09 p 2 = 0.9
Note that the estimated probabilities, in this example, change drastically from one estimator to the other; also, they suggest that the market (as the iterations of the chain increase) is increasing its probability of choosing the Major Adversity strategy.
To finalize, the previously presented Table 2 related to the financial game, for this example, becomes the following Table 6:
These payoffs (or strategy thresholds) were obtained by applying the theory in Section 2.1 and considering the standard deviation of the transformed dataset (i.e., considering α = 3 ), where we obtained w = 9 , x = 6 and y = 9 .
Now, with the one-iteration estimators and considering the probability triangle (also presented in Section 2.1, but considering these new values), for this case, the speculator should choose to play the More Risk strategy, because
p 2 = 0.11 < w w + y = 0.5 and p 1 p 2 8.09 > y x w + x = 0.2 .
And, considering the long-run estimator and the same probability triangle, the speculator should choose not to play, because
p 1 + p 2 = 0.99 > = w w + y = 0.5 and p 2 = 0.9 > w w + y = 0.5 .
Thus, as we can see the two estimators yield different strategies for the speculator to choose. All of this because the market “changes” its behavior as the iterations increase.

2.3. The SARIMA and GARCH Models

Now that we have discussed the specific game theoretical and Markov chain models that we will use, it is time to describe how we will use the SARIMA and GARCH models to predict the market’s behavior, and then compare the accuracy of the three approaches.
However, we need to note that we use Markov chains as an auxiliary model to determine the probabilities for the game’s strategies, so we will also consider the SARIMA and GARCH models as auxiliary to the base game model. Moreover, we cannot simply apply the time series models to the raw dataset and make a prediction for the future value of the time series, because, in order to make the comparison of the models possible, we need to apply all the models to the same dataset and try to predict the same objects, which in our case means predicting the strategies that the market will choose. All of this is because we cannot directly compare traditional econometrics models, because these models are deterministic and our model is probabilistic.
Thus, we will apply the time series models to the same percentage change transformed datasets that we have been using on the previous sections. So, if we make predictions based on these models, we obtain percentage change transformed predictions of the asset’s price (which is useful, but it is not our ultimate goal).
To obtain a prediction of the market’s strategy, firstly, we will estimate the optimal time series models for the dataset. Then, using these estimated models, we will perform K simulations each with N observations, thus obtaining K simulations of percentage change prices for each of the models, each one starting on the last observation of the transformed dataset.
Remark 16.
All of this will be performed with the aid of R software, which we will elaborate on further in Section 2.4.
Now, as in the previous sections, consider the speculator’s More Risk strategy thresholds in terms of the dataset’s standard deviation α :
  • The profit objective threshold: s P 3 · α ;
  • The More Risk threshold: s R 3 · α .
Finally, for each of the K simulations, we need to check which of the thresholds was reached first, because the speculator will exit the trade (or the game) when one of these is reached. And, with this, we obtain the absolute frequencies of each of the thresholds, and also their relative frequencies if we divide by K.
Remark 17.
Note that, as we are performing simulations involving a model which includes a probability distribution, if we ran the same code several times, we would obtain different results after each run. However, these results will not have major differences between them.
Hence, we will estimate the probability of the market playing the Major Adversity strategy ( p 2 ) with the relative frequency related to the More Risk threshold, and similarly the probability of the market playing the Zero Adversity strategy ( p 0 ) with the relative frequency related to the Profit Objective threshold. Also, by default, the estimation for the probability of the market playing the Minor Adversity strategy ( p 1 ) is simply 1 p 2 p 0 . Additionally, since we have the market’s probabilities, we can choose the speculator’s optimal strategy according to the probability triangle presented in Section 2.1.2. But, before moving on, note that we need to determine these probabilities for both the SARIMA and the GARCH models, so we need to make an estimation for each of these models (but always using the same dataset), i.e., we need to perform K simulations for each model estimation and then determine the probabilities for each set of estimations. So, we will obtain two optimal strategies, one for each of the models.
Thus, for all the models presented so far (specifically, Markov chain, SARIMA and GARCH), the speculator will obtain an optimal strategy for each of them, which is performed by estimating the market’s probabilities (which may differ for each model) and then we will apply the same probability triangle for each set of probabilities.

2.4. Procedures

Now that we have all the necessary models and estimators, it is time to describe how we will use each model to choose the optimal strategy for a certain dataset. Also, we need to explain how we will check whether the predictions were accurate and how accurate.
Consider an abstract dataset composed of strictly positive values, which will represent the price of a certain financial asset for n + 1 consecutive iterations (it can be n + 1 consecutive minutes, days, …). Since we worked with percentage change data in the game theoretical model, we will apply the percentage change transformation to the dataset, obtaining a transformed dataset C = { c 1 , , c n } composed of percentage changes in n + 1 consecutive iterations. So, we will apply all of our models to this dataset C. Also, in order to check the accuracy of our models, we will split the dataset into training ( C 1 ) and test ( C 2 ) sets, where the training set will be composed of the first 80 % of the observations and the remaining will belong to the test set. Thus, considering the set C = { c 1 , , c n } , the training set will be C 1 = { c 1 , , c k } and the test set C 2 = { c k + 1 , , c n } , for k < n .
The general procedure, applied to a (transformed and divided) dataset C, consists of estimating the market’s probabilities for each of the models (Markov chains, SARIMA and GARCH), thus obtaining three “pairs” of probabilities; then, we will use them to determine the speculator’s optimal strategy, also obtaining three optimal strategies. Afterwards, we will use the test set to check whether the obtained strategies were accurate predictions for the current training set.
To accomplish this, consider the speculator’s More Risk strategy thresholds (as we did in the previous section) in terms of the dataset’s standard deviation α :
  • The profit objective threshold: s P = 3 α ;
  • The More Risk threshold: s R = 3 α .
Then, using the test set, we will check which of the thresholds was reached first. So, this information, together with the chosen optimal strategies, gives us the accuracy of the predictions; specifically,
  • Considering that the optimal chosen strategy is the More Risk strategy, we will consider that strategy to be accurate if the first threshold to be reached in the test set is the profit objective threshold; otherwise, the strategy will be considered to be not accurate;
  • Considering that the optimal chosen strategy is the Less Risk strategy, we will consider that strategy to be accurate if the first threshold to be reached in the test set is the profit objective threshold; otherwise, the strategy will be considered to be not accurate;
  • Considering that the optimal chosen strategy is the Do Not Play strategy, we will consider that strategy to be accurate if the first threshold to be reached in the test set is the More Risk threshold; otherwise, the strategy will be considered to be not accurate.
Note that the Less Risk threshold is not necessary to determine the accuracy of the strategies. Also, due the nature of the data, it may be that none of the thresholds is reached; so, in this case, we will not consider the strategy to be accurate or inaccurate. Hence, in this situation, we can decrease the thresholds and re-calculate the optimal strategies, or we can simply consider that the accuracy cannot be determined due to the nature of the data.
Finally, in order to have more samples to analyze, we will increase the training set by one observation and decrease the test set by one observation, thus obtaining the sets C 1 = { c 1 , , c k , c k + 1 } and C 2 = { c k + 2 , , c n } . Then, we will repeat what we described before, but considering these new sets as the training and test sets, respectively. Thus, we will obtain new accuracy data for the new optimal strategies.
To summarize, consider the transformed dataset C = { c 1 , , c n } split between a training set C 1 = { c 1 , , c k } and a test set C 2 = { c k + 1 , , c n } ; then, the procedure to be applied is as follows:
  • Considering the training set C 1 ,
    • Estimate the market’s probabilities using the Markov chain model and determine the optimal strategy for the speculator using the game theoretical model;
    • Estimate the optimal SARIMA model, estimate the market’s probabilities using the model’s simulations and determine the optimal strategy for the speculator using the game theoretical model;
    • Estimate the optimal GARCH model, estimate the market’s probabilities using the model’s simulations and determine the optimal strategy for the speculator using the game theoretical model.
  • Considering the test set C 2 ,
    • Check the accuracy of the three obtained optimal strategies, using the previously described method;
    • Store the accuracy results for each of the models.
  • Increase the training set C 1 by one observation and shorten the test set C 2 also by one observation; thus, we will now consider the training set to be C 1 = { c 1 , , c k , c k + 1 } and the test set to be C 2 = { c k + 2 , , c n } .
  • Perform all of the previous steps considering the “new” training and test sets, but end the procedure when the test set only has one observation remaining.
After applying this procedure, we need to analyze the obtained results, which we will carry out next.

3. Results

Now, we can put what was presented into practice with some real-time data from the financial markets, compare the models’ accuracy results and thus derive some conclusions from them.
Firstly, we will make our analysis for some controlled datasets, with the objective of checking how the models perform in “well-behaved” scenarios, and then move on to datasets with daily and intraday data. But, before moving further, let us recall that a model is said to be accurate if the speculator’s obtained optimal strategies were the correct ones (when compared to the test set) after the procedure described in Section 2.4 (from Section 2) ended. Likewise, the model is said to be inaccurate if the speculator’s obtained optimal strategies were incorrect ones (when comparing to the test set) after the same procedure ended. However, if a model’s accuracy could not be determined (at a certain time) then it is said to have null accuracy. Additionally, we will also present (and analyze) the following characteristics obtained from applying the described procedures:
  • The percentage of times that the several models obtain the same strategies. This is performed in order to check how often different approaches will lead to the same optimal strategies. Also, we will present these results regarding pairs of models; for instance, we will present the percentage of times that the Markov chains and the SARIMA models obtained the same strategies.
  • The average time (in the same units as the corresponding dataset) that it takes for the trade to close (in the test set), after a strategy is given. This average time is obtained by determining the number of necessary iterations for the several test sets to reach one of the speculator’s thresholds.
  • The percentages of the speculator’s obtained strategies that are “Play Less Risk”, “Play More Risk” and/or “Do Not Play”.
  • In order to show the potential of investing, we use the obtained strategies and enter a fictional market with an initial monetary value of USD 10,000, where we only buy one item of each financial asset. This is performed in order to see the profit that we would obtain if we entered a financial market and used the speculator’s obtained strategies (for each of the models) to enter (and then exit) a trade. We will not consider the barrier options strategy presented in Section 2.1.3 because our objective is to evaluate the accuracy of the model in a statistical way by considering the value of a portfolio with USD 10,000 of simple financial assets.
We will not use different performance metrics to compare the stocks’ predicted values against the actual values since our objective is to prioritize metrics directly related to profitability and trading success, rather than general statistical forecasting accuracy. Other metrics are valuable for evaluating how close predictions are to actual values, but they do not always translate directly to trading profits.
To facilitate the presentation, we will round all of the results up to two decimal cases, but, if needed to, we will display some results in scientific notation. Thus, the values that will be presented are approximations of the actual results.
Remark 18.
In order to make the text shorter, we will refer to the Markov chain model considering the one-iteration estimator as the MC1 model, and to the Markov chain model considering the long-run estimator as the MCn model.
Finally, the following sections will be structured in the same manner, that is, a brief explanation of the dataset(s), followed by the presentation of each model’s obtained accuracy results (and related conclusions), ending with the analysis of some characteristics resultant from the models’ appliance.

3.1. Controlled Datasets

Since the models tend to behave differently due to extreme events, we created controlled datasets which represent extreme behaviors. Thus, for this section, we will start by explaining how we constructed each dataset and make an overall analysis of the obtained results.
The first dataset was constructed with the purpose of checking how the models perform in a “mild” Major Adversity scenario, i.e., the price of the asset will not always be decreasing but its trend will. And, to obtain such a dataset, we followed the presented steps until we obtained 1000 observations:
  • Define the first value of the dataset as 1000;
  • The second value of the dataset is simply an increase of 3 % of the previous one;
  • The third value of the dataset is a decrease of 9 % of the previous one;
  • The even observations are obtained with an increase of 3 % of the previous value;
  • The odd observations are obtained with a decrease of 9 % of the previous value.
We constructed the dataset in this manner in order to mimic an event of Major Adversity, so, for the models to “perform well” in this dataset, the speculator’s obtained optimal strategy must always be “Do Not Play”, because the market, ultimately, is choosing to decrease the asset’s price in the long-run.
The second dataset was constructed with the purpose of checking how the models perform in an “extreme” Major Adversity scenario, i.e., the price of the asset will always be decreasing. To obtain such a dataset, we simply defined it as 1000 observations starting from 1000, always decreasing by 3 % of the previous value and adding a random value from a standard normal distribution. We constructed the dataset in this manner in order to mimic an extreme event of Major Adversity. So, for the models to “perform well” in this dataset, the speculator’s obtained optimal strategy must always be “Do Not Play”, because the market will always choose the Major Adversity strategy.
The third dataset was constructed with the purpose of checking how the models perform in a “mild” Zero Adversity scenario, i.e., the price of the asset will not always be increasing but its trend will. And, to obtain such a dataset, we followed the presented steps until we obtained 1000 observations:
  • Define the first value of the dataset as 1000;
  • The second value of the dataset is simply a decrease of 3 % of the previous one;
  • The third value of the dataset is an increase of 9 % of the previous one;
  • The even observations are obtained with a decrease of 3 % of the previous value;
  • The odd observations are obtained with an increase of 9 % of the previous value.
We constructed the dataset in this manner in order to mimic an event of Zero Adversity, so, for the models to “perform well” in this dataset, the speculator’s obtained optimal strategy must either be “Play Less Risk” or “Play More Risk”, because the market, ultimately, is choosing to increase the asset’s price in the long run.
The last dataset was constructed with the purpose of checking how the models perform in an “extreme” Zero Adversity scenario, i.e., the price of the asset will always be increasing. To obtain such a dataset, we simply defined it as 1000 observations starting from 1000, always increasing by 3 % of the previous value and adding a random value from a standard normal distribution. We constructed the dataset in this manner in order to mimic an extreme event of Zero Adversity. So, for the models to “perform well” in this dataset, the speculator’s obtained optimal strategy must always be “Play Less Risk” (or even “Play More Risk”), because the market will always choose the Zero Adversity strategy.
Now that we have explained how each dataset was constructed, we will make a global analysis of the obtained results for the controlled datasets (considering that 20 % of the data belongs to the test set), obtaining the following:
  • The highest standard deviation of the transformed datasets was α 3 (obtained in Datasets 1 and 3) and the lowest was α 0 (in Dataset 2).
  • The MC1 model was 75 % more accurate than the other models, i.e., on three datasets this model had accuracy results higher than (or equal to) all the other models. Also, the highest accuracy result was 100 % (obtained in Datasets 2 and 4), while the lowest was 0 % (on Dataset 1).
  • The MCn, SARIMA and GARCH models were 100 % more accurate than the other models. Additionally, the highest accuracy result was 100 % (obtained in Datasets 2 and 4), while the lowest was 98.5 % (on Dataset 3).
From these results, we can see that the MCn, SARIMA and GARCH models are the models with the best accuracy results, which means that, if the speculator used these models (for these datasets), he/she would obtain more strategies that would result in a profit (or at least a smaller loss). Consequently, the MC1 model obtained the worst accuracy results. Also, we need to note that the lowest accuracy results were always obtained in the same datasets, while the highest was almost always in the same one.
Finally, 50 % of the datasets presented no null accuracy results for any of the models, meaning that the thresholds were always reached in all of the test sets. In Dataset 1, 0.5 % of the models resulted in null accuracy results, which was the same for all the models, while this percentage was 1.5 % for Dataset 3.
Moving to the obtained characteristics (which resulted from the explained procedures), for these controlled datasets they were as follows:
  • The percentages of times that the several models obtained the same strategies were as follows:
    -
    The MCn model fully coincided in all the datasets with the time series models, i.e., in all the dataset these models always resulted in the same strategies;
    -
    The MC1 model fully coincided in 50 % of the datasets with all the other models but, on the other hand, it never coincided with any model in the other datasets.
  • The average time (in iterations) for all of the datasets was the same across all of the models. Also, the highest average time was 3.475 iterations (in Dataset 3) and the lowest was 1 iteration (on Datasets 2 and 4).
  • The percentage of the speculator’s obtained strategies for each of the models was as follows:
    -
    For the MC1 model,
    *
    In 50 % of the datasets, it always chose the More Risk strategy;
    *
    In 25 % of the datasets, it always chose the Less Risk strategy;
    *
    In 25 % of the datasets, it always chose the Do Not Play strategy.
    -
    For the MCn, SARIMA and GARCH models,
    *
    In 50 % of the datasets, it always chose the Less Risk strategy;
    *
    In 50 % of the datasets, it always chose the Do Not Play strategy.
  • The obtained possible profits using each model were as follows:
    -
    For the MC1 model,
    *
    Negative in 25 % of the datasets, null in 25 % and positive in the remaining ones;
    *
    The lowest profit (or highest loss) was in Dataset 1;
    *
    The highest profit was in Dataset 3.
    -
    For the MCn, SARIMA and GARCH models,
    *
    Null in 50 % of the datasets and positive in the remaining datasets;
    *
    The lowest profit (or highest loss) was in Datasets 1 and 2;
    *
    The highest profit was in Dataset 3.
As it was said before, the MCn, SARIMA and GARCH models fully coincided between them, in terms of accuracy results and chosen strategies. But, on the other hand, the MC1 model never coincided with all the other models in 50 % of the datasets.
The MC1 model in 50 % of the datasets always chose the More Risk strategy, and then switched between all the strategies in the remaining datasets. Meanwhile, the other models always chose the Less Risk strategy in 50 % of the datasets, and then the Do Not Play strategy on the other datasets.
In terms of possible profits, the MCn, SARIMA and GARCH models obtained positive profits in 50 % of the datasets and null profits on the other ones, while the MC1 model obtained negative profits in 25 % of the datasets, null profits in 25 % and the remaining were positive.
From all of these results, we can see that the MCn, SARIMA and GARCH models obtained better accuracy and profits results, because they chose the expected optimal strategies for each of the datasets, while the MC1 model was the worst in all of the same aspects.
Finally, the average time it took the models to reach a threshold always coincided between models and its range was approximately from one to three iterations. Also, we need to note that both the highest and lowest profits were always obtained in the same datasets.

3.2. Daily Datasets

For this section, we will analyze datasets which are only composed of the daily closing prices of several financial assets; this means that we are going to analyze the assets’ prices at the end of each day (specifically, at the closing of the financial market).
We applied our models to 100 different datasets, but we will not analyze each of them; rather, we will make a global analysis of the results. Also, note that, whenever we refer to a specific dataset, we are actually referring to the price data that we obtained for a certain financial asset. Additionally, all the datasets have exactly 1000 observations of the closing price at the end of the day.
Thus, after applying our models to these datasets, considering that 20 % of the data belongs to the test set, we obtained the following:
  • The highest standard deviation of the transformed datasets was α 3.44 (obtained in the TNXP dataset) and the lowest was α 0 (in the PSON dataset).
  • The MC1 model was 41 % more accurate than the other models, i.e., on 41 datasets this model had accuracy results higher than (or equal to) all the other models. Also, the highest accuracy result was 66.5 % (obtained in the AAPL dataset), while the lowest was 33.5 % (in the TNXP dataset).
  • The MCn model was 50 % more accurate than the other models. And the highest accuracy result was 66.5 % (obtained in the AAPL and TNXP datasets), while the lowest was 34.5 % (in the NOS dataset).
  • The SARIMA model was 42 % more accurate than the other models. And the highest accuracy result was 66.5 % (obtained in the AAPL dataset), while the lowest was 35 % (in the GFS dataset).
  • The GARCH model was 40 % more accurate than the other models. And the highest accuracy result was 66.5 % (obtained in the AAPL dataset), while the lowest was 35.5 % (in the NOS dataset).
From these results we can see that the MCn model is the one with the best accuracy results, which means that, if the speculator used this model (for these datasets), he/she would obtain more strategies that would result in a profit (or at least a smaller loss). Additionally, the MC1, SARIMA and GARCH models obtained very similar accuracy results.
Regarding the time series models, the SARIMA model obtained slightly higher accuracy results than the GARCH model, which is the opposite of what was expected, since the GARCH models were specifically developed for this kind of data, as such it would be expected for them to perform better in terms of accuracy.
Finally, the obtained null accuracy results were the same across all the models and were almost always zero; also, the highest percentage of null models was 6 % (obtained in the TWTR dataset). Additionally, we need to note that the highest accuracy results were always obtained in the same dataset.
The obtained characteristics (which resulted from the explained procedures) for these datasets were as follows:
  • The percentages of times that the several models obtained the same strategies were as follows:
    -
    The Markov chain models fully coincided between them in 81 % of the datasets, i.e., in 81 datasets these two models always resulted in the same strategies. Also, they never coincided in 5 % of the datasets and, in the other datasets, the percentage of coinciding models ranged from 2 % to 99 % .
    -
    The MC1 model never coincided (in all the datasets) with the time series models.
    -
    The MCn model never coincided in 81 % of the datasets with the SARIMA model and, in the other datasets, the percentage of coinciding models ranged from 1 % to 98 % .
    -
    The MCn model never coincided in 82 % of the datasets with the GARCH model and, in the other datasets, the percentage of coinciding models ranged from 0.5 % to 98.5 % .
    -
    The SARIMA model fully coincided with the GARCH model in 6 % of the datasets and, in the other datasets, the percentage of coinciding models ranged from 51.5 % to 99.5 % .
  • The average time (in days) for all the datasets was the same across all the models. Also, the highest average time was 9.35 days (in the GFS dataset) and the lowest was 1.015 days (in the PSON dataset).
  • The percentage of the speculator’s obtained strategies for each of the models was as follows:
    -
    The MC1 model always chose to play the More Risk strategy on all of the datasets.
    -
    For the MCn model,
    *
    In 81 % of the datasets, it always chose the More Risk strategy;
    *
    In 1 % of the datasets, it always chose the Less Risk strategy;
    *
    In 4 % of the datasets, it always chose the Do Not Play strategy;
    *
    In 1 % of the datasets, it chose between the More Risk and Less Risk strategies;
    *
    In 13 % of the datasets, it only chose between the More Risk and Do Not Play strategies.
    -
    For the SARIMA model,
    *
    In 5 % of the datasets, it always chose the Less Risk strategy;
    *
    In none of the datasets, it always chose the More Risk and Do Not Play strategies;
    *
    In the remaining datasets, it only chose between the Less Risk and Do Not Play strategies. Also, the percentage of times the Less Risk strategy was chosen (instead of the Do Not Play strategy) was less than 50 % in only 3 % of all the datasets.
    -
    For the GARCH model,
    *
    In 26 % of the datasets, it always chose the Less Risk strategy;
    *
    In none of the datasets, it always chose the More Risk and Do Not Play strategies;
    *
    In the remaining datasets it only chose between the Less Risk and Do Not Play strategies. Also, the percentage of times the Less Risk strategy was chosen (instead of the Do Not Play strategy) was less than 50 % in only 1 % of all the datasets.
  • The obtained possible profits using each model were as follows:
    -
    For the MC1 model,
    *
    Negative in 18 % of the datasets and positive in the remaining datasets;
    *
    The lowest profit (or highest loss) was in the CCL dataset;
    *
    The highest profit was in the AZN dataset.
    -
    For the MCn model,
    *
    Negative in 16 % of the datasets, null in 4 % of the datasets and positive in the remaining datasets;
    *
    The lowest profit (or highest loss) was in the CCL dataset;
    *
    The highest profit was in the AZN dataset.
    -
    For the SARIMA model,
    *
    Negative in 25 % of the datasets and positive in the remaining datasets;
    *
    The lowest profit (or highest loss) was in the CCL dataset;
    *
    The highest profit was in the AVV dataset.
    -
    For the GARCH model,
    *
    Negative in 19 % of the datasets and positive in the remaining datasets;
    *
    The lowest profit (or highest loss) was in the CCL dataset;
    *
    The highest profit was in the AZN dataset.
From the first item, we can see that no model fully coincided in terms of chosen strategies with another one, but, on the other hand, the MC1 model never coincided with the time series models (SARIMA and GARCH); similarly, the MCn model almost never coincided with the time series models. Also, the Markov chain models almost always coincided between them. Regarding the time series models, they almost always coincided between them, even though they only fully coincided in 6 % of the datasets.
The MC1 model always chose the More Risk strategy across all of the datasets, while this only happened in 81 % of the datasets for the MCn model. But, unlike the Markov chain models, the time series models never chose the More Risk strategy.
From all of these results, we can see that the MCn model performed better both in terms of accuracy results and of possible profits. Meanwhile, the MC1 model performed similarly to the time series models, both in terms of accuracy results and of possible profits. Also, regarding the time series models, the SARIMA model had slightly higher accuracy results than the GARCH model; however, it had the highest percentage of unprofitable datasets.
Finally, the average time it took the models to reach a threshold always coincided between models and its range was from approximately a day to two weeks (each week in the financial markets is composed of five days). Also, we need to note that the lowest profit was always obtained in the same dataset, while the highest one was almost always obtained in the same one.

3.3. Intraday Datasets

For this section, we will analyze datasets which are only composed of 1000 observations of the intraday closing prices of several financial assets; this means that we are going to analyze the assets’ prices at the end of each minute for several days. Also, we applied our models to 100 different datasets, but we will not analyze each of them; rather, we will make a global analysis of the results. Also, note that, whenever we refer to a specific dataset, we are actually referring to the price data that we obtained for a certain financial asset.
Thus, after applying our models to these datasets, considering that 20 % of the data belongs to the test set, we obtained the following:
  • The highest standard deviation of the transformed datasets was α 2.13 (obtained in the TNXP dataset); also, this value was the only value for the standard deviation greater than 1. Furthermore, all the other values for the standard deviation were smaller than 0.4, where the lowest was α 0 (in the Z dataset).
  • The MC1 was 27 % more accurate than the other models, i.e., in 27 datasets this model had accuracy results higher than (or equal to) all the other models. Also, the highest accuracy result was 68.5 % (obtained in the NOS dataset), while the lowest was 0.5 % (in the TWTR dataset).
  • The MCn model was 43 % more accurate than the other models. And the highest accuracy result was 78.5 % (obtained in the FCX dataset), while the lowest was 0.5 % (in the TWTR dataset).
  • The SARIMA model was 43 % more accurate than the other models. And the highest accuracy result was 74 % (obtained in the BCP dataset), while the lowest was 2.5 % (in the TWTR dataset).
  • The GARCH model was 33 % more accurate than the other models. And the highest accuracy result was 67.5 % (obtained in the O dataset), while the lowest was 14 % (in the TWTR dataset).
From these results we can see that the MCn and SARIMA models were the ones with the best accuracy results, which means that, if the speculator used one of these models (for these datasets), he/she would obtain more strategies that would result in a profit (or at least a smaller loss). Meanwhile, the MC1 model was the one with the lowest accuracy results.
Regarding the time series models, the SARIMA model obtained higher accuracy results than the GARCH model, which is the opposite of what was expected, since the GARCH models were specifically developed for this kind of data.
Finally, the obtained null accuracy results were the same across all the models and were almost always zero, where the highest percentage of null models was 12.5 % (obtained in the TWTR dataset). Also, we need to note that the smallest accuracy results were always obtained in the same dataset.
The obtained characteristics (which resulted from the explained procedures) for these controlled datasets were as follows:
  • The percentages of times that the several models obtained the same strategies were as follows:
    -
    The Markov chain models fully coincided between them in 61 % of the datasets, i.e., in 61 datasets these two models always resulted in the same strategies. Also, they never coincided in 17 % of the datasets and, in the other datasets, the percentage of coinciding models ranged from 1 % to 98.5 % .
    -
    The MC1 model never coincided in any of the datasets with the time series models.
    -
    The MCn model fully coincided with the SARIMA model in 1 % of the datasets, never coincided in 67 % of the datasets and, in the other datasets, the percentage of coinciding models ranged from 1 % to 87.5 % .
    -
    The MCn model never coincided with the GARCH model in 76 % of the datasets and, in the other datasets, the percentage of coinciding models ranged from 0.5 % to 95.5 % .
    -
    The SARIMA model fully coincided with the GARCH model in 4 % of the datasets and, in the other datasets, the percentage of coinciding models ranged from 12.5 % to 99.5 % .
  • The average time (in minutes) for all the datasets was the same across all the models. And the highest average time was 52.56 min (in the TWTR dataset), while the lowest was 1.035 min (in the Z dataset).
  • The percentages of the speculator’s obtained strategies for each of the models were as follows:
    -
    The MC1 model always chose to play the More Risk strategy on all of the datasets.
    -
    For the MCn model,
    *
    In 61 % of the datasets, it always chose the More Risk strategy;
    *
    In 1 % of the datasets, it always chose the Less Risk strategy;
    *
    In 16 % of the datasets, it always chose the Do Not Play strategy;
    *
    In 22 % of the datasets, it only chose between the More Risk and Do Not Play strategies.
    -
    For the SARIMA model,
    *
    In 5 % of the datasets, it always chose the Less Risk strategy;
    *
    In none of the datasets, it always chose the More Risk and Do Not Play strategies;
    *
    In the remaining datasets, it only chose between the Less Risk and Do Not Play strategies. Also, the percentage of times the Less Risk strategy was chosen (instead of the Do Not Play strategy) was less than 50 % in only 7 % of all the datasets.
    -
    For the GARCH model,
    *
    In 27 % of the datasets, it always chose the Less Risk strategy;
    *
    In none of the datasets, it always chose the More Risk strategy;
    *
    In the remaining datasets, it only chose between the Less Risk and Do Not Play strategies. Also, the percentage of times the Less Risk strategy was chosen (instead of the Do Not Play strategy) was less than 50 % in only 3 % of all the datasets.
  • The obtained profits using each model were as follows:
    -
    For the MC1 model,
    *
    Negative in 41 % of the datasets and positive in the remaining datasets;
    *
    The lowest profit (or highest loss) was in the RB dataset;
    *
    The highest profit was in the AZN dataset.
    -
    For the MCn model,
    *
    Negative in 37 % of the datasets, null in 16 % and positive in the remaining datasets;
    *
    The lowest profit (or highest loss) was in the RB dataset;
    *
    The highest profit was in the AHT dataset.
    -
    For the SARIMA model,
    *
    Negative in 40 % of the datasets and positive in the remaining datasets;
    *
    The lowest profit (or highest loss) was in the RB dataset;
    *
    The highest profit was in the AZN dataset.
    -
    For the GARCH model,
    *
    Negative in 43 % of the datasets and positive in the remaining datasets;
    *
    The lowest profit (or highest loss) was in the RB dataset;
    *
    The highest profit was in the AZN dataset.
From the first item, we can see that no model fully coincided in terms of chosen strategies with another one, but the MC1 model never coincided with the time series models (SARIMA and GARCH), and the MCn model almost never coincided with the time series models. Also, the Markov chain models almost always coincided between them. Similarly, the time series models almost always coincided between them, even though they only fully coincided in 4 % of the datasets.
The MC1 model always chose the More Risk strategy across all the datasets, while this only happened in 61 % of the datasets for the MCn model. But, unlike the Markov chain models, the time series models never chose the More Risk strategy.
The average time it took the models to reach a threshold always coincided between models and its range was from approximately 1 to 53 min. Also, the lowest profit was always obtained in the same dataset, while the highest was almost always obtained in the same one.
Finally, from all of these results, we can see that the MCn and SARIMA models were the ones with the best accuracy results; however, the MCn model had the lowest percentage of unprofitable datasets and was a model which resulted in all kinds of strategies. Additionally, regarding the time series models, the SARIMA model had better accuracy and profit results than the GARCH model.

4. Conclusions

Now that we have all the results for all the datasets, we can make a summary of what we obtained and then draw some conclusions from it.
Firstly, from all the obtained results, we can note that the lowest standard deviation of the transformed datasets was α 0 , while the highest was α 3 . Also, we need to note that, in the intraday datasets, 99 % of the transformed datasets had a standard deviation lower than 0.4 .
Regarding the obtained accuracy results for the models, we can see that the MCn model obtained the best accuracy results for each type of dataset (controlled, daily and intraday), but on the controlled datasets it tied with the time series models, while this happened with the SARIMA model in the intraday datasets. About the maximum and minimum accuracy results, we obtained the following:
  • For the controlled datasets, the lowest accuracy result was almost always obtained in the same dataset, while the highest was always obtained in the same one;
  • For the daily datasets, only the highest accuracy result was always obtained in the same dataset;
  • For the intraday datasets, only the lowest accuracy result was always obtained in the same dataset.
Additionally, in all of the datasets, both the null accuracy results and the average closing times were the same across the models. However, we need to note that, in terms of maximum results, the intraday datasets resulted in higher null results and higher average closing times.
For the percentage of equal strategies across the models, we obtained the following:
  • For the controlled datasets, the MCn model always coincided with the time series models. Meanwhile, the MC1 model fully coincided with the other models in 50 % of the datasets, whilst it never coincided in the other datasets.
  • For both the daily and intraday datasets, the Markov chain models almost always coincided between them. But the MC1 model never coincided with the time series models and, consequently, the MCn model almost never coincided with the time series models. Regarding the time series models, they almost always had a high percentage of coinciding strategies between them, but they almost never fully coincided between them.
Now, regarding the percentage of chosen strategies for each of the models we obtained the following:
  • For the controlled datasets, the MC1 model almost always chose the More Risk strategy (sometimes switching to the other strategies), while the other models chose between the Less Risk and Do Not Play strategies.
  • For both the daily and intraday datasets, the MC1 model always chose the More Risk strategy; the MCn model almost always chose the More Risk strategy, but it also chose between the other strategies; the time series models chose between the Less Risk and Do Not Play strategies.
Regarding the obtained possible profits resulting from applying the different models, we can see that the MCn model obtained the least percentage of unprofitable datasets for each type of dataset, but on the controlled datasets it tied with the time series models; on the other hand, the MC1 model obtained the highest percentage of strictly positive profits in the daily datasets, while the same happened for the intraday datasets with the SARIMA model. About the maximum and minimum obtained possible profits, we have the following:
  • For the controlled datasets, the lowest and highest possible profits were always obtained in the same datasets;
  • For both the daily and intraday datasets, the lowest possible profit was always obtained in the same dataset (CCL and RB, respectively) and the highest was almost always obtained in the same one (AZN for both types).
Thus, gathering all these results, we can see that the Markov chain model (considering the long-run estimator) behaved better, both in terms of accuracy and possible profits, than the other models; additionally, this model resulted in all kinds of strategies, unlike all the other models. So, with the Markov chain model (considering the long-run estimator), we obtained better results than all the other presented models.
Finally, the game theoretical model that we used as the decision model to make predictions (and to buy and sell financial assets) is a useful and accurate tool (both for the Markov chain models and the time series models), because it gives us an optimal strategy chosen in terms of these market probabilities; also, these strategies are the same as the ones commonly used by the markets’ investors (and speculators). So, instead of directly predicting a financial asset’s price (and then acting upon this prediction), we can obtain a probabilistic model that lets us see how the financial markets behaved and where they may be going in terms of the assets’ prices.

Future Work

From the presented theory and subsequently results, a number of possible extensions can be made, such as the following:
  • Create a new decision model that incorporates both the Markov chains and time series models;
  • Add more classes to the Markov chain model, add more strategies to the game theoretical model and/or alter the existing classes/strategies;
  • Study how these models can be adapted to all kinds of data;
  • Incorporate data regarding news sentiment, social media trends and economic indicators to improve the model’s accuracy, since this would allow for a more dynamic and responsive approach to stock market prediction;
  • Develop a model for extreme events when the time series changes directions, such as the Great Recession or the 2008 financial crisis;
  • Consider bigger forecasting horizons in order to make long-term predictions;
  • Consider other models instead of the Markov chains to predict the game’s probabilities, such as VAR, ECM, Kalman Filter or Decision Trees based models, or Neural Networks.
Also, we can study the possible relationships between the volatility, type and/or length of the datasets and the following:
  • The obtained optimal model (both in terms of accuracy and possible profit results);
  • The obtained values for the accuracy and possible profit results;
  • The standard deviations, the average closing time and the percentage of null models.
All of this should be studied in order to create a better model that predicts the financial markets so as to increase the potential profits, and then to extend it to all kinds of data.

Author Contributions

Conceptualization, J.C.F., A.A.P. and Ó.F.; methodology, J.C.F., A.A.P. and Ó.F.; software, J.C.F.; validation, J.C.F., A.A.P. and Ó.F.; formal analysis, J.C.F.; investigation, J.C.F.; resources, J.C.F., A.A.P. and Ó.F.; data curation, J.C.F.; writing—original draft preparation, J.C.F.; writing—review and editing, J.C.F., A.A.P. and Ó.F.; visualization, J.C.F., A.A.P. and Ó.F.; supervision, A.A.P. and Ó.F.; project administration, A.A.P. and Ó.F.; funding acquisition, A.A.P. and Ó.F. All authors have read and agreed to the published version of the manuscript.

Funding

This work is financed by the following: National Funds through the Portuguese funding agency, FCT–Fundação para a Ciência e a Tecnologia, within projects LA/P/0063/2020, UIDB/50014/2020 and within project “Modelling, Dynamics and Games” with reference PTDC/MAT-APL/31753/2017; CMUP–Centro de Matemática da Universidade do Porto.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are openly available at https://www.kaggle.com/jfcf0802/daily-and-intraday-stock-data (accessed on 4 May 2020).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Yahoo Finance. Available online: https://finance.yahoo.com/ (accessed on 23 January 2020).
  2. AlphaVantage. Available online: https://www.alphavantage.co/ (accessed on 14 February 2020).
  3. Freitas, J. KAGGLE Dataset—Daily and Intraday Stock Data. Available online: https://www.kaggle.com/jfcf0802/daily-and-intraday-stock-data (accessed on 4 May 2020).
  4. McDonald, J.B. Probability Distributions for Financial Models. Handb. Stat. 1996, 14, 427–461. [Google Scholar]
  5. Jackwerth, J.C.; Rubinstein, M. Recovering Probability Distributions from Option Prices. J. Financ. 1996, 51, 1661. [Google Scholar] [CrossRef]
  6. Errunza, V.R.; Losq, E. The Behavior of Stock Prices on LDC Markets. J. Bank. Financ. 1985, 9, 561–575. [Google Scholar] [CrossRef]
  7. Mandelbrot, B.; Taylor, H.M. On the Distribution of Stock Price Differences. Oper. Res. 1967, 15, 1057–1062. [Google Scholar] [CrossRef]
  8. Pishro-Nik, H. Introduction to Probability, Statistics, and Random Processes; Kappa Research: Athens, Greece, 2014. [Google Scholar]
  9. Stewart, J. Calculus, 8th ed.; Cengage Learning: Boston, MA, USA, 2016. [Google Scholar]
  10. McMillan, L.G. Options as a Strategic Investment, 4th ed.; Prentice Hall Press: Hoboken, NJ, USA, 2001. [Google Scholar]
  11. Murphy, J.E. Stock Market Probability: How to Improve the Odds of Making Better Investment Decisions; Probus Publishing: Phoenix, AZ, USA, 1988. [Google Scholar]
  12. Box, G.; Jenkins, G. Time Series Analysis, Forecasting and Control; Holden-Day: San Francisco, CA, USA, 1970. [Google Scholar]
  13. Hipel, K.; McLeod, A. Time Series Modelling of Water Resources and Environmental Systems; Elsevier: Amsterdam, The Netherlands, 1994. [Google Scholar]
  14. Gottlieb, G.; Kalay, A. Implications of the Discreteness of Observed Stock Prices. J. Financ. 1965, 11, 135–153. [Google Scholar] [CrossRef]
  15. Scott, J.; Stumpp, M.; Xu, P. Overconfidence Bias in International Stock Prices. J. Portf. Manag. 2003, 29, 80–89. [Google Scholar] [CrossRef]
  16. Royal, J.; Arielle, O. What is the Average Stock Market Return? 2020. Available online: https://www.nerdwallet.com/blog/investing/average-stock-market-return/ (accessed on 24 April 2020).
  17. Cournot, A. Researches into the Mathematical Principles of the Theory of Wealth; Macmillan Company: New York, NY, USA, 1897. [Google Scholar]
  18. Nash, J. Equilibrium Points in n-Person Games. Proc. Natl. Acad. Sci. USA 1950, 36, 48–49. [Google Scholar] [CrossRef] [PubMed]
  19. Wald, A. Statistical Decision Functions; John Wiley & Sons: Hoboken, NJ, USA, 1950. [Google Scholar]
  20. Luce, R.D.; Raiffa, H. Games and Decisions; John Wiley & Sons: Hoboken, NJ, USA, 1957. [Google Scholar]
  21. Harsanyi, J. Games with Randomly Distributed Payoffs: A New Rationale for Mixed Strategy Equilibrium Points. Int. J. Game Theory 1973, 2, 1–23. [Google Scholar] [CrossRef]
  22. Aumann, R. Subjectivity and Correlation in Randomized Strategies. J. Math. Econ. 1974, 1, 67–96. [Google Scholar] [CrossRef]
  23. Aumann, R. Agreeing to Disagree. Ann. Stat. 1976, 4, 1236–1239. [Google Scholar] [CrossRef]
  24. Farber, H. An Analysis of Final-Offer Arbitration. J. Confl. Resolut. 1980, 35, 683–705. [Google Scholar] [CrossRef]
  25. Bertrand, J. Théorie Mathématique de la Richesse Sociale. J. Savants 1883, 499–508. [Google Scholar]
  26. Pearce, D. Rationalize Strategic Behavior and the Problem of Perfection. Econometrica 1984, 52, 1029–1050. [Google Scholar] [CrossRef]
  27. Szép, J.; Forgó, F. Introduction to the Theory of Games; D. Reidel Publishing Company: Dordrecht, The Netherlands, 1985. [Google Scholar]
  28. Fudenberg, D.; Tirole, J. Game Theory; The MIT Press: Cambridge, MA, USA, 1991. [Google Scholar]
  29. Gibbons, R. A Primer in Game Theory; Pearson Education: London, UK, 1992. [Google Scholar]
  30. Biswas, T. Decision-Making Under Uncertainty; MAcMillan Press Ltd.: New York, NY, USA, 1997. [Google Scholar]
  31. Shelton, R.B. Gaming the Market; Wiley Trading Advantage, John Wiley & Sons: Hoboken, NJ, USA, 1997. [Google Scholar]
  32. Kemeny, J.; Snell, J. Finite Markov Chains; D. van Nostrand Co. Ltd.: London, UK, 1960. [Google Scholar]
  33. Bowerman, B.L. Nonstationary Markov Decision Processes and Related Topics in Nonstationary Markov Chains. Retrospective Theses and Dissertations, Iowa State University, Ames, IA, USA, 1974. [Google Scholar]
  34. Fismen, M. Exact Simulation Using Markov Chains. Diploma-Thesis (Master-Thesis) in Statistics, Department of Mathematical Sciences, The Norwegian University of Science and Technology, Trondheim, Norway, 1997. [Google Scholar]
  35. Welton, N.; Ades, A. Estimation of Markov Chain Transition Probabilities and Rates from Fully and Partially Observed Data: Uncertainty Propagation, Evidence Synthesis, and Model Calibration. Med. Decis. Mak. 2005, 25, 633–645. [Google Scholar] [CrossRef] [PubMed]
  36. Fette, B. Cognitive Radio Technology, 2nd ed.; Academic Press: Cambridge, MA, USA, 2009. [Google Scholar]
  37. Stewart, W.J. Probability, Markov Chains, Queues and Simulation, 1st ed.; Princeton University Press: Princeton, NJ, USA, 2009. [Google Scholar]
  38. Himmelmann, S. HMM:HMM—Hidden Markov Models. R Package Version 1.0. 2010. Available online: www.linhi.com (accessed on 24 March 2020).
  39. Jackson, C.H. Multi-State Models for Panel Data: The msm Package for R. J. Stat. Softw. 2011, 38, 1–29. [Google Scholar] [CrossRef]
  40. Wreede, L.; Fiocco, M.; Putter, H. mstate: An R Package for the Analysis of Competing Risks and Multi-State Models. J. Stat. Softw. 2011, 38, 1–30. [Google Scholar] [CrossRef]
  41. Kobayashi, H.; Mark, B.L.; Turin, W. Probability, Random Processes and Statistical Analysis; Cambridge University Press: Cambridge, UK, 2012. [Google Scholar]
  42. Geyer, C.J.; Johnson, L.T. mcmc: Markov Chain Monte Carlo. R Package Version 0.9-2. 2013. Available online: https://cran.r-project.org/web/packages/mcmc/index.html (accessed on 15 January 2020).
  43. Spedicato, G.A.; Kang, T.S.; Yalamanchi, S.B.; Yadav, D.; Cordón, I. The Markovchain Package: A Package for Easily Handling Discrete Markov Chains in R. 2017. Available online: https://cran.r-project.org/web/packages/markovchain/vignettes/an_introduction_to_markovchain_package.pdf (accessed on 10 January 2020).
  44. Engle, R.F. Autoregressive conditional heteroscedasticity with estimates of the variance of United Kingdom inflation. Econometrica 1982, 50, 987–1007. [Google Scholar] [CrossRef]
  45. Bollerslev, T. Generalized autoregressive conditional heteroscedasticity. J. Econ. 1986, 31, 307–327. [Google Scholar]
  46. Hamilton, J.D. Time Series Analysis; Princeton University Press: Princeton, NJ, USA, 1994. [Google Scholar]
  47. Box, G.; Jenkins, G.; Reinsel, G. Time Series Analysis, Forecasting and Control; Wiley: Hoboken, NJ, USA, 2008. [Google Scholar]
  48. Hyndman, R.; Khandakar, Y. Automatic time series forecasting: The forecast package for R. J. Stat. Softw. 2008, 27, 1–22. [Google Scholar] [CrossRef]
  49. Shumway, R.H.; Stoffer, D.S. Time Series Analysis and Its Applications, 3rd ed.; Springer Texts in Statistics; Springer: Berlin/Heidelberg, Germany, 2011. [Google Scholar]
  50. Brockwell, P.; Davis, R. Introduction to Time Series and Forecasting, 3rd ed.; Springer Texts in Statistics; Springer: Berlin/Heidelberg, Germany, 2016. [Google Scholar]
  51. Wilmott, P.; Howison, S.; Dewynne, J. The Mathematics of Financial Derivatives: A Student Introduction; Cambridge University Press: Cambridge, UK, 1995. [Google Scholar]
  52. Stuart, A.; Ord, K. Kendall’s Advanced Theory of Statistics: Volume I—Distribution Theory; Edward Arnold: London, UK, 1994. [Google Scholar]
Figure 1. AAPL daily closing price from 22 January 2016 to 10 January 2020.
Figure 1. AAPL daily closing price from 22 January 2016 to 10 January 2020.
Mathematics 12 02676 g001
Figure 2. AAPL intraday closing price from 3 February 2020 09:31 to 7 February 2020 16:00.
Figure 2. AAPL intraday closing price from 3 February 2020 09:31 to 7 February 2020 16:00.
Mathematics 12 02676 g002
Figure 3. GALP daily closing price from 17 March 2016 to 13 February 2020.
Figure 3. GALP daily closing price from 17 March 2016 to 13 February 2020.
Mathematics 12 02676 g003
Figure 4. GALP intraday closing price from 11 February 2020 04:00 to 17 February 2020 11:29.
Figure 4. GALP intraday closing price from 11 February 2020 04:00 to 17 February 2020 11:29.
Mathematics 12 02676 g004
Figure 5. Transformed AAPL daily closing price from 25 January 2016 to 10 January 2020.
Figure 5. Transformed AAPL daily closing price from 25 January 2016 to 10 January 2020.
Mathematics 12 02676 g005
Figure 6. Transformed AAPL intraday closing price from 3 February 2020 09:32 to 7 February 2020 16:00.
Figure 6. Transformed AAPL intraday closing price from 3 February 2020 09:32 to 7 February 2020 16:00.
Mathematics 12 02676 g006
Figure 7. Transformed GALP daily closing price from 18 March 2016 to 13 February 2020.
Figure 7. Transformed GALP daily closing price from 18 March 2016 to 13 February 2020.
Mathematics 12 02676 g007
Figure 8. Transformed GALP intraday closing price from 11 February 2020 04:01 to 17 February 2020 11:29.
Figure 8. Transformed GALP intraday closing price from 11 February 2020 04:01 to 17 February 2020 11:29.
Mathematics 12 02676 g008
Figure 9. Visual representation of possible outcomes considering the speculator’s risk levels and the market’s price movements.
Figure 9. Visual representation of possible outcomes considering the speculator’s risk levels and the market’s price movements.
Mathematics 12 02676 g009
Figure 10. The probability triangle showing the likelihood of loss.
Figure 10. The probability triangle showing the likelihood of loss.
Mathematics 12 02676 g010
Figure 11. The probability triangle divided into two regions: “Play Less Risk” and “Do not Play”.
Figure 11. The probability triangle divided into two regions: “Play Less Risk” and “Do not Play”.
Mathematics 12 02676 g011
Figure 12. The probability triangle divided into two regions: “Play More Risk” and “Do not Play”.
Figure 12. The probability triangle divided into two regions: “Play More Risk” and “Do not Play”.
Mathematics 12 02676 g012
Figure 13. The probability triangle with all the analyses conducted so far, which is divided into three regions: “Play Less Risk”, “Play More Risk” and “Do Not Play”.
Figure 13. The probability triangle with all the analyses conducted so far, which is divided into three regions: “Play Less Risk”, “Play More Risk” and “Do Not Play”.
Mathematics 12 02676 g013
Figure 14. The Markov chain where we assume that the speculator chose to play the More Risk strategy.
Figure 14. The Markov chain where we assume that the speculator chose to play the More Risk strategy.
Mathematics 12 02676 g014
Figure 15. The Markov chain where we assume that the speculator chose to play the Less Risk strategy.
Figure 15. The Markov chain where we assume that the speculator chose to play the Less Risk strategy.
Mathematics 12 02676 g015
Table 1. The game table for the financial market game.
Table 1. The game table for the financial market game.
Speculator
\More Risk ( R + )Less Risk ( R )
MarketZero Adversity ( 0 A )ProfitProfit
Minor Adversity ( m A )ProfitSmall Loss
Major Adversity ( M A )Large LossSmall Loss
Table 2. The “updated” game table for the financial market game.
Table 2. The “updated” game table for the financial market game.
Speculator
q 1 q
R + R
Market p 0 0 A ww
p 1 m A w x
p 2 M A y x
Table 3. The game table for the financial market game including the “Do Not Play” (D) strategy.
Table 3. The game table for the financial market game including the “Do Not Play” (D) strategy.
Speculator
q 1 q 2 1 q 1 q 2
R + R D
Market p 0 0 A ww0
p 1 m A w x 0
p 2 M A y x 0
Table 4. Relative frequency table considering that the starting state is s 2 .
Table 4. Relative frequency table considering that the starting state is s 2 .
s M s m s 1 s 2 s 3 s 4 s Z
1 9 1 9 2 9 4 9 1 9 0 9 0 9
Table 5. Relative that the first citation of each table appears in numerical order. frequency table considering that the starting state is s 3 .
Table 5. Relative that the first citation of each table appears in numerical order. frequency table considering that the starting state is s 3 .
s M s m s 1 s 2 s 3 s 4 s Z
0 9 1 9 1 9 2 9 4 9 1 9 0 9
Table 6. Example (25)’s game table for the financial market game.
Table 6. Example (25)’s game table for the financial market game.
Speculator
q 1 q
R + R
Market p 0 0 A 99
p 1 m A 9 6
p 2 M A 9 6
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Freitas, J.C.; Pinto, A.A.; Felgueiras, Ó. Game Theory for Predicting Stocks’ Closing Prices. Mathematics 2024, 12, 2676. https://doi.org/10.3390/math12172676

AMA Style

Freitas JC, Pinto AA, Felgueiras Ó. Game Theory for Predicting Stocks’ Closing Prices. Mathematics. 2024; 12(17):2676. https://doi.org/10.3390/math12172676

Chicago/Turabian Style

Freitas, João Costa, Alberto Adrego Pinto, and Óscar Felgueiras. 2024. "Game Theory for Predicting Stocks’ Closing Prices" Mathematics 12, no. 17: 2676. https://doi.org/10.3390/math12172676

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop