Introduction

Coronavirus (COVID-19) is recognized as a significant health crisis that has adversely affected the well-being of global economies (Baker et al. 2020; Smales 2021; Debata et al. 2021). First identified in December 2019 as a highly fatal and contagious disease, it was declared a public health emergency by the World Health Organization (WHO) (WHO 2020; Baker et al. 2020; Altig et al. 2020; Smales 2021; Li et al. 2020). The outbreak swiftly spread across 31 provinces, municipalities, and autonomous regions in China, eventually evolving into a severe global pandemic that significantly impacted the global economy, particularly equity markets and social development (WHO 2020; Kazmi et al. 2020; Li et al. 2020). Since the early 2020 emergence of COVID-19 symptoms, the pandemic has caused considerable market decline and volatility in stock returns, significantly impacting the prosperity of world economies (Rahman et al. 2022; Soltani et al. 2021; Rubesam and Júnior 2022; Debata et al. 2021; Baker et al. 2020; Altig et al. 2020). This situation has garnered the attention of many policymakers and economists since its classification as a public health emergency.

Pakistan’s National Command and Operation Centre reported its first two confirmed COVID-19 cases on February 26, 2020. Following this, the Pakistan Stock Exchange experienced a significant downturn, losing 2266 points and erasing Rs. 436 billion in market equity. Foreign investment saw a notable decline, with stocks worth $22.5 million contracting sharply. By the end of February 2020, stock investments totaling $56.40 million had been liquidated. This dramatic drop in equity markets is attributed to the global outbreak of the COVID-19 pandemic (Khan et al. 2020). Additionally, for the first time in 75 years, Pakistan’s economy underwent its most substantial contraction in economic growth, recording a GDP growth rate of −0.4% in the first nine months. All three sectors of the economy—agriculture, services, and industry—fell short of their growth targets, culminating in a loss of one-third of their revenue. Exports declined by more than 50% due to the pandemic. Economists have raised concerns about a potential recession as the country grapples with virus containment efforts (Shafi et al. 2020; Naqvi 2020). Consequently, the rapid spread of COVID-19 has heightened volatility in financial markets, inflicted substantial losses on investors, and caused widespread turmoil in financial and liquidity markets globally (Zhang et al. 2020; Goodell 2020; Al-Awadhi et al. 2020; Ritika et al. 2023). This uncertainty has been exacerbated by an increasing number of positive COVID-19 cases.

Since the magnitude of the COVID-19 outbreak became evident, capital markets worldwide have been experiencing significant declines and volatility in stock returns, affected by all new virus variants despite their effective treatments (Hong et al. 2021; Rubesam and Júnior 2022; Zhang et al. 2020). Previous studies have characterized COVID-19 as a particularly devastating and deadly pandemic, severely impacting socio-economic infrastructures globally (Fernandes 2020). The pandemic has disrupted trade and investment activities, leading to imbalances in equity market returns (Xu 2021; Shehzad et al. 2020; Zaremba et al. 2020; Baig et al. 2021). In response to the COVID-19 outbreak, various governments, including Pakistan’s, have implemented unprecedented and diverse measures. These include restricting the mobility of the general public and commercial operations, and implementing smart or partial lockdowns, all aimed at mitigating the pandemic’s impact on global economic growth (Rubesam and Júnior 2022; Zaremba et al. 2020).

Investment decisions become notably complex and challenging when influenced by behavioral biases (Pompian 2012). In this context, numerous studies have sought to reconcile various behavioral finance theories with the notion of investors as rational decision-makers. One prominent theory is the Efficient Market Hypothesis, which asserts that capital markets are efficient when decisions are informed by symmetrical information among participants (Fama 1991). Yet, in reality, individual investors often struggle to make rational investment choices (Kim and Nofsinger 2008), as their decisions are significantly swayed by behavioral biases, leading to market inefficiencies. These biases, including investor sentiment, overconfidence, over/underreaction, and herding behavior, are recognized as widespread in human decision-making (Metawa et al. 2018). Prior research has identified various behavioral and psychological biases—such as loss aversion, anchoring, heuristic biases, and the disposition effect—that cause investors to stray from rational investment decisions. Moreover, investors’ responses to COVID-19-related news, like infection rates, vaccine developments, lockdowns, or economic forecasts, often reflect behavioral biases such as investor sentiment, overconfidence, over/underreaction, or herding behavior towards short-term events, thereby affecting market volatility (Soltani and Boujelbene 2023; Dash and Maitra 2022). These biases may have a wide applicability across different markets, regardless of specific cultural or regulatory differences. Consequently, we posit that these four behavioral biases, in the context of COVID-19, are key factors in reducing vulnerability in investment decisions (Dermawan and Trisnawati 2023), especially for individual investors who are more susceptible than in a typical investment environment (Botzen et al. 2021; Talwar et al. 2021). Therefore, understanding these behavioral biases—such as investor sentiment, overconfidence, over/underreaction, or herding behavior—during the COVID-19 pandemic is crucial, as no previous epidemic has demonstrated such profound impacts of behavioral biases on investment decisions (Baker et al. 2020; Sattar et al. 2020).

Numerous studies have explored the impact of behavioral biases, including investor sentiment, overconfidence, over/under-reaction, and herding behavior, on investment decisions (Metawa et al. 2018; Menike et al. 2015; Nofsinger and Varma 2014; Qadri and Shabbir 2014; Asaad 2012; Kengatharan and Kengatharan 2014). Recent literature has also shed light on the effects of the COVID-19 pandemic on financial and precious commodity markets (Gao et al. 2023; Zhang et al. 2020; Corbet et al. 2020; Baker et al. 2020; Mumtaz and Ahmad 2020; Ahmed et al. 2022; Hamidon and Kehelwalatenna 2020). However, academic research specifically addressing the moderating role of COVID-19 pandemic information sharing on behavioral biases remains limited. It has been observed that global pandemics, such as the Ebola Virus Disease (EVD) and Severe Acute Respiratory Syndrome (SARS), significantly influence stock market dynamics, sparking widespread fear among investors and leading to market uncertainty (Del Giudice and Paltrinieri 2017; He et al. 2020). This study contributes to the field by examining how behavioral biases, such as investor sentiment, overconfidence, over/under-reaction, and herding behavior, are influenced by the unique circumstances of the COVID-19 crisis. Furthermore, this research provides novel insights into real-time investor behavior and policymaking, thus advancing the academic debate on the role of COVID-19 pandemic information sharing within behavioral finance.

The primary goal of this study is to explore the impact of the COVID-19 crisis on behavioral biases and their effect on investment decisions. Additionally, it aims to assess how various socio-demographic factors influence investment decision-making. These factors include age, occupation, gender, educational qualifications, type of investor, investment objectives, reasons for investing, preferred investment duration, and considerations prior to investing, such as the safety of the principal, risk level, expected returns, maturity period, and sources of investment advice. We hypothesize that these factors significantly influence investment decisions, and our analysis endeavors to investigate the relationship between these factors and investment behavior. By thoroughly examining these variables, the study aims to shed light on the role socio-demographic factors play in investment behavior and enhance the understanding of the investment decision-making process. Additionally, the study seeks to conduct a cluster analysis to identify hierarchical relationships and causality, alongside an agent-based learning model that illustrates the susceptibility of low-income and younger age groups to herding behavior. The article provides the codes and outcomes of the model.

