How to Install ZTS
A step-by-step guide to deploying the Zurich Trading Simulator for your own behavioral research experiments.
A step-by-step guide to deploying the Zurich Trading Simulator for your own behavioral research experiments.
Ensure you have a working oTree environment. Install oTree following the official documentation. The ZTS requires Python 3.7+ and oTree 3.x or later.
Clone or download the ZTS source code from GitHub. The repository contains the complete oTree application with all necessary modules.
$ git clone https://github.com/Zurich-Trading-Simulator/OtreeZTS.git
Upload your price patterns as CSV files. You can use the default patterns from the ZTS repository, or create your own historical or artificial price series. When creating your own input files, make sure to follow the format: Date (does not need to be a real date), Price, News, in three consecutiveĀ
The ZTS can be used with default settings. You can adapt parameters such as pace at which the new price ticks display, the buffer of the y-axis or the amount of the initial endowment. Consult Andraszewicz et al. (2023) for setting recommendations. For custom experiments, modify the source code to adjust trading parameters, display options and user interface.
Launch the oTree server and direct participants to the experiment URL. The ZTS handles real-time price display, trade execution, and data recording automatically.
$ otree devserver
Export high-frequency trading data from oTree to a CSV file. The data contains trading actions for everypath, trade timing, volume, and portfolio performance are recorded for analysis.