Skip to content

Files

Latest commit

2c20e20 · Sep 10, 2013

History

History
73 lines (46 loc) · 2.39 KB

install.rst

File metadata and controls

73 lines (46 loc) · 2.39 KB

Installation

For the moment the simulator has two user interfaces:

  • Web. A user runs a simulation server and uses a web interface to set up model parameters and run the simulation.
  • Veusz. A user edits script files describing a simulation, run a simulator and the results are rendered using Veusz software (in principle, it quite easy to plug in another means of visualization).

The first approach is easier for new users while the latter one gives more control over simulation.

Steps common for Veusz and Web interfaces

Latest public version of the simulator can be downloaded from https://github.com/fiquant/marketsimulator/releases

This version of the simulator requires Python 2.7 installed: http://www.python.org/download/

Following Python packages need to be installed:

Normally all these packages can be downloaded and installed using pip (http://www.pip-installer.org/) or easy_install (https://pypi.python.org/pypi/setuptools)

Running a Web-server with online interface

In order to run the web server you need Flask package installed: http://flask.pocoo.org/

wsgi/flaskapp.py launches the Web server at default port 80:

> cd wsgi
> python flaskapp.py
 * Running on http://127.0.0.1:80/

After that you may open localhost page in your Web browser:

Figures/web/traders.png

Press Run button to launch the simulation:

Figures/web/volume-levels.png

Offline usage with Veusz

For running scripts and offline visualisation Veusz package is needed: http://home.gna.org/veusz/. After having it installed VEUSZ_EXE environment variable should be assigned to the path to the Veusz executable. Afterwards, sample simulations may be launched:

> cd marketsim/samples
> python try_dependency.py
. . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
75509 events processed in 18.849016855s with rate 4005.99143079 event/s
>

Figures/veusz/dependency.png