Giter Site home page Giter Site logo

chenyanjiangariana / market-agent-simulation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hkust-db-capstone2020/market-agent-simulation

0.0 0.0 0.0 158 KB

Simulated markets based on Zero-Intelligence agent

License: MIT License

Python 100.00%

market-agent-simulation's Introduction

Market-Agent-Simulation

Instructor:

Dr. Andrew Royal

Group members: (sorted alphabetically)

MO, Zi

SHEN, Kanchao

WANG, Boyu

ZHOU, Zhen

This is the first part of the capstone project supported by HKUST and Deutsche Bank.

0. Introduction

The market agent aims to emulate the statistical properties and empirical characteristics of the real equity market. In terms of the type of agent, there are various choices. Here we use a simple yet effective one, zero intelligence agent. Apart from the ZI-agent, an order management system is indispensable in the simulation environment. The two following sections detail the design of the two main parts.

1. Order Management System

The OMS acts as an exchange and clearing house. It interacts with the ZI-agent and deals with all types of orders, incluing limit order and market order. Two modules are contrived for the functionality of the system.

(1) Limit Order Book: (Author: WANG, Boyu)

The limit order book not only contains all orders remaining on the book, but also enables operations to manipulate itself, including inserting, canceling, executing, etc.

(2) Order Manager: (Author: SHEN, Kanchao)

The OMS recieves all the requests from agents, matches the orders and maintains the LOB. Also, there is some public information that all traders can get from OMS.

2. Zero Intelligence Agent

(Author: ZHOU, Zhen and MO, Zi)

The Zero-Intelligence agent is an order generator which follows a stochastic model based on the paper Cont et al. (2011). It will output an order when it is given the current limit order book situation, and records the orders it has generated and how the limit order book changes.

3. How to use simulator to test you strategy

For a demo, please see SimulationEnvironment.

Step 1: Write your own strategy. e.g. see Strategies.py

Step 2: Add your strategies in the Simulator.py

Step 3: Hit "run", and have fun!

Appendix: Stats of the simulated market

Time horizon for simulation: 100 time units, denoted as 1 "day".

(For the meaning of 1 time units under physical measure, please refer to the original paper Cont et al. (2011))

Episodes: 10,000

(1) ADTV: 187,760 shares

(2) Initial quantity: 10%ADTV (this parameter is for the fair comparison of different strategies)

(2) Daily vol: 9.276%

market-agent-simulation's People

Contributors

moxiaozhi avatar ntdd877 avatar tskc13 avatar wangboyu15 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.