Artificial Stock Market

Group/Project Resource Page lists all resources available for this project.

Several articles* have been published using the Artificial Stock Market model. The model simulates prices & trade levels in a market made up of "artificial adaptive agents." This is a prototype example of a "complex system" and is thought to illustrate the benefits of simulation modeling.

This page is dedicated to the revision/updating/enhancement of the Swarm version of the ASM. The first objective was to bring the ASM code--as released in April, 2000, with the version label 2.0--up to date and into conformance with Swarm programming style and recommendations for Swarm 2.1. That was achieved with ASM-2.2, which represents a substantially reworked and enhanced version of the model. Actually, ASM-2.2 went a bit further than that, because it (optionally) uses some hdf5 data storage features that were supported only in Swarm after 2.1.1 (prerelease snapshots of Swarm-2.2). The next step, ASM-2.4, includes the addition of a number of new features, including serialization (ability to stop and restart a model). ASM-2.4 now performs, as far as Thomas Badegruber and I can tell, in a way that replicates the original Santa Fe Stock Market. See the Swarm community links page for release info.

In case you wonder what a Swarm program looks like while it runs, I have a directory of screenshots!, such as screenshots/asm-20000530.gif . The newest version, ASM-2.4, looks like this: screenshots/asm-20030606.png on my RedHat Linux system.

News: Keep Current

To see news about the project, click on this news link. Its ugly, but it works.

ASM Documentation

I've got a copy of the project documentation for the ASM-2.2 release. Take a look: http://artstkmkt.sourceforge.net/ASM-Docs I may update those for ASM-2.4, but did not do it yet.

CVS Access to Source Code

There is now a CVS account here for revisions of ASM in Swarm. That code is what you get if you checkout the ASM directory. If you want the version written in pure Objective-C for the Next system that was released with the ASM-2.0 package, please checkout the cvs module/ directory ASM-objc. Quite recently, I've learned that the ASM-objc code is not an accurate representation of the code that was actually used. Blake LeBaron supplied a package that is actually the code used for the published simulations. I have introduced that into the CVS archive under the name "sfsm".

Sourceforge used to have a cvs browser, but its gone now. So, to look at the code, you'll have to download something.

If you want to be a developer on this project, you need to register personally with SourceForge and then contact me and I'll add you in this account.

You don't have to register to checkout the code anonymously and look it over. Go read the SourceForge doc on how to use CVS at http://sfdocs.sourceforge.net/sfdocs/display_topic.php?topicid=14

If you can't take the 2 minutes for that, get into an X-term and type this

cvs -d:pserver:anonymous@cvs.artstkmkt.sourceforge.net:/cvsroot/artstkmkt login
Hit enter when it asks for a password.
Then type
cvs -d:pserver:anonymous@cvs.artstkmkt.sourceforge.net:/cvsroot/artstkmkt checkout ASM
It should create a directory ASM with the files in it.

Please note that, when this archive was first created, the Sourceforge folks let me use the name ArtStkMkt for both http and the group/cvs name. Sometime in early 2001, the name for cvs got changed to atstkmkt and so some cvs updates won't work they way you might like.

Update: 2005-04-20

Today I checked out a fresh copy from cvs with my developer account and this was the appropriate command:

cvs -d:ext:pauljohn32@cvs.sourceforge.net:/cvsroot/artstkmkt checkout ASM

If you want the whole archive, not just the Swarm ASM, replace ASM with a period, as in

cvs -d:ext:pauljohn32@cvs.sourceforge.net:/cvsroot/artstkmkt checkout .

After that, you will see these directories

ASM ASM-objc CVS CVSROOT SASM sfsm

ASM-objc and sfsm are the golden oldies, and SASM is a branch on which we were fiddling around with Social agents who copy each other's investment habits.

Download a snapshot!

If you don't have cvs, what a shame! I'm putting snapshots of the code here in the updates directory. If you look in there, you should see dated snapshots of the ASM code (the first was ASM-20000507.tar.gz) along with the patch that you can apply to the previous version to create that snapshot.

Personal Interest Statement

I Paul E. Johnson have taken the initiative to create this sourceforge page and repository, but I do not claim to have any special information about stock market models in general or the ASM codebase in specific. I just think its a cool model and I wish I could point students into it in useful ways. I'm seeking more volunteers who want to discuss revision strategies and ways to enhance the functionality of the model.

There is only one vital requirement for participating here. You have to be willing to document the changes you propose to make in the code base. I hope that, someday, we might have something to show for this work, and it will be useful only if we keep tabs on what is changed and what is not. I'm starting a Changelog file in the source directory and hope people will use it. In Emacs, all you need is a M-x add-changelog-entry...

Other Market Simulation Software

If you have computer code for another market-related model, send me an email and I'll add you to this list of related projects.
  1. Java Swarm version of the Santa Fe artificial stock market. Jose Manuel Galan Luis R.Izquierdo. I keep a copy of their package here: http://artstkmkt.sourceforge.net/updates/JavaSwarmASM, but if you want to find out what they are doing right now, I would urge you to contact them directly.
  2. Java Implementation of the artificial stock market using RePast. By Norman Ehrentreich of Martin Luther University Halle-Wittenberg. I don't have a link to his software, but you can contact him directly at < ehrentreich AT wiwi DOT uni-halle DOT de>
  3. JASA: Simulation for auction models based on JADE simulation framework, by Steve Phelps. The web site for JASA is: http://www.csc.liv.ac.uk/~sphelps/jasa and more info on Prof Phelps's research can be found here: http://www.csc.liv.ac.uk/~sphelps/phd1/

References.

(Need to insert more references here.)

Palmer, R.G, W. Brian Arthur, John H. Holland, Blake LeBaron, and Paul Taylor. 1994. Artificial economic life: a simple model of a stockmarket. Physica D 75: 264-274.

Arthur, W.B., J.H. Holland, B. LeBaron, R. Palmer, and P. Taylor. 1997. Asset pricing under endogenous expectations in an artificial stock market. In W.B. Arthur, S.N. Durlauf, and D.A. Lane (eds) The Economy as an Evolving Complex System II Reading, MA: Addison-Wesley, pp. 15-44.

B. LeBaron, W.B. Arthur, and R. Palmer. 1999. The time series properties of an artificial stock market, Journal of Economic Dynamics and Control, 23: 1487-1516.

Johnson, Paul E. 2002. Agent-Based Modeling: What I learned from the Artificial Stock Market. Social Science Computer Review, 20: 174-186.

Links to Swarm Information

Swarm Development Group Homepage
Swarm's sourceforge presenceand its group/project resource page
My Swarm Headquarters, where you can find current SWwarm RPMs, tons of working example code, and the SwarmOnlineFaq

Links to other sites for Stock Market Models