Skip to content

Example Engine Configs

Learning objectives

After reading this chapter you will understand:

  • which ready-to-use engine configuration templates are available under docs/examples/ref_data
  • how those templates were generated
  • how the different book-count and setup profiles are intended to be used in training scenarios

Scope

The docs/examples/ref_data tree contains generated engine_config.yaml templates that can be used directly for training and workshop exercises.

These reference configs are organized by book count and setup profile:

  • s1-basic-setup
  • s1-nominal-setup
  • s1-complex-setup
  • s3-basic-setup
  • s3-nominal-setup
  • s3-complex-setup
  • s10-basic-setup
  • s10-nominal-setup
  • s10-complex-setup
  • s30-basic-setup
  • s30-nominal-setup
  • s30-complex-setup
  • s150-basic-setup
  • s150-nominal-setup
  • s150-complex-setup
  • s300-load-setup — AI-trader design-limit load test bed: 300 symbols, 500 AI participants (AI001–AI500); no -nomm variant
  • s300-sim-setup — the long-running simulated market used by the AI Traders and Market Simulation book and the edumatcher-ai-sim container image's default config: 300 symbols, 100 AI traders (AI001–AI100) plus a market_sim.yaml hidden-true-value market model with news/rumours, and the EDU50 index of its 50 largest companies; no -nomm variant

The s150-* configs also list AI001–AI020 so a 20-bot pm-ai-swarm runs unchanged. Each profile also has a -nomm variant without seeded market-maker quotes. Every directory contains a one-line generator script, mkrefdata.sh, the resulting engine_config.yaml and a README.md; the s150-* and s300-* directories also hold a market_sim.yaml and a swarm.yaml for the AI traders.

How they are generated

The example configs are produced by running mkrefdata.sh in each profile directory. That script only delegates: the s1–s30 directories to the shared mkrefdata_common.py, the s150-* and s300-* directories to mks150.sh and mks300.sh, all three in docs/examples/ref_data/. They derive the symbol set and gateway layout from the directory name, invoke pm-config-gen, then apply a small amount of profile-specific post-processing where needed.

In practice this means:

  • the engine config structure is generated by the same config generator used elsewhere in the project
  • RALF and CALF gateway sections are emitted natively by pm-config-gen
  • every symbol includes outstanding_shares data for statistics and index weighting; s300-sim-setup derives them from the market caps in its companies.db (cap ÷ seeded price) and defines the cap-weighted EDU50 index from the 50 largest
  • every profile uses --seed-mm-mid-range and --seed-last-prices-from-mm, so each book starts with a reproducible bootstrap market-maker quote and matching last-price references; the -nomm variants add --no-mm-seed-quotes and keep only the last prices
  • the nominal and complex profiles include richer session, risk, clearing, and market-data settings
  • complex profiles define a fuller trader set and market-maker bootstrap inputs for more involved scenarios

The generators accept --seed so the bootstrap prices can be reproduced when needed.

Training usage

These templates are ready to use in training scenarios as soon as they are generated.

  • Basic profiles are suitable for first-touch configuration, startup, and book-entry exercises.
  • Nominal profiles are suitable for normal trading-day walkthroughs with market-data and post-trade enabled.
  • Complex profiles are suitable for advanced training that combines multiple traders, market-making, scheduling, risk controls, and market-data scenarios.

For example, a training session can start from one of the generated engine_config.yaml files instead of assembling a config manually.