Skip to main content

Complex decision-making strategies in a stock market experiment explained as the combination of few simple strategies


Many studies have shown that there are regularities in the way human beings make decisions. However, our ability to obtain models that capture such regularities and can accurately predict unobserved decisions is still limited. We tackle this problem in the context of individuals who are given information relative to the evolution of market prices and asked to guess the direction of the market. We use a networks inference approach with stochastic block models (SBM) to find the model and network representation that is most predictive of unobserved decisions. Our results suggest that users mostly use recent information (about the market and about their previous decisions) to guess. Furthermore, the analysis of SBM groups reveals a set of strategies used by players to process information and make decisions that is analogous to behaviors observed in other contexts. Our study provides and example on how to quantitatively explore human behavior strategies by representing decisions as networks and using rigorous inference and model-selection approaches.


In recent years, thanks to the widespread use of the internet, e-mail and mobile phone technologies, we have been able to gather large amounts of data that have enabled the large-scale characterization of specific traits of human behavior [15]. Indeed, a number of studies have shown that humans display statistically regular patterns in the way they move, communicate or make decisions which makes them identifiable [611]. Despite the success in characterizing such systems, there has been, comparatively, less work to assess whether there are interpretable models of that are truly predictive of unobserved behavior [10].

A compelling example is that of the study of decisions made by individuals when playing dyadic games that represent social dilemmas. A recent study [6] identified five different patterns in the strategies individuals use to play these games; these individual strategies, or behavioral phenotypes, deviate from optimal rational behavior and can be associated to common human attitudes such as jealousy, optimism or altruism [6, 12, 13]. However, such model is not the best for making predictions of unobserved individual decisions in the context of dyadic games. Indeed, a Bayesian modeling approach using a network representation of individual decisions in dyadic games showed that a model in which individuals mix three simple strategies is more predictive of unobserved individual decisions than a five-phenotype model [14]. Moreover, the Bayesian modeling approach reveals that the way individuals perceive games is different from the expectations based on game theory arguments [14].

Here, we use a similar network inference approach to model and understand the decision-making process in the context of stock markets. Specifically, we consider the situation in which individuals have to guess the short-term direction (up or down) of a stock market based on real data given a reduced set of available sources of information, such as the evolution of the market in the previous time step, average historical market trends, information on other markets or the advice of an expert [15]. Several questions arise in this context; for example: in an environment in which we are given more information than what we can process, which sources of information affect the decisions we make the most? How do we use this information to make decisions? Can we identify recurrent, context-dependent patterns of information usage that are predictive of unobserved decisions?

To address these questions, we assume that the information available to an individual fully defines the context in which she makes a decision; the decision is then the result of a specific strategy in which the individual exploits the available information. To define these strategies, we assume that there are some underlying patterns of behavior so that we can identify groups of individuals that display similar decision patterns and at the same time, identify groups of contexts that are similarly perceived by individuals. In our approach we exploit the fact that we can represent the decisions made by individuals in a specific context (for instance, the market went up in the previous round and the individual made a correct guess) as a bipartite graph connecting individuals and contexts, and use inference techniques developed for complex networks. In particular, we use stochastic block models, a type of group-based generative models that are amenable to Bayesian inference methods, including rigorous model selection [14, 16]. Our choice is further motivated by the fact that models in which individuals can mix more than one strategy have been shown to be successful at predicting unobserved individual decisions in other contexts [9, 14, 17].

With our network inference approach, we are able to rigorously compare network data representations that define contexts using different types of information—for instance information about the previous round or a historical trend. We find that users are rather Markovian when it comes to processing available information: individuals are best described if we assume that they only use information from the previous and current round to make their decisions. We also find that, consistently with some previous analysis [15], individuals use the information of the previous and current rounds in different ways to construct four distinct strategies: a switching strategy—individuals make a different decision at each time step; an optimistic strategy—individuals tend to predict that the market will go up; a repeating strategy—individuals repeat their previous decision; and a win-stay loose-shift strategy—individuals copy the previous market move.

Our inference approach thus makes it possible to identify the best representation of the data in terms of predictability. Additionally, through this representation we can explore the regularities in the way individual players use information to make decisions thus providing a valuable illustration of how powerful inference methodologies are to advance our understanding of human behavior from data.


To ease understanding of the steps we follow in our analysis, we provide a schematic visualization of the workflow in Fig. 1.

Figure 1

Methodological flow chart. Illustration of the workflow we follow in our work. Step 1: We identify the best model \(M^{\star}\) using the predictive accuracy over unobserved data considering all plausible network representations of the data. Step 2: We select the network representation of the data that yields most accurate predictions of unobserved data compared to other data representations using \(M^{\star}\). Step 3: We consider all data and obtain the most plausible model parameters \((\theta^{\star}, \eta^{\star}, {\mathbf {p}}^{\star})\) and analyze and interpret those parameters to understand decision making strategies


Here, we consider the data set collected in the Mr. Banks social experiment [15].Footnote 1 In this experiment, participants participated in a game that consisted in correctly predicting the evolution of a simulated market. That is, whether it would go up (↑; stocks increase their value) or down (↓; stocks lose value). In total, 280 people participated in this experiment. Participants played during 25 rounds that corresponded to 25 days of a real stock market. The experiment used 30 different time series of 25 days in a real market taken from the period between 01/02/2006-12/29/2009 of daily prices of: the Spanish IBEX, the German DAX and the S&P500 from the United States.

