{
  "sources": [
    {
      "url": "https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/docs/orderbook_prediction_market_challenge.md",
      "quote": "The score is participant edge, not terminal PnL.\n\nFor each passive participant fill:\n\n- participant buys `q` at price `x`: `edge = q * (p_t - x)`\n- participant sells `q` at price `x`: `edge = q * (x - p_t)`"
    },
    {
      "url": "https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/orderbook_pm_challenge/types.py",
      "quote": "    own_orders: tuple[OwnOrderView, ...]"
    },
    {
      "url": "https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/orderbook_pm_challenge/config.py",
      "quote": "    n_steps: int = 2_000"
    },
    {
      "url": "https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/orderbook_pm_challenge/market.py",
      "quote": "        if self.free_cash() + EPSILON < reserved_cash:\n            raise OrderBookError(\"Insufficient free cash for order collateral\")"
    },
    {
      "url": "https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/orderbook_pm_challenge/runner.py",
      "quote": "        config = sample_config(base, var, seed=seed)\n        engine = SimulationEngine(config, strategy_factory, seed=seed)\n        results.append(engine.run())"
    },
    {
      "url": "https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/docs/orderbook_prediction_market_challenge.md",
      "quote": "- same-price orders are FIFO\n- resting orders remain until filled or cancelled"
    },
    {
      "url": "https://api.imdnotdead.fun/artifacts/db22aff7167a4798251ed3d20432509f30e511e4958799aba5b17b41bb39b4b6",
      "quote": "\"code\""
    }
  ]
}
