Skip to content

Reproduced implementation of market model described in Bakker et al, Physica A 2010.

License

Notifications You must be signed in to change notification settings

ahrenberg/marketxtradermodel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

marketxtradermodel

A python package providing an implementation of the graph-based market model described in [BHKR09].

It specifies a trader model and includes functions to adapt NetworkX directed graphs into trader networks and to evolve these systems over time.

Note that this is not the code used to produce the results in [BHKR09], but a re-implementation of that model.

Status

Alpha: Currently under development and testing.

Example

>>> import marketxtradermodel as mxtm
>>> import networkx as nx
>>> G = nx.fast_gnp_random_graph(1000,0.0025,directed=True) # Build a random graph.
>>> _ = mxtm.utilities.populate_graph(G) # Change integer nodes to Traders
>>> prices = mxtm.simulate_prices(G,range(10)) # Run 10 simulation steps, measuring market price.

License

Released under Apache 2 license (See LICENSE):

Copyright 2017 Lukas Ahrenberg <[email protected]>

References

[BHKR09]A social network model of investment behaviour in the stock market by L Bakker, W Hare, H Khosravi, B Ramadanovic - Physica A: Statistical Mechanics and its Applications, 2010, https://doi.org/10.1016/j.physa.2009.11.013

About

Reproduced implementation of market model described in Bakker et al, Physica A 2010.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages