# Behavioural Analysis for Market Anomalies with Heterogeneous Agent Model

## Description

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.

## Files

## 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: Model_0505.py and simulation_multi_repeat.py. 2.Data processing and statistics: CalculateStats.py and get_avg_statistic_result.py 3.Option price and implied volatility calculate: VolatilityPrice_multiFile.py 4.Figure for Volatility smile: show_single_curve.py 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