The study will commence with an introduction that outlines the scope and significance of the research. Following this, a literature review will be provided, along with the development of hypotheses concerning the behavioral biases affecting investment decisions and the role of socio-demographic factors in shaping investment behavior. The methodology section will detail the research approach, data collection process, variables considered for analysis, and the statistical methods applied. Subsequently, the results section will present findings from the regression and moderating analyses, cluster analysis, and the agent-based learning model. This will include a detailed explanation of the model codes and their interpretations. The discussion section will interpret the study’s results, highlighting their relevance to policymakers, financial advisors, and individual investors. The article will conclude by summarizing the main discoveries and offering suggestions for further inquiry in this domain.

Literature review and development of hypotheses

Invsetor sentiments and investment decisions

Pandemic-driven sentiments play a crucial role in determining market returns, making it imperative to understand pandemic-related sentiments to predict future investor returns. Consequently, we posit that the sharing of COVID-19 pandemic information is a critical factor influencing investor sentiments towards investment decisions (Li et al. 2021; Anusakumar et al. 2017; Zhu and Niu 2016; Jiang et al. 2021). Generally, investors’ sentiments refer to their beliefs, anticipations, and outlooks regarding future cash flows, which are significantly influenced by external factors (Baker and Wurgler 2006). Ding et al. (2021) define investor sentiment as the collective attitude of investors towards a particular market or security, reflected in trading activities and price movements of securities. A trend of rising prices signals bullish sentiments, while decreasing prices indicate bearish investor sentiment. These sentiments, including emotions and beliefs about investment risks, notably affect investors’ behavior and yield (Baker and Wurgler 2006; Anusakumar et al. 2017; Jansen and Nahuis 2003). Sentiment reacts to stock price news (Mian and Sankaraguruswamy 2012), with stock prices responding more positively to favorable earnings news during periods of high sentiment than in low sentiment periods, and vice versa. This sentiment-driven reaction to share price movements is observed across all types of stocks (Mian and Sankaraguruswamy 2012). Furthermore, research indicates that market responses to earnings announcements are asymmetrical, especially in the context of pessimistic investor sentiments (Jiang et al. 2019). Such reactions were notably pronounced during COVID-19 pandemic news, where sentiments such as fear, greed, or optimism significantly influenced market dynamics (Jiang et al. 2021). Thus, information related to the COVID-19 pandemic emerges as a valuable resource for forecasting future returns and market volatility, ultimately affecting investment decision-making (Debata et al. 2021).

Overconfidence and investment decision

Standard finance theories suggest that investors aim for rational decision-making (Statman et al. 2006). However, their judgments are often swayed by personal sentiments or cognitive errors, leading to overconfidence (Apergis and Apergis 2021). Overconfidence in investing can be described as an inflated belief in one’s financial insight and decision-making capabilities (Pikulina et al. 2017; Lichtenstein and Fischhoff 1977), or a tendency to overvalue one’s skills and knowledge (Dittrich et al. 2005). This results in investors perceiving themselves as more knowledgeable than they are (Moore and Healy 2008; Pikulina et al. 2017).

Overconfidence has been categorized into overestimation, where investors believe their abilities and chances of success are higher than actual, and over-placement, where individuals see themselves as superior to others (Moore and Healy 2008). Such overconfidence affects investment choices, leading to potentially inappropriate high-risk investments (Pikulina et al. 2017). Overconfident investors often attribute success to personal abilities and failures to external factors (Barber and Odean 2000; Tariq and Ullah 2013). Overconfidence also leads to suboptimal decision-making, especially under uncertainty (Dittrich et al. 2005).

Behavioral finance research shows that individual investors tend to overestimate their chances of success and underestimate risks (Wei et al. 2011; Dittrich et al. 2005). Excessive overconfidence prompts over-investment, whereas insufficient confidence causes under-investment; moderate confidence, however, leads to more prudent investing (Pikulina et al. 2017). The lack of market information often triggers this scenario (Wang 2001). Amidst recent market anomalies, COVID-19 information has significantly impacted investors’ overconfidence in their investment decisions. Studies have shown that overconfident investors underestimate their personal risk of COVID-19 compared to the general risk perception (Bottemanne et al. 2020; Heimer et al. 2020; Boruchowicz and Lopez Boo 2022; Druica et al. 2020; Raude et al. 2020). Overconfidence may lead to adverse selection and undervaluing others’ actions, underestimating the likelihood of loss due to inadequate COVID-19 information (Hossain and Siddiqua 2022). Consequently, this study hypothesizes that certain exogenous factors, integral to COVID-19 information sharing, may moderate investment decisions in the context of investor overconfidence.

Over/under reaction and investment decision

The Efficient Market Hypothesis (EMH) suggests that investors’ attempts to act rationally are based on the availability of market information (Fama 1998; Fama et al. 1969; De Bondt 2000). However, psychological biases in investors systematically respond to unwelcome news, leading to overreaction and underreaction, thus challenging the notion of market efficiency (Maher and Parikh 2011; De Bondt and Thaler 1985). Overreaction and underreaction biases refer to exaggerated responses to recent market news, resulting in the overbuying or overselling of securities in financial markets (Durand et al. 2021; Spyrou et al. 2007). Barberis et al. (1998) identified both underreaction and overreaction as pervasive anomalies that drive investors toward irrational investment decisions. Similarly, Hirshleifer (2001) noted that noisy trading contributes to overreaction, which in turn leads to excessive market volatility.

The impact of the COVID-19 outbreak extends far beyond the loss of millions of lives, disrupting financial markets from every angle (Zhang et al. 2020; Iqbal and Bilal 2021; Tauni et al. 2020; Borgards et al. 2021). Market reactions have been significantly shaped by COVID-19 pandemic information sharing, affecting investors’ decisions (Kannadas 2021). Recent studies have found that investors’ biases in evaluating the precision and predictive accuracy of COVID-19 information can lead to overreactions and underreactions (Borgards et al. 2021; Xu et al. 2022; Kannadas 2021). Furthermore, research documents the growing influence of COVID-19 information sharing on market reactions worldwide, including in the US, Asian, European, and Australian markets (Xu et al. 2022; Nguyen et al. 2020; Nguyen and Hoang Dinh 2021; Naidu and Ranjeeni 2021; Heyden and Heyden 2021), indicating that market reactions, characterized by non-linear behavior, are driven by investors’ beliefs.

Previous literature has scarcely explored the role of investors’ overreaction and underreaction in decision-making. Recently, emerging research has begun to enrich the literature by examining the moderating role of COVID-19 pandemic information sharing.

Herding behavior and investment decision

According to the assumptions of Efficient Market Hypothesis (EMH), optimal decision-making is facilitated by the availability of market information and stability of stock returns (Fama 1970; Raza et al. 2023). However, these conditions are seldom met in reality, as decisions are influenced by human behavior shaped by socio-economic norms (Summers 1986; Shiller 1989). Behavioral finance research suggests that herding behavior plays a significant role in the decline of asset and stock prices, implying that identifying herding can aid investors in making more rational decisions (Bharti and Kumar 2022; Jiang et al. 2022; Jiang and Verardo 2018; Ali 2022). Bikhchandani and Sharma (2000) define herding as investors’ tendency to mimic others’ trading behaviors, often ignoring their own information. It is essentially a group dynamic where decisions are irrationally based on others’ information, overlooking personal insights, experiences, or beliefs (Bikhchandani and Sharma 2000; Huang and Wang 2017). Echoing this, Hirshleifer and Hong Teoh (2003) argue that herding is characterized by investment decisions being influenced by the actions of others.

