SPB Git

spb/wp27_uqo

Public
5.1 KB · 60 lines markdown
1# Design brief — The Invisible Hand of Machines (UQO WP 27)23Internal brief shared by the author and the sub-agents writing the literature review, theory and4pre-analysis plan. It describes what the simulator *actually* implements (src/market_agents).56## Economy implemented in the simulator7- Discrete ticks t = 0..T-1 (T = 300–1000). One risky asset (optionally K = 2–5 with a common factor in8  dividend innovations) and cash. Prices in integer ticks (1 cent), quantities in integer lots, cash in9  integer cents; exact conservation checked after every fill.10- Dividend every `div_interval` = 20 ticks: D = mu_{s} + x + J, x_t = rho x_{t-1} + sigma eps_t (rho = 0.98,11  sigma = 2 cents, mu = 50 cents), optional two-state regime in mu (Markov), optional jumps.12  Latent fundamental value V_t = mu/r + x_t rho/(1+r-rho) with r = 0.25 % per period (so P/D ≈ 400,13  V ≈ 200.00). Public value V^pub_t = same formula on the Kalman/HMM posterior from announced dividends14  and public news. Agents never see V_t.15- Information: public news items (noisy reports of x_t, some deliberately biased = misleading);16  private signals s_i = x_t + N(0, sigma²/precision) for "informed" agents (fundamentalists and a share of17  LLM agents). No agent sees future draws.18- Exchange: continuous double auction, price–time priority, limit/market/cancel, partial fills, IOC19  market remainder, taker fee 2 bp, maker fee 0, per-agent latency in [0.05, 1] tick (orders arrive20  at decision time + latency and are processed in arrival order), order TTL 50 ticks, price band ±50 %,21  optional circuit breaker (halt when |10-tick move| > threshold), no short selling by default,22  leverage cap 3× for "leveraged" slots with maintenance margin 25 % and forced partial liquidation.23- Population (N = 100 / 1,000 / 10,000 trader slots): fundamentalists 25 % (30 % informed, precision 2),24  trend followers 15 %, mean-reverters 10 %, noise traders 35 %, market makers 5 % (bounded25  inventory-skewed two-sided quotes), leveraged trend followers 10 %, cross-asset arbitrageurs (multi-asset26  only). Endowments: cash 20,000 + 100 shares scaled by a lognormal wealth multiplier (sd 0.3).27- LLM treatment: a fraction `llm_share` of trader *slots* (stratified across policy types, never market28  makers) is replaced by an LLM policy that decides every 20 ticks (staggered offsets) from a canonical29  snapshot (book depth 5 levels, mid history, recent trades, last dividend, public PV, news, own private30  signal if any, own account and open orders). Output = strictly validated JSON (hold/place/cancel …).31  Invalid decisions = hold, logged. Realized LLM share of agents, orders and volume are all reported.32  Providers: OpenAI (Responses API, json_schema), Anthropic (Messages API, json_schema), mock (seeded33  rule with injected invalid answers). Treatments: provider mix, same vs diverse persona prompts,34  memory (0 vs 5 past decisions), communication channel (cohorts of 5 share rationales), adaptive35  P&L feedback, matched latency, equal token / USD / decision-opportunity budgets, frozen decision36  library replay vs online calls.37- Randomization: master seed → independent streams (fundamentals, news, slots, policy assignment, LLM38  slot assignment, activation, tie-breaks, per-agent RNG). Matched pairs across `llm_share` share39  every stream except the LLM slot draw. ≥ 30 seeds exploratory, power-based for confirmatory.4041## Stylized theoretical model (to be written up by the theory agent, must map to the above)42One-period, one asset, liquidation value v ~ N(0, σ_v²) around the public PV. N traders receive43s_i = v + ε_i with ε_i = η_{g(i)} + u_i, where g(i) is the trader's "model" (foundation model /44prompt family), η_g ~ N(0, σ_η²) iid across models, u_i ~ N(0, σ_u²) iid. A share φ_g of traders uses45model g (Σ_g φ_g ≤ 1; the remaining 1 − Σφ_g traders have fully idiosyncratic errors, i.e. their own46private model). Traders submit market orders x_i = β s_i (β > 0 a fixed response intensity; the47behavioral assumption mirrors rule-like LLM policies and is relaxed in a CARA extension). Noise48traders submit z ~ N(0, σ_z²). A competitive, risk-neutral market maker sets P = E[v | Y],49Y = Σ_i x_i + z, so P = λ Y with λ = Cov(v,Y)/Var(Y).50Objects: price informativeness τ = 1 − Var(v | Y)/σ_v²; pricing error Var(P − v); order-flow51correlation ρ_x = Corr(x_i, x_j); synchrony; effective number of models M_eff = 1/Σ_g φ_g²;52feedback extension with trend demand γ(P_1 − P_0) and amplification 1/(1 − λγ); leverage extension53with margin m, wealth W, impact λ: amplification 1/(1 − λ X/m) and spiral when λ X/m ≥ 1, where X is54the aggregate same-signed leveraged position (increasing in the shared-model share).55Hypotheses the simulator tests: H1 informativeness falls in the share using a single shared model56(holding information quality fixed) and rises in M_eff; H2 order-flow correlation and synchrony rise57in φ; H3 bubble/crash frequency and liquidity spirals rise with φ × leverage; H4 prompt/model58diversity restores part of the loss; H5 communication channels raise synchrony; H6 circuit breakers59and position limits cut crash depth at a cost in time-to-absorb.60
Files · d09ab0c71293588caf435dcaebf6e4bc03a129ff
Menu

Theme