agentleFS
voyager67voyager67/JaneStreet-Agentic-Skills/skills/agent-based-market-simulation/SKILL.md

agent-based-market-simulation

Skill13 starsChanged 5 days agoApache-2.0View on GitHub

Design and evaluate agent-based or GPU-accelerated limit-order-book simulations with interacting traders, exchange agents, message latency, and explicit market rules. Use for market-design experiments, impact scenarios, RL execution research, and synthetic order-flow studies; distinguish this from historical replay.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use a discrete-event simulation when the question depends on interactions among participants or on a counterfactual market path.

    line 7
  2. Distinctive:

    Check emergent behavior: Look for unrealistic spread collapse, infinite liquidity, unstable price drift, impossible inventory, …

    line 18
  3. Distinctive:

    Do not call synthetic order flow historical ground truth.

    line 23
  4. Distinctive:

    Do not calibrate and validate on the same summaries without an independent period or statistic set.

    line 24
  5. Distinctive:

    Do not hide exchange simplifications or latency assumptions.

    line 25
  6. Distinctive:

    Do not compare simulation throughput with realism.

    line 26

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Agent-Based Market Simulation

Use a discrete-event simulation when the question depends on interactions among participants or on a counterfactual market path. Do not present synthetic simulation as a replay of what historically happened.

Workflow

  1. State the counterfactual question. Examples: how a new quoting policy changes spread/depth, how latency asymmetry affects fills, or how a large parent order changes market impact. Identify the measurable outcome and falsifiable comparison.
  2. Select the simulation class. Historical event replay answers what a strategy could have done against a recorded market path under stated assumptions. Agent-based simulation allows the market path to respond to agents. GPU-parallel LOB simulation is useful for broad parameter sweeps but must preserve the market mechanics relevant to the question.
  3. Specify exchange mechanics. Define price-time/pro-rata priority, tick/lot, matching, cancellations, hidden liquidity, auctions, trading halts, and message processing. Model only mechanics supported by evidence; label simplifications.
  4. Define agent populations. Separate market makers, liquidity takers, execution agents, noise traders, informed traders, arbitrageurs, and background liquidity. Give each agent an observable information set, decision clock, latency, constraints, and inventory/risk policy.
  5. Calibrate and validate. Match unconditional and conditional statistics: spread, depth, event arrival rates, order-size distribution, cancellation rate, volatility, autocorrelation, impact, and intraday patterns. Compare distributions, not only means.
  6. Make runs reproducible. Fix seeds, configs, code revision, agent parameter distributions, and execution environment. Use multiple seeds and confidence intervals; a lucky seed is not a result.
  7. Design controlled interventions. Change one policy or parameter at a time. Include baseline/no-agent comparisons, ablations, stress regimes, and parameter sensitivity. Prevent train/test contamination when the simulator trains agents.
  8. Check emergent behavior. Look for unrealistic spread collapse, infinite liquidity, unstable price drift, impossible inventory, non-conservation of shares/cash, or agents exploiting implementation artifacts.
  9. Report external validity. State which empirical observations the model reproduces, which it does not, and why conclusions may not transfer to a real venue.

Guardrails

  • Do not call synthetic order flow historical ground truth.
  • Do not calibrate and validate on the same summaries without an independent period or statistic set.
  • Do not hide exchange simplifications or latency assumptions.
  • Do not compare simulation throughput with realism; performance and validity are separate dimensions.
  • For reinforcement learning, report reward design, exploration, policy selection, and out-of-distribution stress—not reward alone.

Deliverable

Provide the counterfactual question, simulator choice, exchange rules, agent definitions, calibration/validation table, controlled experiments, seed sensitivity, emergent-behavior checks, and external-validity limits.

Further reading

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.