Skip to content

feat: Add Information Cascades and Trading Behavior Model to examples#339

Open
echo-xiao wants to merge 3 commits intomesa:mainfrom
echo-xiao:feat/herd-behavior-model
Open

feat: Add Information Cascades and Trading Behavior Model to examples#339
echo-xiao wants to merge 3 commits intomesa:mainfrom
echo-xiao:feat/herd-behavior-model

Conversation

@echo-xiao
Copy link

Description

This PR introduces a new interactive example that implements a hybrid model of Information Cascades and Trading Behavior, utilizing Mesa and Solara.

The model dynamically simulates how investor opinions evolve through bounded confidence interactions and how overconfidence leads to wealth destruction due to excessive trading friction.

Theoretical Background

This implementation strictly maps the logic from two classic behavioral finance papers:

  1. Herd Behavior: Based on Banerjee, A. V. (1992). Agents update opinions based on a confidence threshold, demonstrating the formation of echo chambers or market-wide consensus.
  2. Trading is Hazardous to Your Wealth: Based on Barber, B. M., & Odean, T. (2000). The model separates Gross Wealth and Net Wealth, proving that highly confident agents who trade frequently systematically underperform the market average due to transaction costs.

Key Features

  • Interactive Solara Dashboard: Allows real-time parameter tuning (Number of Investors, Confidence Threshold, Convergence Rate, Transaction Cost).
  • Performance Stats Validation: A custom UI component that accurately compares the net wealth of high-turnover vs. low-turnover agents.
  • Comprehensive Visualizations: Includes Opinion Trajectory (Herd Formation), Wealth vs. Confidence scatter plots, and Opinion Variance tracking.

How to test

pip install -r requirements.txt
solara run app.py

@echo-xiao
Copy link
Author

Hi, @jackiekazil @dmasad , I've added a new Mesa example that implements and information cascades and trading behavior model using Solara. All pre-commit checks have passed, and the PR is ready for your view. Please let me know if any further changes are needed. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant