SPB Git

spb/wp27_uqo

Public
5.1 KB

# Design brief — The Invisible Hand of Machines (UQO WP 27)

Internal brief shared by the author and the sub-agents writing the literature review, theory and pre-analysis plan. It describes what the simulator actually implements (src/market_agents).

# Economy implemented in the simulator

  • Discrete ticks t = 0..T-1 (T = 300–1000). One risky asset (optionally K = 2–5 with a common factor in dividend innovations) and cash. Prices in integer ticks (1 cent), quantities in integer lots, cash in integer cents; exact conservation checked after every fill.
  • Dividend every div_interval = 20 ticks: D = mu_{s} + x + J, x_t = rho x_{t-1} + sigma eps_t (rho = 0.98, sigma = 2 cents, mu = 50 cents), optional two-state regime in mu (Markov), optional jumps. Latent fundamental value V_t = mu/r + x_t rho/(1+r-rho) with r = 0.25 % per period (so P/D ≈ 400, V ≈ 200.00). Public value V^pub_t = same formula on the Kalman/HMM posterior from announced dividends and public news. Agents never see V_t.
  • Information: public news items (noisy reports of x_t, some deliberately biased = misleading); private signals s_i = x_t + N(0, sigma²/precision) for "informed" agents (fundamentalists and a share of LLM agents). No agent sees future draws.
  • Exchange: continuous double auction, price–time priority, limit/market/cancel, partial fills, IOC market remainder, taker fee 2 bp, maker fee 0, per-agent latency in [0.05, 1] tick (orders arrive at decision time + latency and are processed in arrival order), order TTL 50 ticks, price band ±50 %, optional circuit breaker (halt when |10-tick move| > threshold), no short selling by default, leverage cap 3× for "leveraged" slots with maintenance margin 25 % and forced partial liquidation.
  • Population (N = 100 / 1,000 / 10,000 trader slots): fundamentalists 25 % (30 % informed, precision 2), trend followers 15 %, mean-reverters 10 %, noise traders 35 %, market makers 5 % (bounded inventory-skewed two-sided quotes), leveraged trend followers 10 %, cross-asset arbitrageurs (multi-asset only). Endowments: cash 20,000 + 100 shares scaled by a lognormal wealth multiplier (sd 0.3).
  • LLM treatment: a fraction llm_share of trader slots (stratified across policy types, never market makers) is replaced by an LLM policy that decides every 20 ticks (staggered offsets) from a canonical snapshot (book depth 5 levels, mid history, recent trades, last dividend, public PV, news, own private signal if any, own account and open orders). Output = strictly validated JSON (hold/place/cancel …). Invalid decisions = hold, logged. Realized LLM share of agents, orders and volume are all reported. Providers: OpenAI (Responses API, json_schema), Anthropic (Messages API, json_schema), mock (seeded rule with injected invalid answers). Treatments: provider mix, same vs diverse persona prompts, memory (0 vs 5 past decisions), communication channel (cohorts of 5 share rationales), adaptive P&L feedback, matched latency, equal token / USD / decision-opportunity budgets, frozen decision library replay vs online calls.
  • Randomization: master seed → independent streams (fundamentals, news, slots, policy assignment, LLM slot assignment, activation, tie-breaks, per-agent RNG). Matched pairs across llm_share share every stream except the LLM slot draw. ≥ 30 seeds exploratory, power-based for confirmatory.

# Stylized theoretical model (to be written up by the theory agent, must map to the above)

One-period, one asset, liquidation value v ~ N(0, σ_v²) around the public PV. N traders receive s_i = v + ε_i with ε_i = η_{g(i)} + u_i, where g(i) is the trader's "model" (foundation model / prompt family), η_g ~ N(0, σ_η²) iid across models, u_i ~ N(0, σ_u²) iid. A share φ_g of traders uses model g (Σ_g φ_g ≤ 1; the remaining 1 − Σφ_g traders have fully idiosyncratic errors, i.e. their own private model). Traders submit market orders x_i = β s_i (β > 0 a fixed response intensity; the behavioral assumption mirrors rule-like LLM policies and is relaxed in a CARA extension). Noise traders submit z ~ N(0, σ_z²). A competitive, risk-neutral market maker sets P = E[v | Y], Y = Σ_i x_i + z, so P = λ Y with λ = Cov(v,Y)/Var(Y). Objects: price informativeness τ = 1 − Var(v | Y)/σ_v²; pricing error Var(P − v); order-flow correlation ρ_x = Corr(x_i, x_j); synchrony; effective number of models M_eff = 1/Σ_g φ_g²; feedback extension with trend demand γ(P_1 − P_0) and amplification 1/(1 − λγ); leverage extension with margin m, wealth W, impact λ: amplification 1/(1 − λ X/m) and spiral when λ X/m ≥ 1, where X is the aggregate same-signed leveraged position (increasing in the shared-model share). Hypotheses the simulator tests: H1 informativeness falls in the share using a single shared model (holding information quality fixed) and rises in M_eff; H2 order-flow correlation and synchrony rise in φ; H3 bubble/crash frequency and liquidity spirals rise with φ × leverage; H4 prompt/model diversity restores part of the loss; H5 communication channels raise synchrony; H6 circuit breakers and position limits cut crash depth at a cost in time-to-absorb.

Files · main
Menu

Theme