Skip to content

Latest commit

 

History

165 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exchange Simulator for the Limit Order-Driven Market

This project is a modular and extensible exchange simulation platform designed for studying and evaluating trading strategies within a realistic limit order book (LOB) market environment. It bridges the gap between academic research and practical trading applications.

Web Interface

🔍 Project Overview

  • Simulates a realistic limit order-driven stock exchange.
  • Enables the integration of both manual and autonomous trading agents.
  • Compatible with a wide variety of algorithmic and machine learning-based strategies.
  • Includes manipulators to study market vulnerabilities.
  • Provides tooling for analyzing simulations and visual comparison of trading strategy performance.

🧠 Research Objectives

  • Analyze and simulate market microstructure dynamics.
  • Evaluate the performance and stability of trading algorithms.
  • Serve as a bridge between theoretical research and real-world application.
  • Study market dynamics and the impact of strategic behaviors on liquidity, stability, and fairness.
  • Use the platform for educational, regulatory, and experimental purposes.

💻 Key Features

  • Modular simulation framework with realistic LOB mechanics.
  • Autonomous agent support including ML-powered strategies.
  • Fraudulent agent simulation for stress-testing market resilience.
  • Web interface powered by Tornado + Bokeh for real-time monitoring.
  • Analysis tools using Jupyter Notebooks for report generation and visualization.

🧪 Technologies Used

  • Python 3.9 +
  • Tornado (web server)
  • Bokeh (web-based visualization)
  • NumPy, Pandas (data handling)
  • Jupyter (result analysis and reporting)

🚀 Getting Started

📦 Clone the Repository

git clone https://github.com/Jivl00/Exchange_simulator_for_the_limit_order-driven_market
cd Exchange_simulator_for_the_limit_order-driven_market

📥 Install Dependencies

pip install -r requirements.txt

🔧 Configuration

Edit config/server_config.json to adjust: server IP, ports, and API paths.

🟢 Start the Server

cd src
python server/server.py

Once the server is running, start the market simulation components:

python server/agents/market_maker.py
python server/agents/liquidity_generator.py

To resume from a previous state:

python server/server.py -l
  • Simulations are saved to data/ for post-processing after server shutdown.

👥 Run Market Agents

Agents are defined in client/agents. Start one like this (from the src directory):

python client/agents/your_agent.py

🌐 Launch Web Interface

python viz/main_page.py

Access the GUI at http://<IP_ADDRESS>:<VIZ_PORT> as configured.

📊 Analyze Results

Open the reporting notebook:

viz/report/report.ipynb

Use it to:

  • Compare strategy performance
  • Analyze trade volume/frequency
  • Summarize outcomes statistically

Strategy Comparison

✅ Run Tests

cd tests
python -m unittest tests.py

📝 Documentation

  • For more information on the web interface and algorithmic trading, refer to the trading maual.
  • Official thesis document detailing the design, implementation, and evaluation of the exchange simulator: Thesis.
  • Official thesis poster: Poster.
  • Documentation of the visualization module: Visualization Documentation.

About

Diplomová práce - ZČU, FAV, KIV ; Master's Thesis - UWB, FAS, DCSE

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Used by

Contributors

Languages