The sharp market declines prompted by events such as the COVID-19 pandemic raise questions about its influence on investors’ herding behaviors (Rubesam and Júnior 2022; Mandaci and Cagli 2022; Espinosa-Méndez and Arias 2021). Christie and Huang (1995) observed that investor herding becomes more evident during market uncertainties. Hwang and Salmon (2004) noted that investors are less likely to exhibit herding during crises compared to stable market periods when confidence in future market prospects is higher. The COVID-19 pandemic, as a major market disruptor, necessitates that investors pay close attention to market fundamentals before making investment decisions. Recent studies suggest that an overload of COVID-19 information could lead to irrational decision-making, potentially challenging the EMH by influencing herding behavior (Jiang et al. 2022; Mandaci and Cagli 2022). This highlights the importance for investors to be aware of market information asymmetry changes, such as those triggered by the COVID-19 outbreak, which could negatively impact their investment portfolios by altering their herding tendencies. This effect may be more pronounced among individual investors than institutional ones (Metawa et al. 2018). A yet unexplored area is the extent to which COVID-19 pandemic information sharing amplifies the herding behavior among investors during investment decision-making processes (Mandaci and Cagli 2022).

COVID-19 pandemic information sharing moderating the relationship between behavioral biases and investment decisions

Recent research indicates that the COVID-19 pandemic has notably influenced behavioral biases among investors, affecting their decision-making processes (Betthäuser et al. 2023; Vasileiou 2020). Since the pandemic’s onset, investors have shown increased sensitivity to pandemic-related news or developments, leading to intensified behavioral biases. This heightened sensitivity poses challenges to investors’ abilities to respond effectively. Specifically, information related to economic uncertainty, infection rates, and vaccination progress has shifted investor sentiment regarding risk perception (Gao et al. 2023). Additionally, pandemic news has altered the risk perception of overconfident investors, who previously may have underestimated the risks associated with COVID-19 (Bouteska et al. 2023). The increased uncertainty and market volatility triggered by COVID-19 news have also prompted investors to adapt their reactions based on new information, potentially fostering more rational decision-making (Jiang et al. 2022). The rapid spread of COVID-19-related news has been shown to diminish mimicry in investment decisions (Nguyen et al. 2023). This indicates that viral news about the pandemic makes investors more discerning regarding risk perceptions and investment strategies, moving away from mere herd behavior. Based on this discussion, the study proposes that COVID-19 pandemic information sharing acts as a moderating factor in the relationship between behavioral biases and investment decisions.

Sociodemographic factors and investment decision

The influence of demographic factors like gender, age, income, and marital status on investor behavior is well-documented in financial literature. However, examining these relationships within specific geographical contexts—such as countries, regions, states, and provinces—reveals that cultural values, beliefs, and experiences may blur the distinctions between human and cognitive biases in terms of their nuanced impacts. Evidence shows that certain demographic groups, particularly young male investors with lower portfolio values from regions less developed in terms of education and income, are more prone to overconfidence and familiarity bias in their trading activities. Conversely, investors with higher education levels and female investors are inclined to trade less frequently, resulting in better investment returns (Barber and Odean 2000; Gervais and Odean 2001; Glaser and Weber 2007).

This study’s findings further suggest that with increased stock market experience, investors tend to discount emotional factors, leading to more rational investment choices. Nonetheless, experience alone does not appear to markedly influence the decision-making process among investors (Al-Hilu et al. 2017; Metawa et al. 2019).

In summary, demographic variables such as age, gender, and education significantly impact investment decisions, especially when considered alongside behavioral aspects like investor sentiment, overconfidence, and herd behavior. Gaining insight into these dynamics is crucial for investors, financial advisors, and policymakers to devise effective investment strategies and enhance financial literacy.

Research methodology

Data and sampling

The research methodology outlines the strategy for achieving the study’s objectives. This research adopted a quantitative approach, utilizing a survey method (questionnaire) to examine the behavioral biases of individual investors in Pakistan during the COVID-19 pandemic. The target population comprised individual investors from Punjab province, specifically those interested in capital investments. Data were collected through convenient sampling techniques. A total of 750 questionnaires were distributed via an online survey (Google Form) to investors in four major cities of Punjab province: Karachi, Lahore, Islamabad, and Faisalabad. Initially, 257 respondents completed the survey following follow-up reminder emails. Out of these, 223 responses were deemed usable, yielding a valid response rate of 29.73% for further analysis (Saunders et al. 2012).

To mitigate potential biases during the data collection process, we conducted analyses for non-response and common method biases. Non-response bias, which arises when there is a significant difference between early and late respondents in a survey, was addressed by comparing the mean scores of early and late respondents using the independent samples t-test (Armstrong and Overton 1977). Results (see Table 1) indicated no statistically significant (p > 0.05) difference between early and late responses, suggesting that response bias was not a significant issue in the dataset.

Table 1 Non-response biasness.

Furthermore, to assess the potential threat of common method variance, we applied Harman’s single-factor test, a widely used method to evaluate common method biases in datasets (Podsakoff et al. 2003). This technique is aimed at identifying systematic biases that could compromise the validity of the scale. Through exploratory factor analysis (EFA) conducted without rotation, it was determined that no single factor accounted for a variance greater than the threshold (i.e., 50%). Consequently, common method variance was not considered a problem in the dataset, ensuring the reliability of the findings.

Figure 1 illustrates the framework of the model established for regression and moderating analyses that reveal the interactions between behavioral biases, investment decisions and COVID-19 pandemic information sharing.

Fig. 1: Research model.
figure 1

Covid-19 pandemic informing sharing.

Measures for behavioral biases

