Behavioural Analysis for Market Anomalies with Heterogeneous Agent Model

Published: 9 July 2024| Version 2 | DOI: 10.17632/j727kg5dt7.2
, Yuhan Wang, Xiaohua Li


We establish an agent-based artificial financial market, which can generate time series of asset price. This agent-based model is compute- oriented and implemented via Python. Therefore, the dataset was separated into two parts: first, code.rar contained different functional element program; second, data.rar contained the raw data that generated by the agent-based model each round.


Steps to reproduce

1. Description of methods used for collection/generation of data: This agent-based model is compute- oriented and implemented via Python. Different from paper in machine learning, whose code is modularized. Our code is divided into different functional element program. In the following we describe the programs separately. 1.Price sequence generated: and 2.Data processing and statistics: and 3.Option price and implied volatility calculate: 4.Figure for Volatility smile: 2. Methods for processing the data: We run the model for n rounds with each value of given parameter, and each round contains m time series values. By calculating the average to guarantee robust simulation results, we get the statistic analysis of distribution of returns, which could be seen as previous value dividend by last value. 3.Instrument- or software-specific information needed to interpret the data: The programS could be run in python 3.9.10 and need the following package import matplotlib.pyplot as plt import numpy as np import os import sys 4. Environmental/experimental conditions: python with Conda 5. Missing data codes: None 6. Specialized formats or other abbreviations used: None


Chinese Academy of Social Sciences


Economics, Finance