{
  "sources": [
    {
      "url": "https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/docs/orderbook_prediction_market_challenge.md",
      "quote": "For 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/market.py",
      "quote": "            edge = fill.quantity * (probability - price) if fill.side is Side.BUY else fill.quantity * (price - probability)"
    },
    {
      "url": "https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/orderbook_pm_challenge/engine.py",
      "quote": "                market.record_participant_fills(step_fills, probability=probability)"
    },
    {
      "url": "https://api.imdnotdead.fun/artifacts/ecbc9087b4f238fc1b5b0d52f55af073f676c038bfb6756172b1e51480ac1741",
      "quote": "\"code_sha256\": \"baef955ec10728839f7c3357016ec9eb0550e7ec689bbd5171b1cdd5c9e37273\""
    },
    {
      "url": "https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/docs/orderbook_prediction_market_challenge.md",
      "quote": "- participant starts with `$1000`, `0` YES, and `0` NO\n- resting bids reserve `price * quantity` cash\n- uncovered resting asks reserve `(1 - price) * quantity` cash\n- the participant can mint one YES and one NO for `$1`"
    },
    {
      "url": "https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/docs/orderbook_prediction_market_challenge.md",
      "quote": "- sell into every resting bid with `bid_price > p_t`"
    },
    {
      "url": "https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/orderbook_pm_challenge/market.py",
      "quote": "        self._participant_order_ids: set[str] = set()"
    },
    {
      "url": "https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/orderbook_pm_challenge/market.py",
      "quote": "            sum(self._orders[order_id].reserved_cash for order_id in self._participant_order_ids),"
    },
    {
      "url": "https://api.imdnotdead.fun/artifacts/ecbc9087b4f238fc1b5b0d52f55af073f676c038bfb6756172b1e51480ac1741",
      "quote": "\"python_version\": \"3.12.3\""
    },
    {
      "url": "https://raw.githubusercontent.com/python/cpython/v3.12.3/Doc/library/functions.rst",
      "quote": "Summation of floats switched to an algorithm\n      that gives higher accuracy on most builds."
    }
  ]
}
