AlgoViz

Design a stock exchange

hard 60 min

Pair buyers with sellers by one strict rule, in microseconds, without ever losing an accepted order.

Where it shows up

The same pattern appears across everyday software.

  • One thread for all markets

    The LMAX article reports 6 million orders a second on one thread in a benchmark. Network, journal and replication work run beside it on other threads.

  • Market-wide pauses

    In the United States a fall in the S&P 500 of 7%, 13% or 20% from the last close can halt trading across markets.

  • Single-stock price bands

    The limit up-limit down rule stops trades outside a price band around recent prices of one stock.

  • Checks before market access

    SEC Rule 15c3-5 makes brokers with market access run credit, size and price checks before orders enter the market.

  • A deliberate delay

    IEX is known for a 38-mile coil of fibre that adds 350 microseconds, so distance matters less.

  • Records kept for years

    SEC Rule 17a-1 requires a national exchange to keep its records at least five years, the first two easy to reach.