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.
- 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.
- 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.
- 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.
- Python 3.9 +
- Tornado (web server)
- Bokeh (web-based visualization)
- NumPy, Pandas (data handling)
- Jupyter (result analysis and reporting)
git clone https://github.com/Jivl00/Exchange_simulator_for_the_limit_order-driven_market
cd Exchange_simulator_for_the_limit_order-driven_marketpip install -r requirements.txtEdit config/server_config.json to adjust: server IP, ports, and API paths.
cd src
python server/server.pyOnce the server is running, start the market simulation components:
python server/agents/market_maker.py
python server/agents/liquidity_generator.pyTo resume from a previous state:
python server/server.py -l- Simulations are saved to
data/for post-processing after server shutdown.
Agents are defined in client/agents. Start one like this (from the src directory):
python client/agents/your_agent.pypython viz/main_page.pyAccess the GUI at http://<IP_ADDRESS>:<VIZ_PORT> as configured.
Open the reporting notebook:
viz/report/report.ipynb
Use it to:
- Compare strategy performance
- Analyze trade volume/frequency
- Summarize outcomes statistically
cd tests
python -m unittest tests.py- 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.