In each round, players had access to the following sources of information: the evolution of the stock market during the previous month, a simulated expert’s advice that, by design, was correct 60% of the time, the trend of the same market in other places in the world, the average trend of the market over the previous 5 and 30 days, and the daily changes of direction of the market during the 30 previous days. We refer to this information as the context of the player.

Network models and inference

Model selection

To find the best model for our data, we compare models in terms of their ability to predict unobserved decisions. Asymptotically, and most often in practice as well [16], this is equivalent to using Bayesian inference for model selection. In a Bayesian setting, the best model is the one that has the largest posterior probability \(p(M|D)\) (or equivalently the model that has the shortest description length [16, 18]), where M stands for the model, and D for the observed data we want to model with M. Here, we follow a predictive approach to find, first, which type of SBM better describes observed data and, second, which is the network representation with which we get the most accurate predictions of unobserved decisions.

Network representation

Our goal is to predict whether a given player p will guess that the market is going up or down when exposed to a specific context c, given a set of past observed decisions \(R^{o}\) of the player herself and other individual players in different contexts. As noted above, a context c is the information accessible to the player before making her decision.

We represent the data as a bipartite network in which nodes are players and contexts. We draw an edge with value 1 or 0 between a player p and a context c if, in that context, the player guessed ↑ or ↓, respectively. For instance, consider that the available information at round t is: 1) whether the guess of the player at round \(t-1\) was right or wrong, \(C=\{{\mathrm{R},\mathrm{ W}}\}\); and 2) the market evolution at time \(t-1\), \(B=\{\uparrow, \downarrow\}\). Then, there are four possible different contexts for all CB combinations and we would represent our data as a bipartite network with N players and four different contexts \(c=\{({\mathrm{R}}\uparrow),({\mathrm{W}}\uparrow),({\mathrm {R}}\downarrow),({ \mathrm{W}}\downarrow)\}\).

Because we have information about the guessing history of all users, it would be possible to build many bipartite graphs in which contexts consider only current information, current information and information from the previous round, current information and information from the previous two rounds, etc. However, for our inference approach to properly work, we need to keep the number of possible contexts small enough to detect statistical patterns between individuals and contexts. Besides that, we have a priori no justification to assume that some choices of context are better than others. In our approach, assessing the predictive power over unobserved decisions allows us to select both the best model and the best set of contexts to represent the data.

Single-membership and mixed-membership stochastic block models

In our approach, we assume that there are statistical regularities in the way individuals make decisions in different contexts. These regularities define the strategic behaviors of players. In the network representation, we assume that the statistical regularities take the form of groups of players and groups of contexts with similar connections.

Consistent with this assumption, we model player decisions using stochastic block models [1922]. Stochastic block models are simple generative network models that assume the existence of groups of nodes (players and contexts), and that the probability that a pair of nodes connects (that is, that a player guesses up or down in a given context) depends exclusively on the groups to which the nodes belong.

Specifically, because the network we consider has two types of nodes, players and contexts, we consider bipartite stochastic block models [17, 23, 24]. In addition, we consider two types of stochastic block models: one in which each player and context can belong to a single group (SBM), and another one in which players and contexts can belong to multiple groups simultaneously with different weights (mixed-membership SBM, MMSBM) [25, 26].

Formally, we have a set U of players and a set I of contexts, and the observed decisions \(R^{o} = \lbrace r_{pc} \rbrace\) that players \(p\in U\) make in context \(c \in I\). In the data we consider that each player p in a specific context c has to guess the direction of the market in the next round, therefore the decision \(d_{pc}\) is binary: ↑ or ↓.

We assume that there are K groups of players and L groups of contexts, and that the probability that player p in group k in context c in group makes decision \(d_{pc}=\uparrow\) is given by \(p_{k\ell}\) where p is the matrix of connection probabilities between pairs of groups. Note that because there are only two possible decisions, the probability that \(d_{pc}=\downarrow\) is \(p_{k\ell}(\downarrow) = 1-p_{k\ell}\).

In the case of MMSBM, we allow players and contexts to belong to more than one group. We therefore introduce a membership vector for players \(\boldsymbol {\theta }_{p}\), such that \(\theta_{pk}\) is the probability that player p belongs to group k. Analogously, we introduce a membership vector for contexts \(\boldsymbol {\eta }_{c}\) such that \(\eta_{c\ell}\) is the probability that context c belongs to group . Because these vectors represent probabilities they are subject to the normalization conditions:

$$ \sum_{k} \theta_{pk}=1, \qquad\sum _{\ell} \eta_{c\ell}=1 . $$

