Giter Site home page Giter Site logo

abm-hetero-feedback-mkt's Introduction

Define the Agent

Initialize agent parameters:

  1. Threshold is set to: $\text{threshold} \sim \mathcal{U}(0, 1)$
  2. Strategy is set to: 0 (inactive).
  3. Holdings are set to: 100.

Threshold:

The threshold is updated with a probability of s, a parameter in the model, explained as the average update frequency. $s = 0.1$ is equivalent to 10 trading days.

Strategy:

The strategy is updated according to: $$ \text{strategy} = \begin{cases} 1 & \text{if } |\text{signal}| > \text{threshold} \text{ and signal > 0} \ -1 & \text{if } |\text{signal}| > \text{threshold} \text{ and signal < 0} \ 0 & \text{otherwise} \end{cases} $$

Define the Market

Initialize model parameters:

  1. Create number of agents, N.
  2. Set common signal to 0.
  3. Set price change to 0.
  4. Set asset price $\text{threshold} \sim \mathcal{U}(0, 1)$
  5. Choose the number of agents to track.

Algorithm:

  1. Generates a common noise signal.
  2. Updates agent strategies.
  3. Executes trades.
  4. Calculates price change.
  5. Updates agent thresholds.
  6. Records data.

abm-hetero-feedback-mkt's People

Contributors

gfbarbieri avatar

Watchers

 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.