Coder Social home page Coder Social logo

abm_callibration's Introduction

ABM_callibration

Callibration of two Agent Based Models:

  • The Brock and Hommes Model: an asset pricing model defined in Brock and Hommes (1998), describes a hetrogeneneous population of agents trading assets according to different strategies.

  • The Islands Model: defined in Fagiolo and Dosi (2003), describes a hetrogenenous population of agents discovering and diffusing new technologies.

Agent-Based Model Calibration using Machine Learning Surrogates

Much of the work is based on findings in https://arxiv.org/abs/1703.10639.

This paper tackles the exploration of a vast parameter space by using supervised machine learning surrogates. It is then possible to approximate the Agent Based Model using these surrogates and use this for callibration (to some degree of accuracy).

The two models used to demonstrate this approach are given above.

Getting Started

All code has been ran/tested using Python 2.7.

There are several packages and dependancies that I have specified in the Pipfile, however, if you are not using pipenv, these are:

numpy = "*"
pandas = "*"
scipy = "*"
seaborn = "*"
matplotlib = "*"
scikit-optimize = "*"
xgboost = "*"
conda = "*"

where "*" denotes the most recent release.

You can automatically install all of the dependancies in the Pipfile into your pipenv using:

pipenv install

Data

The only data required for either model is found in the sp500.csv file. This contains daily adjusted closing prices for the S&P 500 from December 09, 2013 to December 07, 2015, for a total of 502 observations and is used in the case of the Brock and Hommes Model.

This can be found at https://finance.yahoo.com/quote/%5EGSPC/history.

Files

The main code for each Agent Based Model is found in bh_functions.py and island_functions.py respectively. These contain the actual code for each model along with specific functions that are applicable to each model.

Example experiments are found in bh_experiment.py and island_experiment.py which can be ran through the command line. These scripts compare the performance of a GaussianProcessRegressor to that of a GradientBoosingRegressor.

abm_callibration's People

Contributors

adamivison avatar admivsn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.