Skip to content
Criée

The market in code

Developers and testers

Turn the business into data models and verifiable rules, to test MIMS and prepare the matching engine.

0/120 of 12 done

  1. The domain in ten objectsOrder, book, execution, position, cash account, settlement: the market’s objects, their relationships and where the engine stops.10 min
  2. Modelling an orderA type, integers rather than floats, a rank rather than a time, and the rules that keep an order valid.12 min
  3. The book, a sorted structureTwo sides sorted by price then rank, aggregated into levels, and the cost of possible structures.11 min
  4. Continuous trading, line by lineReading Carnet.passer: walk the opposite side, stop at the right moment, store or drop the remainder.12 min
  5. The auction in codeCandidate prices, cumulative curves, tie-break rules and allocation: predict the output before the engine.13 min
  6. An engine’s invariantsConservation, uncrossed book, limits, priority, timestamps, determinism, and the property-based tests that guard them.13 min
  7. From business rule to test caseTurn a rule into “Given, when, then”, choose data that proves it, cover the edge cases.12 min
  8. Order life cycle and the FIX protocolA state machine for the order, then the FIX messages that carry it and the session that numbers them.14 min
  9. From engine to MIMS: checking a sessionFrom executions to positions and cash: what a tester checks after a session.12 min
  10. Amending and cancelling an orderKeeping or losing time priority, writing an amendment with annuler and passer, and the traps of cancellation.10 min
  11. Logging and replaying a sessionAn append-only log, a replay up to time t, fingerprints, and the snapshot that forgets the rank counter.11 min
  12. From an execution to entriesSecurities movements, cash movements, commissions and reversal: the conversion on the back-office side.10 min
  13. Sheet: the engine contractThe @criee/marche API, guarantees and known limits, on one page.Reference
  14. Sheet: invariants and test casesThe six invariants as assertions, the shape of a test case and the list of edge cases.Reference

Terms in this track

OrderLimit orderMarket orderOrder bookPrice-time priorityExecutionContinuous tradingAuction (fixing)Equilibrium priceSpreadPositionCash accountSettlementCentral securities depositoryInvariantDeterminismTimestampingProperty-based testTest caseOrder life cycleFIX protocolMutation testingShrinkingOrder amendmentEvent logReplayFingerprintSnapshotMovementReversal

End-of-track assessment

15 questions drawn from the lessons, pass mark 70%, printable certificate.

Take the assessment