{"sources":[{"url":"https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/README.md","quote":"This repository contains a local-first trading challenge built around a single\nFIFO limit order book for a binary `YES` contract.\n\nCompetitors implement a Python strategy"},{"url":"https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/docs/orderbook_prediction_market_challenge.md","quote":"- 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`\n- inv"},{"url":"https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/orderbook_pm_challenge/config.py","quote":"class ParameterVariance:\n    \"\"\"Recommended simulation-randomization bands.\"\"\"\n\n    initial_score_min: float = -0.75\n    initial_score_max: float = 0.75\n    jump_intensit"},{"url":"https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/orderbook_pm_challenge/types.py","quote":"class StepState:\n    \"\"\"Single callback payload delivered to the strategy.\n\n    `buy_filled_quantity` and `sell_filled_quantity` are the participant's\n    aggregate fille"},{"url":"https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/orderbook_pm_challenge/runner.py","quote":"def run_batch(\n    strategy_factory=None,\n    *,\n    strategy_path: str | None = None,\n    base_config: ChallengeConfig | None = None,\n    variance: ParameterVariance | N"},{"url":"https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/orderbook_pm_challenge/engine.py","quote":"for step in range(self._config.process.n_steps):\n                market.refresh_competitor(step)\n                state = market.build_step_state(\n                    step"},{"url":"https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/orderbook_pm_challenge/market.py","quote":"reserved_cash = round((1.0 - price) * uncovered, 10)\n\n        if self.free_cash() + EPSILON < reserved_cash:\n            raise OrderBookError(\"Insufficient free cash for"},{"url":"https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/orderbook_pm_challenge/process.py","quote":"def true_probability(\n    score: float,\n    steps_remaining: int,\n    config: JumpDiffusionConfig,\n) -> float:\n    \"\"\"Exact conditional probability that the terminal scor"},{"url":"https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/orderbook_pm_challenge/retail.py","quote":"def generate_orders(self) -> list[RetailOrder]:\n        count = _sample_poisson(self._rng, self._config.arrival_rate)\n        if count <= 0:\n            return []"},{"url":"https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/orderbook_pm_challenge/results.py","quote":"class SimulationResult:\n    seed: int\n    failed: bool\n    error: str | None\n    regime: RegimeSummary\n    total_edge: float\n    retail_edge: float\n    arb_edge: float"},{"url":"https://api.imd.fun/artifacts/04e37cd4e1a420b91cd7a012f416e6ebf1002c5c56867981741a3a77c72b9c48","quote":"\"scores_sha256\":\"bde43171c0191751c603d429d3c46ce55bae11086c2826bbb386c9e7ad58c470\""}]}
