Engineering a Reproducible Market Lab
How I turn simulation runs into auditable artifacts, and why reproducibility is part of the instrument itself.
Chuan August Sun · Institute of Lucidity

The most valuable part of PMarket Arena is not only the browser interface. It is the artifact chain behind it.
I do not want a one-off simulation that produces attractive charts. I want a system that can generate hypotheses, run experiments, preserve evidence, audit claims, and turn results into public explanations without losing the chain of custody.
The Artifact Chain
The core engineering chain is:
config -> seeded run -> raw logs -> metrics -> figures -> claim audit -> manuscript -> arena demo
Each step has a different job. Configs define the experiment. Seeds make reruns possible. Logs preserve what happened. Metrics summarize behavior. Figures explain. Claim audit prevents overreach. The browser arena turns the mechanism into public intuition.
Two Engines, Two Purposes
The research repo uses two simulation styles.
The limit order book engine is more faithful to microstructure. It can represent bids, asks, spreads, order expiry, and continuous matching.
The vectorized batch engine scales to much larger populations. It sacrifices some exchange detail, but it makes million-agent sweeps possible.
That tradeoff is not a weakness if it is explicit. It becomes a stronger research design because each engine has a declared evidentiary role.
The Browser Arena
The Node and browser layer is built for interaction. It runs synthetic ticks, exposes interventions, shows cohort pressure, and supports replay-style explanation.
The engineering boundary is:
Python pipeline: formal evidence
Node arena: interactive approximation
Fieldworks: public explanation
When those layers disagree, formal paper claims follow the reproducible Python pipeline.
Reproducibility Lessons
The reproduction pass found a determinism bug caused by unstable seeded behavior. That changed my view of the project. Reproducibility is not a final cleanup task. It is part of the instrument.
The minimum standard is:
- every run has a config,
- every random stream has a named seed,
- every figure can be traced to raw metrics,
- every claim cites the artifact family that supports it,
- exploratory stress cases are labeled as exploratory.
What Comes Next
The next infrastructure target is a cleaner package boundary:
pmarket/oracles
pmarket/agents
pmarket/engines
pmarket/experiments
pmarket/metrics
pmarket/reporting
pmarket/interactive
That structure would make the system reusable beyond this one prediction-market paper.
The last step is interface design: how to turn that evidence chain into something a reader can inspect, teach from, and reuse.