A close-ended questionnaire based on five-point Likert measurement scales was prepared scaling (1= “strongly disagree” to 5= “strongly agree”) to operationalize the behavioral biases of investors. The first predictor is investor sentiments. It refers to investors’ beliefs and perspectives related to future cash flows or discourses of specific assets. It is a crucial behavioral factor that often drives the market movements, especially during pandemic. We used the modified 5-items scale from the study of (Metawa et al. 2018; Baker and Wurgler 2006). Second important behavioral factor is overconfidence, which measured the tendency of decision-makers to unwittingly give excessive weight to the judgment of knowledge and correctness of information possessed and ignore the public information (Lichtenstein and Fischhoff 1977; Metawa et al. 2018). This construct was measured by using the 3-items scale developed by Dittrich et al. (2005). In line with the studies of (see for example (De Bondt and Thaler 1985; Metawa et al. 2018), we opted the 4-items scale to measure the over/under reactions. It illustrates that investors systematically overreact to unexpected news, and this leads to the violation of market efficiency. They conclude that investors attach great importance to past performance, ignoring trends back to the average of that performance (Boubaker et al. 2014). Last, herding behavior effect means theoretical set-up suggesting that investment managers are imitating the strategy of others despite having exclusive information. Such managers prefer to make decisions according to the connected group to avoid the risk of reputational damage (Scharfstein and Stein 1990). In sense, a modified scale was anchored to examine the herd behavior of investors from the studies of Bikhchandani and Sharma (2000) and Metawa et al. (2018).

Measures for COVID-19 pandemic information sharing

To assess the moderating effect of COVID-19 pandemic information sharing, it was examined in terms of uncertainty, fear, and perceived risk associated with the virus (Kiruba and Vasantha 2021). Previous studies indicate that COVID-19 news and developments have markedly affected the behavioral biases of investors (Jiang et al. 2022; Nguyen et al. 2023). To this end, an initial scale was developed to measure the moderating effect of COVID-19 pandemic information sharing. The primary reason for creating a new scale was that existing scales lacked clarity and were not specifically designed to assess how anchoring behavioral biases affect investment decisions. Subsequently, a self-developed scale was refined with input from a panel of experts, including two academicians specializing in neuro or behavioral finance and two investors with expertise in the capital market, to ensure the scale’s face and content validity regarding COVID-19 pandemic information sharing. They reviewed the scale in terms of format, content, and wording. Based on their comprehensive review, minor modifications were made, particularly aligning the scale with pandemic news and developments to accurately measure the impact of the COVID-19 health crisis on investors’ behavioral biases. Ultimately, a four-item scale, employing a five-point Likert scale (1= “strongly disagree” to 5= “strongly agree”), focusing on COVID-19 related aspects (e.g., infection rates, lockdowns, vaccine development, and government stimulus packages) was utilized to operationalize the construct of COVID-19 pandemic information sharing (Bin-Nashwan and Muneeza 2023; Li and Cao 2021).

  1. 1.

    I believe that increasing information about rate of COVID-19 infections influenced my investment decisions.

  2. 2.

    I believe that increasing information about COVID-19 lockdowns influenced my investment decisions.

  3. 3.

    I believe that increasing information about COVID-19 vaccinations development, influenced my investment decisions, and

  4. 4.

    I believe that increasing information about government stimulus packages influenced my investment decisions.

Measures for investment decisions

To measure investment decision, the modified five points Likert scale ranging from (1= “strongly disagree” to 5= “strongly agree”) has been opted from the study of Metawa et al. (2018).

Hypotheses of study

The hypotheses of the study regarding regression analysis and moderating analyses are as follows in Table 2:

Table 2 The hypotheses of the study.

The hypotheses outlined above were tested using regression analyses and moderating analyses. To reveal the clustering tendencies of investors exhibiting similar behaviors, cognitive biases, and sociodemographic variables, the feature importance values were investigated using K-means clustering analyses. Furthermore, findings and recommendations were provided to policymakers using agent-based models to develop policy suggestions within the scope of these hypotheses, offering insights for academic purposes.

Demographic profile of respondents

Table 3 provides a brief demographic profile of respondents.

Table 3 Demographic profile of respondents.

Based on the percentages presented in Table 3, the study primarily focuses on a specific demographic profile. Most participants were 20–30 years old (61.0%) with a higher educational background, particularly a master’s degree (67.3%). They were mostly salaried individuals (56.5%), male (61.0%), and identified as seasonal investors (63.7%). The investment objective of this group was mostly focused on growth and income (37.2%), while wealth creation (41.3%) was their primary purpose for investing. They preferred to invest equally in medium-term (43.5%) and long-term (28.3%) periods and considered high returns (38.6%) as the primary factor before investing. They received investment advice primarily from family and friends (44.8%) and social media (29.6%). Overall, the study indicates that the sample consisted of younger, male, salaried individuals with higher education levels who rely on personal networks and social media for investment advice. Their investment objectives are focused on wealth creation through growth and income, with an equal preference for medium and long-term investments.

Analysis and results

Descriptive summary

Table 4 outlines the measures used to evaluate the constructs of the study, detailing the number of items for each construct, mean values, standard deviations, zero-order bivariate correlations among the variables, and Cronbach’s Alpha values. The evaluation encompasses a total of 29 items spread across six constructs: investor sentiments (5 items), overconfidence (3 items), over/under reaction (4 items), herding theory (3 items), investment decision (10 items), and COVID-19 information impact (4 items). The mean scores for these items fall between 3.535 and 3.779, with standard deviations ranging from 0.877 to 0.965.

Table 4 Mean, SD, bivariate correlation and Cronbach Alpha Values.

Parallel coordinates (see Figs. 25) visualization is employed as a method to depict high-dimensional data on a two-dimensional plane, proving particularly beneficial for datasets with a large number of features or attributes. This technique involves the use of vertical axes to represent each feature, connected by horizontal lines that represent individual data points. This visualization method facilitates the identification of patterns, detection of clusters or outliers, and discovery of correlations among the features. Therefore, parallel coordinates visualization is instrumental in analyzing complex datasets, aiding in the informed decision-making process based on the insights obtained.

Fig. 2: Covid-19 information sharing.
figure 2

Strongly disagree (CIS1) choice parallel coordinates.

Fig. 3: Covid-19 information sharing.
figure 3

Disagree (CIS2) choice parallel coordinates.

Fig. 4: Covid-19 information sharing.
figure 4

Agree (CIS3) choice parallel coordinates.

Fig. 5: Covid-19 information sharing.
figure 5

Strongly agree (CIS4) choice parallel coordinates.

The analysis of responses to the COVID-19 information sharing questions reveals a significant correlation with the second and fourth-level responses concerning cognitive biases, including investor sentiment, overconfidence, over/under reaction, and herding behavior. This observation leads to two key insights. Firstly, participants demonstrate an ability to perceive, respond to, and comprehend the nuances of their investment decisions as related to investor sentiment, overconfidence, over/under reaction, and herding behavior. Consequently, they show a propensity to make clear decisions, indicating agreement or disagreement in their responses. Secondly, it is noted that individuals who acknowledge being significantly influenced by COVID-19 news tend to adopt more balanced investment strategies concerning these cognitive biases. Additionally, younger individuals, particularly those self-employed or not professionally investing, who show a preference for long-term value investments, are more inclined to exhibit these tendencies.

The value of the Pearson correlation coefficient (r) was calculated to investigate the nature, strength and relationship between variables. The results of correlation analysis reveal that all the constructs positively correlated.

To investigate the interconnections among variables in the dataset, correlations were computed and illustrated through a network graph. The correlation matrix’s values served as the basis for edge weights in the graph, with more robust correlations depicted by thicker lines (see Fig. 6a). Each variable received a unique color, and connections showcasing higher correlations utilized a distinct color scheme to enhance visual clarity. This method offers a graphical depiction of the intricate relationships among various variables, facilitating the discovery of patterns and insights that might remain obscured within a conventional correlation matrix.

Fig. 6: Investigation of Interconnections Among Variables.
figure 6

a Correlation diagraphs and matrix. b Correlation diagraphs and matrix.

The correlation analysis revealed a pronounced relationship between cognitive biases (such as investor sentiments, overconfidence, herd behavior, and investment decisions), COVID-19 information sharing, and socio-demographic factors (including age group, occupation, gender, educational qualifications, type of investor, investment objectives, investment purposes, preferred investment duration, factors considered prior to investing, and sources of investment advice). A correlation matrix graph was constructed to further elucidate these correlations, assigning different colors to each variable for visual differentiation (see Fig. 6b). The thickness of the lines in the graph correlates with the strength of the relationships, indicating variables with high correlation more prominently.

These findings underscore the interconnected nature of the study variables, demonstrating that cognitive biases and socio-demographic factors exert a considerable impact on investment decisions. This analytical approach highlights the complexity of investor behavior and underscores the multifaceted influences on investment choices, providing valuable insights for understanding how various factors interact within the investment decision-making process.

Reliability test

For reliability test, the Cronbach alpha values were examined to check the internal consistency of the measure. The internal consistency of an instrument tends to indicate whether a metric or an indicator measure what it is intended to measure (Creswell 2009). The Cronbach’s alpha greater than 0.7 indicates that all the items or the questions regarding the respective variable are good, highly correlated and reliable. The calculated Cronbach coefficient value for Investor sentiments (alpha = 0.888), over confidence (alpha = 0.827), over/under reaction (alpha = 0.858), herding behavior theory (alpha = 0.741), Investment decision (alpha = 0.933) and COVID-19 (alpha = 0.782) indicates that all of the constructs are reliable.

Validity test

Validity refers to the extent to which an instrument accurately measures or performs what it is designed to measure (Kothari 2004). To ensure the validity of the questionnaire and its constructs, the researcher engaged in a comprehensive literature review, sought the advice of consultants, and incorporated feedback from other professionals in the field. Additionally, the concepts of convergent validity and discriminant validity were evaluated to further assess the instrument’s validity.

Convergent validity assesses the extent to which items that are theoretically related to a single construct are, in fact, related in practice (Wang et al. 2017). To determine convergent validity, factor loading, Average Variance Extracted (AVE), and Composite Reliability (CR) were calculated. According to Hair et al. (1998), factor loading values should exceed 0.60, composite reliability should be 0.70 or higher, and AVE should surpass 0.50 to confirm adequate convergent validity.

Table 5 demonstrates that all constructs utilized in this study surpass these threshold values, indicating strong convergent validity. This suggests that the items within each construct are consistently measuring the same underlying structure, reinforcing the validity of the questionnaire’s design and the constructs it aims to measure.

Table 5 Reliability and validity test.

Discriminant validity measures the degree that the concepts are distinct from each other (Bagozzi et al. 1991) and it is evident that if alpha value of a construct is greater than the average correlation of the construct with other variables in model, the existence of discriminant validity exist (Ghiselli et al. 1981).

Hypotheses testing

To examine the conditional moderating effect of COVID-19 on the influence of behavioral factors (investor sentiments, overconfidence, over/under reaction, and herding behavior) on investment decision-making, moderation analysis was conducted using the Process Macro (Model 1) for SPSS, as developed by Hayes, with bootstrapping samples at 95% confidence intervals. According to Hayes (2018), the analysis first explores the direct impact of the behavioral factors on investment decisions. Subsequently, it assesses the indirect influence exerted by the moderating variable (COVID-19). This two-step approach allows for a comprehensive understanding of how COVID-19 modifies the relationship between investors’ behavioral biases and their decision-making processes, shedding light on the extent to which the pandemic acts as a moderating factor in these dynamics.

For this study the mathematical model to test moderating role of COVID-19 pandemic information sharing can be explained as:

$$\begin{array}{l}{\rm{Y}}={{\rm{\beta }}}_{0}+{{\rm{\beta }}}_{1}{{\rm{X}}}_{1}+{{\rm{\beta }}}_{2}{{\rm{X}}}_{2}+{{\rm{\beta }}}_{3}{{\rm{X}}}_{3}+{{\rm{\beta }}}_{4}{{\rm{X}}}_{4}+{{\rm{\beta }}}_{1}({{\rm{X}}}_{1}\ast {\rm{COVID}}-19)+{{\rm{\beta }}}_{2}({{\rm{X}}}_{2}\ast {\rm{COVID}}-19)\\\quad\;\;\;+\,{{\rm{\beta }}}_{3}({{\rm{X}}}_{3}\ast {\rm{COVID}}-19)+{{\rm{\beta }}}_{4}({{\rm{X}}}_{4}\ast {\rm{COVID}}-19)+{\rm{\mu }}\end{array}$$

Y = Investment decisions (Dependent variable)

β0 = Intercept

X1 = Investment sentiments (Independent variable)

X2 = Overconfidence (Independent variable)

X3 = Over/under reaction (Independent variable)

X4 = Herding behavior (Independent variable)

β1X1 = Intercept of investors sentiments

β2X2 = Intercept of overconfidence

β3X3 = Intercept of over/under reaction

β4X4 = Intercept of herding behavior

(X1* COVID-19) = Investors’ sentiments and moderation effect of COVID-19 information

(X2 * COVID-19) = Overconfidence and moderation effect of COVID-19 information

(X3 * COVID-19) = Over/under reaction and moderation effect of COVID-19 information

(X4 * COVID-19) = Herding behavior and moderation effect of COVID-19 information

μ = Residual term.

Direct effect

In Table 6, the direct effect of the independent variables on the dependent variable demonstrates that the behavioral factors (investor sentiments, overconfidence, over/under reaction, and herding behavior) significantly influence investment decision (ID) with beta values of 0.961, 0.867, 0.884, and 0.698, respectively. The confidence interval (CI) values presented in Table 6 confirm these relationships are statistically significant. The positive and significant outcomes underline that behavioral factors critically impact investors’ decision-making attitudes. Consequently, Hypotheses 1, 2, 3, and 4 (H1, H2, H3, and H4) are accepted, affirming the substantial role of investor sentiments, overconfidence, over/under reaction, and herding behavior in shaping investment decisions.

Table 6 Results of direct & indirect effects (moderation analysis).

Indirect moderating effect

In the context of the COVID-19 pandemic and its associated risks, the impact of behavioral factors (investor sentiments, overconfidence, over/under reaction, and herding behavior) on investment decisions tends to diminish. The findings presented in Table 6 and illustrated in Fig. 7 indicate that COVID-19 information sharing significantly and negatively moderates the relationship between these factors and investment decisions, leading to the acceptance of Hypotheses 5, 6, 7, and 8 (H5, H6, H7, and H8). The negative beta values underscore that the presence of COVID-19 adversely influences investors’ behavior, steering them away from rational investment decisions. This demonstrates that the pandemic context acts as a moderating factor, altering how behavioral biases impact investment choices, ultimately guiding investors towards more cautious or altered decision-making processes.

Fig. 7: Path diagram.
figure 7

Moderating effect of Covid-19 pandemic information sharing.

K-means clustering analysis

K-means clustering analysis is utilized to uncover natural groupings within datasets by analyzing similarities between observations. This technique is especially beneficial for managing large and complex datasets as it reveals patterns and relationships among variables that may not be immediately evident. In this study, K-means clustering helps identify natural groupings based on socio-demographic factors, cognitive biases regarding investment decisions, and COVID-19 pandemic information sharing, thereby offering insights into the data’s underlying structure and identifying potential patterns or relationships among key variables.

The cluster analysis aims to ascertain the feature importance value of groups with similar investor behaviors, which is crucial for determining agents’ investment functions in subsequent agent-based modeling. Selecting the appropriate number of clusters in the K-means algorithm is essential, yet challenging, as different numbers of clusters can yield varying results (Li and Wu 2012).

Two prevalent methods for determining the optimal number of clusters are:

Elbow Method: This approach involves running the K-means algorithm with varying cluster numbers and calculating the total sum of squared errors (SSE) for each. SSE represents the squared distances of each data point from its cluster’s centroid. Plotting the SSE values against the number of clusters reveals a point known as the “elbow,” where the rate of SSE decrease markedly slows, indicating the optimal cluster number (Syakur et al. 2018).

Silhouette Analysis: Not mentioned directly in the narrative, but it’s another method that measures how similar an object is to its own cluster compared to other clusters. The silhouette score ranges from −1 to 1, where a high value indicates the object is well matched to its own cluster and poorly matched to neighboring clusters.

The sklearn library provides tools for implementing the elbow method and silhouette analysis. For example, the code snippet described applies the elbow method by varying the number of clusters from 1 to 10 and calculating SSE for each scenario. The optimal number of clusters is identified by selecting a value near the elbow point on the resulting plot.

After clustering, the analysis progresses by using the fit () method from sklearn’s K-Means class to cluster the data, determine each cluster’s center coordinates, and assign each data point to a cluster. Feature importance values can be calculated using the Extra Trees Classifier class from sklearn, and these values can be visualized through a line graph.

Finally, to illustrate the clusters’ membership to the CIS1, CIS2, CIS3, and CIS4 inputs as a color scale bar, the seaborn library is used (see Fig. 8 (top) and Fig. 8 (bottom)). This involves calculating the average membership values for each cluster and visualizing these averages, providing a clear depiction of how each cluster associates with the different inputs, enriching the analysis of investor behaviors and their responses to COVID-19 information sharing.

Fig. 8
figure 8

Elbow method sum of squared error class determination (top) and clustering analysis results (bottom).

After employing a network diagram constructed from a correlation matrix to elucidate the interrelationships among variables, and utilizing the Elbow method to ascertain the optimal number of clusters, the K-means clustering algorithm was applied (see Fig. 9). This approach successfully identified three distinct clusters, highlighting the variables that exerted a significant influence on these clusters. Notably, the COVID-19 pandemic information sharing variable, along with its corresponding CIS1, CIS2, CIS3, and CIS4 values, emerged as significant factors. The analysis indicated that overconfidence and overreaction were the predominant factors in crucial clustering, alongside cognitive biases and investment strategies that lead to similar behaviors among investors and varying levels of impact from COVID-19.

Fig. 9
figure 9

Cluster analysis feature importance value results.

Furthermore, sociodemographic factors such as age, occupation, and investor type were also identified as influential determinants. Leveraging these insights, policymakers and researchers can develop an agent-based model that incorporates herd behavior, along with age and income levels categorized by occupation, to effectively simulate market dynamics. This approach facilitates a comprehensive understanding of how different factors, particularly those related to the COVID-19 pandemic, influence investor behavior and market movements, thereby enabling the formulation of more informed strategies and policies.

An ingenious agent-based simulation for herding behavior

In this study, the findings of behavioral economics and finance research may contain results that are easy to interpret for policymakers but may involve certain difficulties in practical implementation. Specifically, for policymakers, an agent-based model has been created (see Appendix 1 for pseudo codes. In case, requested python codes are available). In a model consisting of 223 agents who trade on a single stock, prototypes of investors have been created based on the analysis presented here, and characteristics such as age group and income status, which are relatively easy to access or predict regarding their socio-demographic profiles, have been taken into account in the herd behavior function, considering the decision to follow the group or make independent decisions. Younger and lower-income agents were allowed to exhibit a greater tendency to follow the group, while 50 successful transactions were monitored to determine in which trend of stock price increase or decrease the balance of the most successful agent was increased or decreased (Gervais and Odean 2001).

In addressing the influence of age and income status on herding behavior, it is imperative to underscore the nuanced interplay between various socio-economic and psychological factors within our agent-based model framework. The model’s robustness stems from its capacity to simulate a range of investor behaviors by integrating key determinants such as investor sentiment, overconfidence, reaction to market events, and socio-demographic characteristics. Herein we expound on the contributory elements:

Investor Sentiment (IS1–IS5)

The model encapsulates the variability of investor sentiment, which oscillates with age and income, influencing individuals’ financial perspectives and risk propensities. Younger investors’ sentiment may tilt towards optimism driven by a more extensive investment horizon, while lower-income investors’ sentiment could lean towards caution, primarily driven by the pressing requirement for financial dsecurity (Baker and Wurgler 2007).

Overconfidence (OF1–OF5)

The tendency towards overconfidence is dynamically modeled, particularly among younger investors who may overrate their market acumen and predictive capabilities. This overconfidence may also manifest among lower-income investors as a psychological compensatory mechanism for resource inadequacy (Malmendier and Tate 2005).

Over/Under Reaction (OUR1–OUR5)

The model accounts for the influence of age and income on the velocity and extent of response to market stimuli. Inexperienced or financially restricted investors may be prone to overreactions due to a lack of market exposure or intensified economic strain (Daniel et al. 1998).

Herding Behavior (HB1–HB4)

Within the simulated environment, herding is more pronounced among younger investors, possibly due to peer influence, and among lower-income investors who may seek safety in conformity (Bikhchandani et al. 1992).

Investment Decision (ID1–ID10)

The model intricately reflects the complexities of investment decisions influenced by age-specific factors such as projected earnings and lifecycle influences. Investors with limited income may exhibit a predilection for security, swaying their investment choices (Yao and Curl 2011).

COVID-19 Information Sharing (CIS1–CIS4)

The pandemic era’s nuances are integrated into the model, acknowledging that younger investors could be more susceptible to digitally disseminated information, which, in turn, impacts their investment decisions. The credibility and source of information are also calibrated based on income levels (Shiller 2020).

Socio-demographic factors

  • Age: The model simulates younger investors’ reliance on the conduct of others, utilizing it as a heuristic substitute for experience (Dobni and Racine 2016).

  • Occupation: It captures how occupational background can broaden or restrict access to information and influence herding tendencies (Hong et al. 2000).

  • Gender: Gender disparities are incorporated, reflecting on investment styles where men may be more disposed to herding due to overconfidence (Barber and Odean 2001).

  • Qualification (Qualif.): The model acknowledges that higher education and financial literacy levels can curtail herding by fostering self-reliant decision-making (Lusardi and Mitchell 2007).

  • Investor Type (InvTyp): It differentiates between retail and institutional investors, noting that limited resources might push retail investors towards herding (Nofsinger and Sias 1999).

  • Investment Objective (InvObj): The model recognizes that short-term objectives might amplify herding as investors chase swift gains (Odean 1998).

  • Purpose: It contemplates the conservative herding behavior that is aligned with goals like retirement savings (Yao and Curl 2011).

  • Investment Horizon (Horizon): A lengthier investment horizon is modeled to potentially dampen herding tendencies (Kaustia and Knüpfer 2008).

  • Factors Considered Before Investing (factors): The model simulates a range of investment considerations, including risk tolerance and expected returns, which influence herding propensities (Shefrin and Statman 2000).

  • Source of Investment Advice (source): The influence of advice sources, such as analysts or financial media, on herding is also captured within the model (Tetlock 2007).

In conclusion, the agent-based model we present is meticulously designed to reflect the intricate fabric of financial market behavior. It is particularly attuned to the multi-layered aspects that drive herding, informed by empirical evidence and theoretical underpinnings that rigorously define the interrelations between investor demographics and market behavior. The aforementioned socio-economic and psychological facets provide a comprehensive backdrop against which the validity and consistency of the model are substantiated.

The following code has been prepared using Python programming language with the Mesa, Pandas, SciPy, NumPy, Random and Matplotlib libraries. This code simulates a herd behavior of stock traders in a simple market (Hunt and Thomas 2010; McKinney 2010; Harris et al. 2020; Virtanen et al. 2020; Van Rossum 2020; Hunter 2007). The simulation runs for 50-time steps, with the stock price and balance of each agent printed at each step. The decision-making process of agents in the simulation is stochastic, with agents randomly choosing to buy, sell, or follow the market trend based on their characteristics and decision-making strategy.

The Stock Trader class in the model symbolizes individual agents, each characterized by a unique ID, balance, and a stock price. These agents are equipped with a method to compute the current stock price. The step() function within each agent embodies their decision-making process, which is influenced by their current balance and the prevailing stock price. Agents have the option to buy, sell, or align with the market trend, reflecting various investment strategies.

The Herding Model class encapsulates the entire simulation framework. It generates a population of Stock Trader agents and progresses the simulation over a designated number of time steps. Within this class, the agent_decision() method orchestrates each agent’s decision-making, factoring in individual characteristics and strategies. The step() method, in turn, adjusts the stock price based on the aggregate current stock prices of all agents before executing the step() method for each agent, thereby simulating the dynamic nature of the stock market.

Socio-demographic factors, specifically age and income status, are integrated into the agent-based model simulations, drawing upon insights from Parallel Coordinates and Cluster Analysis as well as relevant literature. The simulation posits that agents of younger age and lower income are predisposed to mimicking the market trend, whereas other agents exhibit a propensity for independent decision-making. Given the stochastic nature of the decision-making process, the behavior of agents varies across different runs of the simulation, introducing an element of unpredictability.

At each time step, the simulation outputs the stock price and balance of each agent, offering a snapshot of the market dynamics at that moment. Figure 10 provides a flow diagram elucidating the operational framework of the model’s code, presenting a visual representation of how the simulation unfolds over time.

Fig. 10
figure 10

Flowchart of agent-based model.

This model architecture allows for the exploration of how socio-demographic characteristics influence investment behaviors within a simulated market environment, offering valuable insights into the mechanisms driving market trends and individual investor decisions.

Within our agent-based model (ABM), “performance” embodies multiple dimensions reflective of the agents’ investment outcomes, influenced by socio-demographic factors and behavioral biases. The provided pseudo-code conceptualizes the implementation of these facets in the model.

Metrics used to quantify agent performance

Balance trajectory

This primary indicator tracks the evolution of each agent’s financial balance over time, reflecting the impact of their buy, sell, or market trend-following decisions (Arthur 1991).

Decision strategy efficacy

Evaluates the effectiveness of an agent’s decision-making strategy (‘buy’, ‘sell’, or ‘follow’), influenced by socio-demographic variables such as age and income, as delineated in the agent_decision method (Tesfatsion and Judd 2006).

Market trend alignment

Assesses the correlation between an agent’s balance trajectory and overall market trends, indicating successful performance if an agent’s balance increases with market prices (Shiller 2003).

Risk management

Infers risk management skill from the volatility of balance changes, with less volatility indicating stable and potentially successful investment strategies (Markowitz 1952).

Wealth accumulation

Agents are ranked by their final balance at the simulation’s end to identify the most financially successful outcomes (De Long et al. 1990).

Adaptive behavior

The model evaluates agents’ adaptability to market price changes, revealing their capacity to capitalize on market movements (Gode and Sunder 1993).

Herding influence

Considers how herding behavior impacts financial outcomes, especially for younger and lower-income agents as programmed in the Herding Model class (Bikhchandani et al. 1992).

These performance metrics are quantified through agents’ balance and stock price histories, updated at each simulation step. These histories offer a time series analysis of financial trajectories, enabling pattern identification such as herding tendencies or the effects of overconfidence.

The model’s realism is enhanced by parameters like young_follow_factor and low_income_follow_factor, adjusting the propensity for herding among different socio-demographic groups. This inclusion allows the model to reflect real-world dynamics where age and income significantly impact investment performance.

In conclusion, our ABM presents a detailed framework for examining investment performance’s complex nature. It integrates behavioral economics and socio-demographic data, providing insights into investor behavior under simulated market conditions.

Characteristics of agents in the agent-based model

  1. 1.

    Demographics (age and income): Consistent with the focus of our study on socio-demographic factors, each agent is characterized by age and income parameters, which influence their investment behavior, particularly their propensity towards herding. Age and income are randomly assigned within realistic bounds reflecting the demographic distribution of typical investor populations.

  2. 2.

    Cognitive biases: Agents are imbued with behavioral attributes such as overconfidence, herding instinct, and over/under-reaction tendencies to market news, reflecting the psychological dimensions of real-world investors.

  3. 3.

    Investment strategy: Each agent follows a distinct investment strategy categorized broadly as ‘buy’, ‘sell’, or ‘follow’ (herding). The strategy is influenced by the agent’s demographic characteristics and cognitive biases.

  4. 4.

    Adaptability: Agents are capable of learning and adapting to market changes over time, simulating the dynamic and evolving nature of real-world investor behavior.

  5. 5.

    Social influence: Agents are influenced by other agents’ behaviors, especially under conditions conducive to herding, modeling the social dynamics of investment communities.

  6. 6.

    Wealth and portfolio: Agents have a variable representing their wealth, which fluctuates based on investment decisions and market performance. Their portfolio composition and changes therein are also tracked, offering insights into their risk-taking and diversification behaviors.

Significance of agent-based modeling

Agent-based modeling is a powerful tool that allows researchers to simulate and analyze complex systems composed of interacting agents. Its significance and utility in various fields, including economics and finance are profound:

  1. 1.

    Complexity and emergence: ABM can capture the emergent phenomena that arise from the interactions of many individual agents, providing insights into complex market dynamics that are not apparent at the individual level (Epstein and Axtell 1996).

  2. 2.

    Customizability and scalability: ABMs can be tailored to include various levels of detail and complexity, allowing for the simulation of systems ranging from small groups to entire markets (Tesfatsion and Judd 2006).

  3. 3.

    Experimental flexibility: ABMs facilitate virtual experiments that would be impractical or impossible in the real world, enabling researchers to explore hypothetical scenarios and policy implications (Gilbert and Troitzsch 2005).

  4. 4.

    Realism in behavioral representation: By incorporating cognitive biases and decision-making rules, ABMs can realistically represent human behavior, providing deeper behavioral insights than models assuming perfect rationality (Hommes 2006).

  5. 5.

    Policy analysis and forecasting: In economics and finance, ABMs are particularly useful for policy analysis, risk assessment, and forecasting, as they can incorporate a wide range of real-world factors and individual behaviors (LeBaron and Tesfatsion 2008).

By integrating these agent characteristics into our ABM and considering the broader implications of agent-based modeling, our study aims to provide nuanced insights into herding behavior among investors. We believe that our approach not only aligns with best practices in the field but also significantly contributes to the understanding of complex investment behaviors and market dynamics. We trust that this expanded description addresses the reviewer’s comment and underscores the robustness and relevance of our agent-based simulation approach.

Figure 11a, b panels display the balance changes of agents with respect to stock prices, age, and income status. By coding the balance increases and decreases as +1 and −1, respectively, and employing a line graph that matches the changes in stock prices, it has become possible to provide information about the agents’ performance. In panels a and b, it is observed that agents created after the age of 37.5 have been included in the higher income group on average, and during transitions of stock prices below 12.75 units, between 17 and 20 units, and between 26 and 27.50 units, the agents’ responses to price state changes are accompanied by noticeable transitions (increases and decreases) in their portfolio states, depending on age and income status.

Fig. 11: The balance changes of agent according to age, stock prices, and income status.
figure 11

a Agents’ performance. b Agents’ responses.

In Fig. 12, in the agent-based model’s 50 repeated simulations, at the 45th simulation, the stock price is 20.03 units, and the balance of agent number 74 reaches 911 units. The price-income-balance change graph for the agent throughout the 50 transactions is presented below.

Fig. 12
figure 12

Balance change according to stock price for agent 74.

Upon examining the descriptive statistics of the income for agent number 74, who diverges from the herding tendency profile of the model and is in the higher income group aged 40 and above, the highest balance value is 911 units, the lowest balance level is 732 units, the average is 799 units, and the standard deviation is 41 units. When the overall balance of the agents is investigated, it is observed that the average balance of the agents is around 84 units. Considering the existence of an agent with the lowest balance of −670 units, it can be concluded that agent number 74 has demonstrated a significantly superior performance.

Discussion and conclusion

The influence of behavioral biases on investors’ decision-making has yielded mixed findings in literature. Wan (2018) observed a positive impact of behavioral biases, considered forward-looking factors, on investment decisions. Conversely, Zulfiqar et al. (2018) noted a markedly negative impact of overconfidence on investment decisions. Similarly, Aziz and Khan (2016) explored the role of heuristic factors (representative, anchoring, overconfidence, and availability bases) and found them significantly influencing investment decision and performance. However, they reported that prospect factors (loss aversion, regret aversion, and mental accounting biases) had an insignificant impact on these outcomes.

These varied results may stem from a complex interplay of factors such as cultural differences, pandemic-related information, economic conditions, regulatory environments, historical context, and investors’ financial literacy levels, contributing to differences in how behavioral biases influence investment decisions across regions (Metawa et al. 2018).

This study contributes to the field of behavioral finance by revealing the moderating role of COVID-19 pandemic information sharing on the relationship between behavioral quirks and investment choices, specifically in the context of Pakistan. Key contributions include:

Investors’ sentiments

This study shows that COVID-19 pandemic information sharing significantly moderates the relationship between investors’ sentiments and their investment decisions, validating that pandemic-related information, such as infection rates and economic downturns, heavily influences investors’ sentiments and alters their risk perceptions (Anastasiou et al. 2022; Hsu and Tang 2022; Bin-Nashwan and Muneeza 2023; Gao et al. 2023; Sohail et al. 2020).

Overconfidence

It reveals how COVID-19 information reshapes overconfident investors’ risk perceptions, urging them to reassess their investment portfolios in light of the pandemic’s uncertainties and economic implications (Bouteska et al. 2023; Li and Cao 2021).

Over/under reaction

The study uncovers that the pandemic information moderates the relationship between over-under reaction and investment decisions, suggesting that investors adjust their reactions based on evolving pandemic information, leading to more informed and rational investment choices (Jiang et al. 2022).

Herd behavior

It finds that COVID-19 pandemic information significantly reduces herd behavior among investors, encouraging them to make rational decisions rather than blindly following the majority (Nguyen et al. 2023).

In conclusion, this study illustrates that the COVID-19 pandemic has significantly moderated the relationship between behavioral biases and investment decisions. Furthermore, clustering analyses and agent-based outcomes suggest that younger, less experienced agents prone to herding behavior exhibit a higher propensity for such behavior and demonstrate lower performance in agent-based models. These findings pave the way for further research into additional cognitive biases and socio-demographic variables’ effects on investment decisions.

Implications

This study contributes to the field of behavioral finance that COVID-19 pandemic information sharing significantly moderates the relationship between behavioral biases (e.g., investors’ sentiments, overconfidence, over/under reaction, and herd behavior) and investment decisions. Therefore, policy implications stem from findings are substantial, and thus addressing behavioral biases during COVID-19 pandemic to mitigate the market inefficiencies and promote better decision-making. First, this study suggests that investing in comprehensive financial education plans will enhance the financial literacy of investors and enable them to better recognize the behavioral biases during times of uncertainty and crises. Second, findings imply that accurate and transparent information sharing about COVID-19 pandemic can better mitigate the behavioral biases, especially government interventions (e.g., National Command and Coordination Centre) ensuring reliable information can lead the investors to make more rational and informed investment decisions during the time of uncertainty and crises. Last, findings provide insights to policy makers that pandemic news and developments significantly influenced behavioral biases of investment decisions (Khurshid et al. 2021). For example, news about number of causalities, infection rates, vaccine progress, government stimulus packages, or stock market downturns had immediate effects on behavioral biases especially when an investor is overconfidence, over/under reaction, and herd behavior. In this sense, enhancing information transparency about COVID-19 news in media can reduce the influence of sensationalized news on investor decisions.

Limitations and call for future research

This study significantly enhances the understanding of behavioral factors’ impact on investors’ decision-making processes, presenting important findings within the context of the COVID-19 pandemic. While these contributions are notable, the research is subject to certain limitations that pave the way for future exploration and deeper investigation into this complex field.

Firstly, the study underscores the necessity for further research to validate its results through larger sample sizes and a more diverse array of respondents. Adopting a longitudinal design could prove particularly insightful, enabling an analysis of behavioral biases across different stages of the pandemic and providing a dynamic perspective on how investor behaviors evolve over time.

In addition, there’s a highlighted opportunity for future studies to delve into the behaviors influencing institutional investor decisions within Pakistan. The complex decision-making processes and investment portfolios of institutional investors, coupled with challenges like data availability and the heterogeneity among institutions, present a fertile ground for investigation. Such research could unravel how various factors, including market conditions and macroeconomic assessments, impact institutional investment strategies.

The study also points out the need to broaden the investigation to include other potential behavioral factors beyond those focused on in the current research, such as loss aversion, personality traits, anchoring, and recency biases. Expanding the scope of behavioral factors examined could significantly enrich the behavioral finance field by offering a more comprehensive view of the influences on investment decisions.

Moreover, while the insights gained from a Pakistani context during the COVID-19 pandemic are invaluable, extending the research to include global (e.g., China, Japan, USA) and other emerging markets (e.g., BRICS) would enhance understanding of the universality or specificity of behavioral biases in investment decisions across various economic, cultural, and regulatory environments.

Lastly, the study’s reliance on quantitative data points to the potential benefits of incorporating qualitative data into future research. Undertaking case studies within specific securities brokerages or investment banks could provide an in-depth investigation of investor behavior, generating new insights that could inspire further research.

To support the development of more sophisticated agent-based models and to foster collaborative research efforts, the study makes its source code available to other researchers. This openness to collaboration promises to stimulate innovative approaches to understanding and modeling investor behavior across diverse contexts, contributing to the advancement of the behavioral finance field.