1. Introduction
Markets are complex and unpredictable in nature, and they are influenced by everything from economic signals to mental biases. Old-style models of finance tend to presume that investors make rational decisions, making the best use of the information at hand. But real-world markets often behave irrationally, and bubbles, crashes and volatility are all characteristics of markets not explicable by traditional economics. These delusional actions – such as overconfidence, herding and panic selling – produce market shocks that make it challenging for financial planners and policymakers to anticipate and reduce market disruptions. As an ABM has gained in popularity, it allows us to model the behaviour of agents in a complex system such as financial markets. ABM lacks presumptions of rationality, but instead of leaves agents to make decisions based on a combination of rules and adaptive behaviours. This portability allows ABM to take advantage of the complexity and non-linearity inherent in financial systems. Because psychological biases are introduced into the model, ABM enables a more realistic picture of how irrational actions affect market performance. RL is a part of machine learning that lets agents learn from their behaviour and change their strategies over time. In financial systems, RL has been applied to optimize trades, portfolios, and risk. In ABM, RL helps agents modify their behaviour in light of prior experiences, thus evolving the agent’s decision making capabilities in light of the market environment. This adaptive learning mode is important to emulate investor behavior, especially in high-risk environments. Also, Neural Networks (NNs), especially and deep learning models, have been used for financial modeling as they are able to recognize complex patterns and correlations within big datasets. NNs can analyze enormous amounts of historical market data and extract patterns to make more reliable predictions. As an addition to an ABM model, NNs can be added to the model to simulate the market, providing a more accurate and predictive picture of the way financial markets work. In this article, we propose a combination of ABM, RL and NNs to model investors in financial markets [1]. Simulations of varying investor behavior — from logical choices to highly irrational actions — help us to understand how irrationality influences market volatility and stability. The research further analyses the model predictive ability, a review on the capacity of Neural Networks to predict market movements in a variety of situations.
2. Literature Review
2.1. Agent-Based Modeling in Finance
ABM has become a popular technology in finance because it can represent highly complex, dynamic systems in which multiple agents interact and respond to one another. Agents are largely expected to be rational, making best choices possible given available information in conventional economic models. But ABM allow for something more pragmatic, taking into account the heterogeneity of agents and their varied strategies, assumptions and interactions. Throughout the years, ABM in finance has been applied to study crashes, bubbles, and volatility. Early ABM models concentrated almost exclusively on market microstructure — how buy and sell orders interacted to create prices. Behavioral components, including investor sentiment, herding and psychological biases, have been included in more recent models. These models also give an improved view of the dynamics of the market because they capture the non-linearities and feedback cycles that produce volatility and surprise. In addition, ABM enable the investigators to analyze how various market rules, regulations and structures might impact overall market behaviour, which older models fail to capture [2]. Figure 1 shows how an agent-based simulation system typically looks like in the financial sector. It depicts the different agents, such as ExchangeAgent, TradingAgent and LoggingAgent, and their relationship with each other and with the simulation structure [3]. TradingAgent, for example, connect to market books such as TimeProRataBook or PureProRataBook based on the process of placing and placing orders in a market. This is an elegant figure that demonstrates the dynamic nature of agent interactions and the fact that ABM’s financial systems are highly dynamic and all agents are able to learn from their surroundings, similar to irrational behavior in real markets.
Figure 1: Class Diagram of the Agent-Based Simulation System in Financial Markets (Source:Oxford.com)
2.2. Reinforcement Learning for Financial Decision-Making.
RL is a machine learning method where agents learn through trial and error to make decisions and then receive rewards or punishment. In the markets, RL has been successfully implemented in a variety of decision tasks across many decision processes, including trading optimization, portfolio management, and risk management. RL algorithms, for example, can be trained to make adjustments in buy and sell decisions depending on historical price action and market conditions in order to maximise long-term returns at the expense of risk. By continuously refining strategies from the previous trade, RL agents can keep up with changing market conditions by learning from past trades and losses [4]. Combining RL and ABM can enable better simulations of investor behaviour by enabling adaptive learning and uncertainty-based decision-making. This combination can be particularly powerful when it comes to emulating unreasonable behaviour, since agents can be taught to emulate common biases, like overconfidence or aversion to loss, observed in the real-world financial markets.
2.3. Neural Networks and Market Prediction
Neural networks (NNs), specifically deep learning algorithms, have proven useful in forecasting the financial markets as they are able to identify non-linear, complex patterns in huge amounts of data. NNs, unlike statistical methods, do not make any assumption about the relationships between variables, and therefore they are very adaptable and can uncover buried correlations in market data. NNs are frequently used in finance to predict stock price, market trends and investor behavior. Such models can analyze a mountain of historical information – price action, volume and macroeconomic indicators – to pick up on trends might be less obvious to humans [5]. From this data, NNs can learn to make more precise predictions that can prove beneficial for both retail traders and professional traders. Integrating neural networks into ABM increases the predictive power of the model, by generating realistic market scenarios that can replicate the impact of all these market conditions. For instance, a neural network can allow an ABM agent to understand minute changes in market sentiment or forecast the impact of macroeconomic events and therefore optimise the accuracy of the simulation.
3. Methodology
3.1. Overview of Agent-Based Modeling Framework
We use the agent-based model (ABM) to model the transactions of individual investors in a financial market. All agents are programmable with rules of behaviour drawn from economic theory and psychotherapy which capture the different responses of market actors under different circumstances. The simulation model a financial landscape in which players are acting on incomplete or manipulated information and the result is crazy market action (overreaction, panic selling, or speculative bubbles) [6]. In Table 1, we outline which agent types were used in the simulation, what behavioural rules they obey, and how they learn to learn from the market. I
Table 1: Model Parameters
Agent Type | Behavior Rules | Learning Mechanism |
ExchangeAgent | Market Order Handling | Reinforcement Learning |
TradingAgent | Trade Execution Strategy | Behavioral Adjustment |
LoggingAgent | Transaction Logging | Log Behavior |
BouchaudAgent | Market Prediction | Statistical Analysis |
AdaptiveOfferingAgent | Offer Adjustment | Adaptive Learning |
3.2. Integration of Reinforcement Learning
Agent-based approach is further enhanced with reinforcement learning (RL), where agents learn from each other’s experiences and learn new decisions in the future. Each agent gets rewarded for successful actions and punished for bad ones, much as human decisions are. This learning makes agents learn to trade better and manage the market movements more realistically. The inclusion of RL gives the model life, as agents can change their behaviour according to changing market dynamics. The simulation outcomes are listed in Table 2 showing the volatility of the market, the prevalence of bubbles and stability scores for several model runs [7].
Table 2: Simulation Results
Simulation Cycle | Market Volatility (%) | Bubbles Detected | Market Stability Rating |
1 | 12.5 | TRUE | 3.2 |
2 | 15.7 | FALSE | 4.1 |
3 | 14.2 | TRUE | 2.8 |
4 | 20.1 | TRUE | 1.9 |
5 | 18.3 | FALSE | 3.5 |
3.3. Neural Networks for Predictive Modeling
In order to make the model even more predictive, we use NNs to go through huge quantities of market data. These neural networks catch signals that may point deviance, or market change. Agents can train the NN on past market movement, and then they can better anticipate the market movements in the future based on the past trends [8]. The combination of these NNs helps the agents to hone their decisions by considering complicated relationships between various market variables. This neural network gives better market predictions and can model more realistic financial market movements. With the NNs along with RL, the agent can learn not only from the reward in the short term but also from past history, thereby providing a more complete simulation of the investor.
4. Experiment and Results
4.1. Experimental Setup
The simulation was run in multiple market cycles, and all possible forms of investor behaviour were tested, from rational to irrational. These models were calibrated with various parameters such as agents’ learning rates and the effect of psychological biases such as overconfidence and herding. Such refinements allowed us to study how combination of RL and NN had consequences for agent behaviour and market stability [9]. Table 3 summarize the investor behavior settings, including their learning rates, market volatility and frequency of bubble formation under each scenario.
Table 3: Agent Behavior Parameters
Investor Behavior | Learning Rate | Market Volatility (%) | Bubble Formation |
Rational | 0.1 | 5.2 | None |
Slightly Irrational | 0.5 | 12.3 | Occasional |
Highly Irrational | 0.9 | 18.9 | Frequent |
4.2. Evidence of Simulated Investor Actions
The simulations revealed that, once psychological biases like overconfidence and herding were modelled, the market essentially collapsed. In such a situation, market movements became more volatile and there were visible bubbles and crashes in the markets. In particular, agents operating at greater degrees of irrationality produced more dramatic market shocks, creating more bubbles and making markets collapse faster. With reinforcement learning, the agents were now capable of learning over time, in light of previous market cycles. But irrationality, even with the learning, resulted in inefficiencies and instability that the agents were unable to model or counteract on their own. In Table 3, we can see how market volatility goes up as irrationality increases and bubbles become more common as agents diverge from rational decision-making. These findings highlight how hard it is to replicate rational investor behaviour and how it is highly damaging to market stability.
4.3. Effect of Neural Networks on Predictive Accuracy.
The incorporation of neural networks into the model also increased the model’s predictive power, allowing agents to better predict market behaviour under normal circumstances. Table 4 illustrates how neural networks affect model predictive accurate under various market scenarios. Neural networks achieved good prediction rates (85.4%) with small error margins under steady state conditions. But if market conditions were subject to excessive irrationality or market crashes, then predictions became highly inaccurate and error margins jumped drastically. For bubble-formation and high uncertainty conditions, the model did predict market movements in part, but not with sufficient precision as it would have done under normal market conditions. [10] These findings highlight the potentials and drawbacks of predictive modeling in financial markets by neural networks. The neural networks worked well under steady conditions, but failed to keep up with extreme irrationality typical of market bubbles and crashes. These results indicate that NNs help the model to make predictions better, but need to be refined more to compensate for the uncertainties generated by volatile market situations.
Table 4: Impact Of Neural Networks On Predictive Accuracy
Market Condition | Prediction Accuracy (%) | Error Margin (%) |
Normal | 85.4 | 2.5 |
High Irrationality | 72.3 | 5.6 |
Market Crash | 64.1 | 7.8 |
Bubble Formation | 78.5 | 4.2 |
High Uncertainty | 68.9 | 6.3 |
5. Conclusion
This research demonstrates how Agent-Based Modeling (ABM), RL and NNs can be combined to create an effective system to simulate investors’ behaviour and the functioning of financial markets. The amalgamation of these methods allows a more natural picture of market behaviour – at least, the crazy behaviours that cause market volatility, bubbles and crashes. It shows that, while Neural Networks perform well at making predictions in stable markets, they perform worse during periods of extreme irrationality (eg: crash or bubble formation). This limitation shows the limitations of applying only AI methods to highly unpredictable market scenarios. Despite these issues, the conclusions of this research are encouraging that the ABM-RL-NN framework has a good potential for providing a lot of useful information about the market behavior. Combined with adaptive learning and non-linear pattern recognition, the model provides a more refined view of investor psychology impacting financial markets. The results also suggest that predictive models should be better refined to accommodate the volatility and uncertainty of financial markets. It could help guide the next generation of behavioural finance research and give financial analysts and policymakers some useful insights into how to mitigate risks and disruptions to the markets.
References
[1]. Ionescu, Ștefan, et al. "Exploring the Use of Artificial Intelligence in Agent-Based Modeling Applications: A Bibliometric Study." Algorithms 17.1 (2024): 21.
[2]. Sánchez, Juan M., Juan P. Rodríguez, and Helbert E. Espitia. "Bibliometric analysis of publications discussing the use of the artificial intelligence technique agent-based models in sustainable agriculture." Heliyon 8.12 (2022).
[3]. An, Li, et al. "Modeling agent decision and behavior in the light of data science and artificial intelligence." Environmental Modelling & Software 166 (2023): 105713.
[4]. Ibrahim, Samar. "A review of agent-based model simulation for covid 19 spread." International Conference on Emerging Technologies and Intelligent Systems. Cham: Springer International Publishing, 2022.
[5]. Graham, Shawn. An enchantment of digital archaeology: raising the dead with agent-based models, archaeogaming and artificial intelligence. Berghahn Books, 2022.
[6]. Axtell, Robert L., and J. Doyne Farmer. "Agent-based modeling in economics and finance: Past, present, and future." Journal of Economic Literature (2022): 1-101.
[7]. Back, Camila, Stefan Morana, and Martin Spann. "When do robo-advisors make us better investors? The impact of social design elements on investor behavior." Journal of Behavioral and Experimental Economics 103 (2023): 101984.
[8]. Manrai, Rishi, and Kriti Priya Gupta. "Investor’s perceptions on artificial intelligence (AI) technology adoption in investment services in India." Journal of Financial Services Marketing 28.1 (2023): 1-14.
[9]. Almeida, José, and Tiago Cruz Gonçalves. "A systematic literature review of investor behavior in the cryptocurrency markets." Journal of Behavioral and Experimental Finance 37 (2023): 100785.
[10]. Goodell, John W., et al. "Artificial intelligence and machine learning in finance: Identifying foundations, themes, and research clusters from bibliometric analysis." Journal of Behavioral and Experimental Finance 32 (2021): 100577.
Cite this article
Hu,B. (2025). AI-Driven Agent-Based Modeling of Investor Behavior: Leveraging Reinforcement Learning and Neural Networks to Simulate Irrationality in Financial Markets. Applied and Computational Engineering,138,42-47.
Data availability
The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.
Disclaimer/Publisher's Note
The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of EWA Publishing and/or the editor(s). EWA Publishing and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
About volume
Volume title: Proceedings of the 3rd International Conference on Software Engineering and Machine Learning
© 2024 by the author(s). Licensee EWA Publishing, Oxford, UK. This article is an open access article distributed under the terms and
conditions of the Creative Commons Attribution (CC BY) license. Authors who
publish this series agree to the following terms:
1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons
Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this
series.
2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published
version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial
publication in this series.
3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and
during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See
Open access policy for details).
References
[1]. Ionescu, Ștefan, et al. "Exploring the Use of Artificial Intelligence in Agent-Based Modeling Applications: A Bibliometric Study." Algorithms 17.1 (2024): 21.
[2]. Sánchez, Juan M., Juan P. Rodríguez, and Helbert E. Espitia. "Bibliometric analysis of publications discussing the use of the artificial intelligence technique agent-based models in sustainable agriculture." Heliyon 8.12 (2022).
[3]. An, Li, et al. "Modeling agent decision and behavior in the light of data science and artificial intelligence." Environmental Modelling & Software 166 (2023): 105713.
[4]. Ibrahim, Samar. "A review of agent-based model simulation for covid 19 spread." International Conference on Emerging Technologies and Intelligent Systems. Cham: Springer International Publishing, 2022.
[5]. Graham, Shawn. An enchantment of digital archaeology: raising the dead with agent-based models, archaeogaming and artificial intelligence. Berghahn Books, 2022.
[6]. Axtell, Robert L., and J. Doyne Farmer. "Agent-based modeling in economics and finance: Past, present, and future." Journal of Economic Literature (2022): 1-101.
[7]. Back, Camila, Stefan Morana, and Martin Spann. "When do robo-advisors make us better investors? The impact of social design elements on investor behavior." Journal of Behavioral and Experimental Economics 103 (2023): 101984.
[8]. Manrai, Rishi, and Kriti Priya Gupta. "Investor’s perceptions on artificial intelligence (AI) technology adoption in investment services in India." Journal of Financial Services Marketing 28.1 (2023): 1-14.
[9]. Almeida, José, and Tiago Cruz Gonçalves. "A systematic literature review of investor behavior in the cryptocurrency markets." Journal of Behavioral and Experimental Finance 37 (2023): 100785.
[10]. Goodell, John W., et al. "Artificial intelligence and machine learning in finance: Identifying foundations, themes, and research clusters from bibliometric analysis." Journal of Behavioral and Experimental Finance 32 (2021): 100577.