Note that membership vectors become binary in the single membership SBM model, so that player p exclusively belongs to group k, \(\theta_{pk}=1\) and \(\theta_{pk'}=0\) for all \(k'\neq k\).

In the general MMSBM, the probability that player p makes decision \(d_{pc}\) in context c is:

$$\begin{aligned}& P(d_{pc}=\uparrow|\boldsymbol {\theta },\boldsymbol {\eta },\textbf {p}) = \sum _{k} \sum_{ \ell} \theta _{pk} p_{kl} \eta_{c\ell}, \end{aligned}$$
$$\begin{aligned}& P(d_{pc}=\downarrow|\boldsymbol {\theta },\boldsymbol {\eta },\textbf {p}) =\sum _{k} \sum_{ \ell} \theta _{pk} (1-p_{kl}) \eta_{c\ell} . \end{aligned}$$

SBMs further assume that each decision is independent from the others (conditionally on the group memberships), so that the probability of observing the data given the model parameters θ, η, p (or likelihood) can be expressed as the product of the probabilities of each individual decision:

$$ p\bigl(R^{\circ} \vert \boldsymbol {\theta }, \textbf {p}, \boldsymbol {\eta }\bigr) = \prod _{(p, c) \in R^{ \circ}} p(d_{pc}=\uparrow|\boldsymbol {\theta },\boldsymbol {\eta },\textbf {p})^{n^{\uparrow}_{pc}} p(d_{pc}=\downarrow|\boldsymbol {\theta },\boldsymbol {\eta },\textbf {p})^{n^{\downarrow}_{pc} } , $$

where \(n^{\uparrow}_{pc}\) is the number of times player p guesses ↑ in context c, and \(n^{\downarrow}_{pc}\) is the number of times player p guesses ↓ in context c.

Inference and prediction

A priori, we are agnostic about the values that the model parameters should take. We therefore use a non informative prior so that the posterior probability of the model is proportional to the likelihood \(p( \boldsymbol {\theta }, \textbf {p}, \boldsymbol {\eta }| R^{\circ}) \propto p(R^{\circ} \vert \boldsymbol {\theta }, \textbf {p}, \boldsymbol {\eta })\). We then find the model parameters that maximize the posterior. In the case of the SBM we use simulated annealing to find the set of model parameters \((\boldsymbol {\theta }^{*}, \boldsymbol {\eta }^{*}, \textbf {p}^{*})\) that maximizes the posterior probability [14]. In the case of the MMSBM, we use the expectation maximization approach described in [14, 27] (see Materials and Methods). We make our predictions about unobserved decisions using these maximum a posteriori parameters.

Previous work shows that using these approaches we are able of retrieving the correct model for model generated data [27, 28].


Model selection

We start by looking for the model that best describes our data, that is, the most predictive one. We consider three different models and assess their ability to make predictions measuring their accuracy on unobserved data using 5-fold cross validation [16]. The first model we consider is a naive baseline, in which we use the most common observed decision of player p in context c as a prediction. If there are no observed decisions of player p in context c, we predict \(d_{pc}=\uparrow\) because this is the most common decision (and the most common market move) in our data set. The other two models are the (single-membership) SBM and the (mixed-membership) MMSBM described above.

Each set of contexts defines a different network representation. We compute the average predictive accuracy of each model over folds and over network representations (Fig. 2). We find that, overall, MMSBM models perform better than the naive baseline and single-membership SBMs. Therefore, in what follows we use MMSBMs to identify the best representation of the data and to analyze player strategies.

Figure 2

Predictive accuracy of the three models. For each fold of the data, we show the predictive accuracy of the three models: naive, single-membership SBM and MMSBM. Each bar represents the average over 23 different network representations (as detailed in Fig. 3), which combine the variables that are more informative of players decisions (player’s decision at \(t-1\), market evolution at \(t-1\), outcome of decision at \(t-1\), expert consultation, advice consulted, average market trend over the 5 last/all rounds, market’s evolution/outcome before the previous round; see Additional file 1, Figs. 1–4)

Identification of the most predictive network representation of the data

Next, we identify the most predictive network representation for our data so as to establish which pieces of information and mechanisms are being used in the decision-making process. As we have already mentioned, we have the full history of player’s decisions, daily and average market evolution, and information on whether players consult the expert opinion before making their decisions. We find that past information beyond the previous round \(t-1\) is not relevant to predict decisions at round t (Fig. 3 and [15]). We therefore consider 23 different network representations that mostly consider information about the user and the market at round \(t-1\) and the expert’s advice at round t, and compare the performance of MMSBMs (fit to each different network representations) at predicting unobserved data (Fig. 3). To avoid fold-to-fold variability, we use the average log-ratio of the accuracy of pairs of models as our metric to compare predictive performance:

$$ Q_{S_{1},S_{2}} = \frac{1}{N_{\mathrm{folds}}} \sum^{N_{\mathrm {folds}}}_{i=0} \log\biggl(\frac{A_{S_{1}, i}}{A_{S_{2}, i}}\biggr) , $$

where \(A_{S, i}\) is the predictive accuracy in fold i for representation S, and \(N_{\mathrm{folds}}\) is the total number of folds. Note that by taking the logarithm of the ratio, we ensure that the metric is symmetric with respect to zero.

Figure 3

Comparison matrix of data representations using predictive accuracy. Each row/column corresponds to a specific data representation S. We label them according to the information we are using to define the set of contexts: A = player’s decision at \(t-1\), B = market evolution at \(t-1\), C = outcome of decision at \(t-1\), D = expert consultation, E = indications consulted, F/G = average over the 5 last/all rounds, H/I = market’s evolution/outcome before the previous round. Each matrix element \(Q_{S_{1}S_{2}}\) corresponds to the average log ratio of predictive accuracies (see text) between representations \(S_{1}\), \(S_{2}\) and is colored following the colorbar on the right hand side. Note that if \(Q_{S_{1}S_{2}}>1\) (red), \(S_{1}\) (row) has a larger predictive accuracy than \(S_{2}\) (column). If \(Q_{S_{1}S_{2}}<1\) (blue), \(S_{1}\) (row) has a lower predictive accuracy than \(S_{2}\) (column)

We find that there are five representations that yield an almost identical accuracy, significantly higher than that of the other representations (Fig. 3). Among those, we select the simplest representation, which comprises 12 different contexts resulting from the combination of three sources of information available to players at round t: the market evolution at round \(t-1\) (↑ or ↓), the outcome of the player’s guess at round \(t-1\) (right or wrong), and the expert’s advice at round t (↑, not consulted, or ↓) – for a total of \(2 \times2 \times3 = 12\) different contexts. Importantly, adding further information does not increase the predictive accuracy. Our analysis thus shows that players have short memory. This result correlates with the findings of Ref. [15] on the same data set. While there is a possibility that our data set is not big enough to capture effects beyond round \(t-1\), our result is consistent with other studies which have successfully used a Markovian human in the analysis of decision making processes [2931].

Each group of users has well-defined patterns of behavior

Next, we turn to the model parameters obtained for the most predictive representation of the data. In particular we focus on player groups, which we identify with guessing strategies [14]. As mentioned before, MMSBMs assume that players can mix several strategies and that contexts can also belong to different groups simultaneously. In our case, we find that the highest predictive accuracy is for a MMSBM with \(K=4\) groups of players (or strategies) and \(L=8\) groups of contexts (see Additional file 1, Fig. 5). Interestingly, we find that contexts tend to belong to a single group of contexts, while players have their memberships spread across different groups. In other words, the players behavior is the result of mixing different strategies (see Additional file 1, Figs. 7 and 8).

Each element group-to-group probabilities \(p_{k\ell}\) expresses the probability that a group of players k guesses ↑ when facing contexts that belong to group , and therefore encapsulate all the information of the strategy of each group of players. For a more straightforward interpretation of the strategies (and because each context belongs mostly to a single group), we analyze the matrix \(\hat{\mathbf{p}}\) in which each element \(\hat{p}_{kc}=\sum_{\ell} p_{k\ell} \eta_{c\ell}\) corresponds to the probability that a group of players k guesses ↑ in each context c (Fig. 4). We refer to each row \(\hat{p}_{k}\) in the matrix as an elementary strategy, since players combine these elementary strategies to give rise to observed complex strategies. Figure 4 shows that elementary strategies are well defined because the \(\hat{p}_{kc}\) are often either close to zero or one.

Figure 4

Inferred probability matrix for a group of users to guess ↑. The symbols on the x-axis represent the context according to the following notation: market move \(\in\lbrace\uparrow,\downarrow\rbrace\), outcome of previous guess \(\in\lbrace\text{right }\checkmark, \text{wrong }\times\rbrace\), expert’s guess \(\in\lbrace \uparrow, \downarrow, \text{-} \rbrace\). We see the groups tend to describe well defined behaviors since the majority of matrix elements are either 1 or 0

To help summarize and interpret elementary strategies \(\operatorname {add}(\hat{p}_{k})\), we note that in the \(\hat{\mathbf{p}}\) matrix we can identify several simple, easily interpretable patterns. We can use these patterns as alternative building blocks to describe decision-making strategies. We choose to consider the six following patterns which we will later use to define the elementary strategies \(\hat{p}_{k}\):

  • Win-stay (WS): at round t repeat the guess of round \(t-1\) if it was right.

  • Lose-shift (LS): at round t change the guess from round \(t-1\) if it was wrong.

  • Market imitation (MI): the guess at round t matches the market direction at \(t-1\). This strategy is equivalent to a combination of the two previous strategies which we call WSLS: if the market goes ↑ the player guessed ↑, MI = WS; if the player guessed ↓, then MI = LS.

  • Repeat previous guess (RPT): the guess at t is equal to the guess at \(t-1\).

  • Repeat after ↑ (RPTU) (or ↓, RPTD): repeat last guess if it was ↑ (respectively, ↓).

  • Expert’s advice (EXP): follow the expert’s advice if consulted.

For clarity Table 1 summarizes the acronyms we use for each pattern. The first three patterns were already identified in the behavior of some players in the original data collection study, as well as a general bias towards ↑ when making decisions [15]. However, whether these strategies were combined with others or used by different users was not explored.

Table 1 Glossary of Acronyms

To assess how each one of the elementary strategies \(\hat{p}_{k}\) align with these patterns, we define for each cluster k a score \(M_{kb}\) that quantifies the extent to which players within group k follow behavioral pattern \(b \in\{{\mathrm{MI},\mathrm{ WS},\mathrm{ LS},\mathrm{ RPT},\mathrm{ RPTU},\mathrm{ RPTD},\mathrm{ EXP }}\}\):

$$ M_{kb} = \frac{1}{N_{kb}}\sum_{c \in S_{b}}N_{kc} \bigl[q_{kc}(b)-\bigl(1-q_{kc}(b)\bigr) \bigr] . $$

In the summation, \(S_{b}\) represents the set of contexts in which a behavioral pattern can be observed – for example, while RPTD can be observed after a user guessed down in the previous round, RPTU cannot –, \(q_{kc}(b)\) is the probability that a user in group k follows the elementary strategy b in context c, \(N_{kc}\) is the number of times a player in group k faces context c, and \(N_{kb}=\sum_{c\in s_{b}} N_{kc}\) is the total number of observations of players in group k facing contexts \(c \in S_{b}\). Therefore, a score \(M_{kb}=1\) means that the group k always follows a pattern of behavior b when facing contexts \(c \in s_{b}\); a score \(M_{kb}=-1\) means that the group does exactly the opposite of what the strategy prescribes in 100% of cases. For instance, if group k always guesses ↑ regardless of the context, the scores for RPTU and RPTD will be \(M_{k {\mathrm{RPTU}}}=1\) (always guess ↑ after having guessed ↑) and \(M_{k {\mathrm{RPTD}}}=-1\) (never repeat ↓ after having guessed ↓).

In Fig. 5, we show the \(M_{kb}\) scores for each group of players. First, we note that when the expert is consulted, three of the groups follow her advice, while the remaining group is not influenced by it. In the remaining six contexts in which the expert is not consulted, we find that each group follows a very specific elementary strategy \(\hat{p}_{k}\) defined in terms of the six behavioral patterns we have previously defined. Group \(k_{1}\) strongly tends to change their previous decision (switching behavior); \(k_{2}\) tends to guess ↑ (optimistic behavior); \(k_{3}\) almost always repeats the previous decision (repeating behavior); and \(k_{4}\) always follows a win-stay loose-shift (WS-LS) behavior.

Figure 5

Patterns of behavior for each group of users. For each group of users we show the score \(M_{kb}\) (see text) for each pattern of behavior b (from left to right): (EXP) Following the expert’s advice; (WSLS) – Win-stay loose-shift; (WS) Win stay; (LS) Loose shift, (RPT) Repeat previous guess; (RPTU) Repeat previous decision if it was ↑; RPTD Repeat previous decision if it was ↓. A score of 1 means the group completely follows a basic pattern, and a score of −1 means it does the exact opposite of the basic pattern. Every group displays a preferential (if not systematic) pattern of behavior: K4 behaves according to the WS-LS strategy, K3 repeats the previous guess, K2 always guesses ↑ and K1 changes the previous guess. Additionally, the expert’s advice is either followed or ignored, but none of the groups systematically makes the opposite decision. Note that because the expert is consulted in less than 30% of the rounds, we split the data set into expert consulted and not consulted. From the former we get the score for the EXP strategy, while from the latter we obtain the scores for the other behavioral patterns


Our analysis shows that the best description of player’s strategies to predict their decision about market evolution is to consider that players are mixing elementary strategies which we have termed switching (SWI), optimistic (OPT), repeating (RPT), and win-stay (WS-LS) (see Table 1).

Interestingly, not all of these elementary strategies are combined in the same way by all of the players (Fig. 6). The most used strategy overall is the WS-LS strategy, which on average explains 34% of player’s decisions, that is, \(\frac{1}{N}\sum_{u} \theta_{u,{\mathrm{WS-LS}}} = 0.34\). We observe this trend for both players using a single elementary strategy (low entropy in Fig. 6) and those combining various elementary strategies (high entropy). This finding is consistent with the conclusions of numerous studies assessing the wide use of this behavior in various natural systems such as children education [32, 33], evolutionary systems [34, 35], or games involving adversity [36].

Figure 6

Distribution of use of behavioral patterns by players We compute the Shannon entropy of the θ membership vectors among four behavioral patterns: switching, optimistic, repeating, and win-stay (WS-LS). We split the users according to their Shannon entropy: (a), (d) Low entropy, including players who typically do not mix elementary strategies; (b,e) Medium entropy, including players who mix two or three elementary strategies; (c), (f) High entropy, including players mix three or four elementary strategies. (a), (b), (c) Use of each elementary strategy for players with membership vectors with low, medium and high entropy users, respectively. (d), (e), (f) Membership vectors. Each row represents one player. The color code quantifies the extent to which a player uses a behavioral pattern. We observe that the win-stay loose-Shift strategy is widely used alone, and that optimistic is commonly used in combination with other behavioral patterns

By contrast, the optimistic behavior is seldom used by users using a single strategy (Fig. 6(a), (d)). Nonetheless the optimistic strategy is on average part of 25% of players’ behavior, suggesting that this is a common strategy when used in combination with other strategies, which reflects the overall bias to guess ↑ regardless of the context in which the decision is made [15].

Finally, we note that the two remaining elementary behaviors, switching decisions (SWI) and repeating the previous decision (RPT) are complementary to one another, since if a player does not repeat her decision, it means that she changes her decision. Therefore, a player combining both strategies with equal probability would generate a sequence of random guesses. To investigate whether these strategies are the result of a behavioral pattern or just capture random sequences of ↑ and ↓, we measure from each player p, the normalized probability difference of use of each one of the two strategies \(D_{p}\):

$$ D_{p} = \frac{\theta_{p {\mathrm{RPT}}} - \theta_{p {\mathrm {SWI}}}}{\theta_{p {\mathrm{RPT}}} + \theta_{p {\mathrm{SWI}}}} . $$

If \(D_{p}=1\) player p uses exclusively the repeating strategy; if \(D_{p}=-1\) means she exclusively uses the shifting strategy; if \(D_{p}=0\) means that both strategies are used equally. We compute \(D_{p}\) only for players that use either “shifting” or “repeating” as a main strategy to avoid considering players that mostly use other strategies (WS-LS or optimistic). The results are presented Fig. 7. We find that while there are two peaks at extreme values (\(D_{p}=-1\) and \(D_{p}=1\)) showing that many players use exclusively one of the two strategies, players have a tendency to repeat their previous guess (i.e. the distribution of \(D_{p}\) is skewed towards \(D_{p}=1\)). Indeed, this observation shows that some players behave according a natural persistence cognitive bias observed when an individual has to make repeated decisions [37, 38].

Figure 7

Balance between repeat and switch strategies. We define \(D_{p} = \frac{\theta_{p {\mathrm{RPT}}} - \theta_{p {\mathrm {SWI}}}}{\theta_{p {\mathrm{RPT}}} - \theta_{p {\mathrm{SWI}}}}\), so that \(D_{p}=0\) means that both strategies are used by players to the same extent. This plot shows that a significant number of players are using exclusively one of the strategies; other players use a combination of those with a bias towards repeating their previous guess, rather than switching


In this work we have shown the suitability of the MMSBM for the study of social systems, particularly for modeling, predicting and understanding human decision-making processes. MMSBMs not only provide more accurate predictions than other state-of-the-art methods [14, 17], but they are interpretable.

A close analysis of the model parameters highlights the ability of these models to decompose complex behaviors into a linear combination of elementary behaviors. Our analysis helps identify basic patterns of behavior that are consistent with human behavior in other contexts. First, we observe an optimistic bias that suggests that individuals make decisions based on their desire that the market goes up. Second, we observe that many players use a win-stay loose-shift strategy which is known to be very efficient in the long run in learning processes, games of adversity, co-evolution networks, etc. Last, we find that players also display a tendency to repeat previous decisions, a behavior observed when individuals have to perform repetitive tasks. Our study demonstrates that these behavioral patterns of behavior are hidden to the naked eye but can be obtained from the data using our approach.

MMSBM have been widely used in several other fields including quantitative and computational social science [14]. This work confirms and pinpoints its relevance in the study of social systems. Its predictive accuracy and interpretability could be efficiently exploited in different studies and experiments in sociology and psychology in order to improve the understanding of human behavior [39]. Moreover, MMSBM offer an alternative framework to conventional populations analysis tools used in social sciences, and therefore finds its direct uses in the confirmation and information of state-of-the-art theories in cognitive sciences, sociology, psychology, etc., if not for the discovery of previously unreachable hidden thought mechanisms.

Materials and methods

In order to maximize the logarithm of the likelihood, we use a variational approach. First we use a trick to change the logarithm of a sum into a sum of logarithms:

$$ \begin{aligned} \log\bigl(P\bigl(R^{\circ} \vert\theta, \eta, p\bigr)\bigr) &= \sum_{(ui) \in R^{\circ}} N_{r_{ui}}\log\biggl(\sum_{k,l} \theta _{uk} p_{kl}(r_{ui}) \eta_{il} \biggr) \\ &= \sum_{(ui)\in R^{\circ}} N_{r_{ui}} \ln\Biggl(\sum ^{K, L}_{k, l} \omega_{ui}(k,l) \frac{\theta_{uk} p_{kl}(r_{ui}) \eta_{il}}{\omega_{ui}(k,l)}\Biggr) \\ &\geq\sum_{(ui)\in R^{\circ}} N_{r_{ui}} \sum ^{K, L}_{k, l} \omega_{ui}(k,l) \ln \biggl( \frac{\theta_{uk} p_{kl}(r_{ui}) \eta_{il}}{\omega _{ui}(k,l)}\biggr). \end{aligned} $$

In the second line of Eq. (8), we introduced the \(\omega_{ui}(k,l)\) function, which is the probability for a node u belonging to the group k to be linked by an edge \(r_{ui}\) to the node i belonging to the group l. By construction, this function is such that \(\sum_{k,l}^{K,L}\omega _{ui}(k,l) = 1\). Therefore we can use Jensen’s inequality \(\ln(\bar{x})\geq\overline{ \ln(x) }\); we end up to the last line of the equation (8). Then, one notices that this inequality becomes an equality for:

$$ \omega_{ui}(k, l) = \frac{\theta_{uk} \cdot p_{kl}(r_{ui}) \cdot\eta_{il}}{\sum^{K, L}_{k', l'}\theta_{uk'} \cdot p_{k'l'}(r_{ui}) \cdot\eta_{il'}}. $$

Which is the update equation for the expectation step. In order to maximize the log-likelihood, we derive it with respect to θ, η and p using Lagrange’s multipliers to account for normalization constraints. We obtain:

$$\begin{aligned}& \theta_{uk} = \frac{\sum_{r_{ui}} N_{r_{ui}} \sum_{i \in\partial u} \sum^{L}_{l} \omega_{ui}(k,l)}{d_{u}}, \end{aligned}$$
$$\begin{aligned}& \eta_{il} = \frac{\sum_{r_{ui}} N_{r_{ui}} \sum_{u \in\partial i} \sum^{K}_{k} \omega_{ui}(k,l)}{d_{i}}, \end{aligned}$$
$$\begin{aligned}& p_{kl}(r) = \frac{\sum_{r_{ui}} N_{r_{ui}} \sum_{(u,i) \in R^{\circ } | r_{ui}=r} \omega_{ui}(k,l)}{\sum_{(u,i) \in R^{\circ}} \omega_{ui}(k,l)}. \end{aligned}$$

With \(d_{u}\) the degree of node u and \(d_{i}\) the degree of node i.


  1. 1.

    The datasets analysed during the current study are available in the Zenodo repository,


  1. 1.

    Guimerà R, Danon L, Díaz-Guilera A, Giralt F, Arenas A (2003) Self-similar community structure in a network of human interactions. Phys Rev E 68:065103

    Article  Google Scholar 

  2. 2.

    Kossinets G, Watts DJ (2006) Empirical analysis of an evolving social network. Science 311(5757):88–90.

    MathSciNet  Article  MATH  Google Scholar 

  3. 3.

    Gonzalez MC, Hidalgo C, Barabasi A-L (2008) Understanding individual human mobility patterns. Nature 453:779–782.

    Article  Google Scholar 

  4. 4.

    Candia J, González MC, Wang P, Schoenharl T, Madey G, Barabási A-L (2008) Uncovering individual and collective human dynamics from mobile phone records. J Phys A, Math Theor 41(22):224015.

    MathSciNet  Article  Google Scholar 

  5. 5.

    Schneider CM, Belik V, Couronné T, Smoreda Z, González MC (2013) Unravelling daily human mobility motifs. J R Soc Interface 10(84):20130246.

    Article  Google Scholar 

  6. 6.

    Poncela-Casasnovas J, Gutiérrez-Roig M, Gracia-Lázaro C, Vicens J, Gómez-Gardeñes J, Perelló J, Moreno Y, Duch J, Sánchez A (2016) Humans display a reduced set of consistent behavioral phenotypes in dyadic games. Sci Adv

  7. 7.

    Ziebart BD, Maas A, Bagnell JA, Dey AK (2008) Human behavior modeling with maximum entropy inverse optimal control. In: AAAI conference on artificial intelligence, pp 1433–1438

    Google Scholar 

  8. 8.

    Saramäki J, Leicht EA, López E, Roberts SGB, Reed-Tsochas F, Dunbar RIM (2014) Persistence of social signatures in human communication. Proc Natl Acad Sci 111(3):942–947.

    Article  Google Scholar 

  9. 9.

    Godoy-Lorite A, Guimerà R, Sales-Pardo M (2016) Long-term evolution of email networks: statistical regularities, predictability and stability of social behaviors. PLoS ONE 11(1):1–11.

    Article  Google Scholar 

  10. 10.

    Hofman JM, Sharma A, Watts DJ (2017) Prediction and explanation in social systems. Science 355(6324):486–488.

    Article  Google Scholar 

  11. 11.

    de Montjoye Y, Hidalgo C, Verleysen M, Blondel VD (2013) Unique in the crowd: the privacy bounds of human mobility. Sci Rep 3:1376.

    Article  Google Scholar 

  12. 12.

    Messick DM, McClintock CG (1967) Motivational bases of choice in experimental games. J Exp Soc Psychol

  13. 13.

    Fehr E, Schmidt KM (1999) A theory of fairness, competition, and cooperation. Q J Econ 114:817–868

    Article  Google Scholar 

  14. 14.

    Cobo-López S, Godoy-Lorite A, Duch J, Sales-Pardo M, Guimerà R (2018) Optimal prediction of decisions and model selection in social dilemmas using block models. EPJ Data Sci 7(1):48.

    Article  Google Scholar 

  15. 15.

    Gutiérrez-Roig M, Segura C, Duch J, Perelló J (2016) Market imitation and win-stay lose-shift strategies emerge as unintended patterns in market direction guesses. PLoS ONE

  16. 16.

    Vallès-Català T, Peixoto TP, Sales-Pardo M, Guimerà R (2018) Consistencies and inconsistencies between model selection and link prediction in networks. Phys Rev E 97:062316.

    Article  Google Scholar 

  17. 17.

    Guimerà R, Llorente A, Moro E, Sales-Pardo M (2012) Predicting human preferences using the block structure of complex social networks. PLoS ONE 7(9):1–7.

    Article  Google Scholar 

  18. 18.

    Peixoto TP (2018) Bayesian stochastic blockmodeling. Advances in network clustering and blockmodeling. Wiley, New York

    Google Scholar 

  19. 19.

    White HC, Boorman SA, Breiger RL (1976) Social structure from multiple networks. I. Blockmodels of roles and positions. Am J Sociol 81(4):730–780

    Article  Google Scholar 

  20. 20.

    Holland PW, Laskey KB, Leinhardt S (1983) Stochastic blockmodels: First steps. Soc Netw 5:109–137

    MathSciNet  Article  Google Scholar 

  21. 21.

    Nowicki K, Snijders TAB (2001) Estimation and prediction for stochastic blockstructures. J Am Stat Assoc 96:1077–1087

    MathSciNet  Article  Google Scholar 

  22. 22.

    Guimerà R, Sales-Pardo M (2009) Missing and spurious interactions and the reconstruction of complex networks. Proc Natl Acad Sci USA 106(52):22073–22078.

    Article  Google Scholar 

  23. 23.

    Guimerà R, Sales-Pardo M (2011) Justice blocks and predictability of U.S. Supreme Court votes. PLoS ONE 6(11):27188.

    Article  Google Scholar 

  24. 24.

    Yen T-C, Larremore DB (2020) Community detection in bipartite networks with stochastic block models. Phys Rev E 102:032309

    MathSciNet  Article  Google Scholar 

  25. 25.

    Airoldi EM, Blei DM, Fienberg SE, Wing EP (2008) Mixed membership stochastic blockmodels. J Mach Learn Res 9:1981–2014

    MATH  Google Scholar 

  26. 26.

    Guimera R, Llorente A, Sales-Pardo M (2012) Predicting human preferences using the block structure of complex social networks. PLoS ONE 7(9)

  27. 27.

    Godoy-Lorite A, Guimera R, Moore C, Sales-Pardo M (2016) Accurate and scalable social recommendation using mixed-membership stochastic block models. Proc Natl Acad Sci 113(50):14207–14212

    Article  Google Scholar 

  28. 28.

    Tarrés-Deulofeu M, Godoy-Lorite A, Guimerà R, Sales-Pardo M (2019) Tensorial and bipartite block models for link prediction in layered networks and temporal networks. Phys Rev E 99:032307.

    Article  Google Scholar 

  29. 29.

    McGhan CLR, Nasir A, Atkins EM (2015) Human intent prediction using markov decision processes. J Aerosp Inform Syst 12.

  30. 30.

    Lin H, Chen W (2014) Human intention recognition using Markov decision processes. In: CACS international automatic control conference (CACS 2014), pp 340–343.

    Chapter  Google Scholar 

  31. 31.

    Karami A-B, Jeanpierre L, Mouaddib A-I (2009) Partially observable Markov decision process for managing robot collaboration with human. In: 21st international conference on tools with artificial intelligence (ICTAI)

    Google Scholar 

  32. 32.

    Schmidt MFH, Butler LP, Heinz J, Tomasello M (2016) Young children see a single action and infer a social norm: promiscuous normativity in 3-year-olds. Psychol Sci

  33. 33.

    Matsen FA, Novak MA (2004) Win–stay, lose–shift in language learning from peers. Proc Natl Acad Sci 101

  34. 34.

    Imhof LA, Fudenberg D, Novak MA (2007) Tit-for-tat or win-stay, lose-shift? J Theor Biol 247:574–580

    MathSciNet  Article  Google Scholar 

  35. 35.

    Salathé M (2016) Nature in Code. Leanpub

  36. 36.

    Naomi K, Matsuda N (2015) Win-stay lose-shift strategy in formation changes in football. EPJ Data Sci 4(9)

  37. 37.

    Halkjelsvik T, RiseFirst J (2014) Persistence motives in irrational decisions to complete a boring task. Pers Soc Psychol Bull 41.

  38. 38.

    Muthukrishnan AV, Wathieu L (2007) Superfluous choices and the persistence of preference. J Consum Res 33:454–460.

    Article  Google Scholar 

  39. 39.

    Hofman JM, Sharma A, Watts DJ (2017) Prediction and explanation in social systems. Science 355(6324):486–488.

    Article  Google Scholar 

Download references


RG, JD and MS-P acknowledge the support of MINECO through awards FIS2016-78904-C3-1-P and PID2019-106811GB-C31.

Author information




GPM performed technical work, interpreted the results, wrote the article. SCL helped the technical work, interpreted the results, wrote the article. JD gathered the dataset. RG interpreted the results. MSP interpreted the results, wrote the article. All authors read and approved the final manuscript.

Corresponding authors

Correspondence to Gaël Poux-Médard or Marta Sales-Pardo.

Ethics declarations

Competing interests

The authors declare that they have no competing interests.

Supplementary Information

Below is the link to the electronic supplementary material.


Supplementary for: complex decision-making strategies in a stock market experiment explained as the combination of few simple strategies. The file is in a PDF format (PDF 3.3 MB)

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Poux-Médard, G., Cobo-Lopez, S., Duch, J. et al. Complex decision-making strategies in a stock market experiment explained as the combination of few simple strategies. EPJ Data Sci. 10, 26 (2021).

Download citation


  • Stochastic block model
  • Decision making process
  • Human behavior
  • Choice mechanisms