This repository contains the software submission for a Computer Science coursework project on a cross-domain Polymarket / prediction-market research agent. The project combines runtime market components, domain-specific research adapters, and an evaluation pipeline used to produce the tables in the paper.
The repository is not a production trading system. The generated paper tables are research/evaluation artefacts, not live trading functionality or financial advice.
The project studies a reactive agent that compares opportunities across three domains:
- Counter-Strike 2 match markets.
- Bitcoin 5-minute/news-driven markets.
- Weather event markets.
Each domain is converted into a shared DomainReport format. The evaluation
pipeline then applies policy rules, optional PMXT execution evidence, baseline
comparisons, and table aggregation. This allows the paper to compare a proposed
cross-domain selector against simpler baselines using the same reporting format.
DIA-CW/
├─ README.md
├─ paper/
│ └─ main.pdf # Coursework paper
├─ poly-ok-check/
│ ├─ src/ # Rust runtime and market-system code
│ ├─ tests/ # Rust tests
│ ├─ requirements.txt # Python research/evaluation dependencies
│ └─ research/
│ ├─ adapters/ # Convert domain outputs to DomainReport
│ ├─ backtest/ # Lightweight research/backtest support
│ ├─ config/ # Coursework evaluation configuration
│ ├─ data/ # Research inputs and evidence snapshots
│ ├─ evaluation/ # Baselines, policies, and table aggregation
│ ├─ run/ # Reproducible evaluation entrypoints
│ ├─ runs/ # Generated evaluation outputs
│ └─ schemas/ # Shared research data contracts
└─ vendor/
└─ prediction-market-backtesting/
poly-ok-check/src/ contains the Rust runtime/system code. It covers market
data, contracts, adapters, storage, and executable bins used around the live or
runtime-facing side of the project.
poly-ok-check/research/ contains the Python research and evaluation code. This
is where the CS2, BTC/news, and weather outputs are normalised into shared
reports and evaluated in a reproducible coursework setting.
poly-ok-check/research/evaluation/cw_tables.py,
poly-ok-check/research/run/run_cw_experiment.py, and
poly-ok-check/research/runs/cw_final/ are paper-support components. They
generate and store the aggregate CSV tables used in the coursework paper. They
should not be read as live trading logic.
vendor/prediction-market-backtesting/ is kept as a vendored backtesting
dependency and reference implementation. Local generated reports from that tool
belong in ignored output folders, not in the main evaluation tables unless they
are explicitly imported by the evaluation config.
From the repository root:
cd DIA-CW
python -m pip install -r requirements.txtUsing a virtual environment is recommended, but not required. If you use one, activate it before installing the dependencies.
From the repository root:
cd poly-ok-check
$env:PYTHONPATH = (Get-Location).Path
python -m research.run.run_cw_experiment `
--config research/config/cw_experiment.yaml `
--out-dir research/runs/cw_finalThe config file is named .yaml, but the current runner parses it as
JSON-compatible YAML. Keep it valid JSON unless the loader is changed.
The main generated outputs are:
unified_domain_reports.csv: the combined domain reports after policy and baseline expansion.policy_diagnostics.csv: diagnostics for the category policy stage.pmxt_execution_diagnostics.csv: diagnostics for optional PMXT execution evidence, if generated by the runner.table1_overall.csv: overall baseline comparison for Table I.table2_by_domain.csv: proposed-agent results by domain for Table II.table3_threshold.csv: threshold sensitivity for Table III.table4_examples.csv: representative signals for Table IV.paper_placeholders.md: a generated convenience output with paper-facing values derived from the tables. It is not a manually maintained documentation file.
Do not edit these generated results by hand when using them as evidence. If inputs or policy settings change, regenerate the outputs with the command above.
Python research tests:
cd poly-ok-check
$env:PYTHONPATH = (Get-Location).Path
python -m pytest research/tests -qRust tests:
cd poly-ok-check
cargo testSome tests or reproduction commands may require external tools, data snapshots, network access, or API credentials depending on the environment. Failed tests should be reported honestly rather than treated as successful.
The project is an academic prototype. The evaluation uses historical snapshots, fixed research assumptions, and generated paper-support outputs. It does not fully model live liquidity, slippage, exchange outages, operational risk, or real-money execution constraints.
The news and evidence inputs are also limited by the availability and quality of the collected data. Results should be interpreted as coursework evidence for a research design, not as a deployable trading strategy.
This repository is intended for coursework marking, review, and reproducibility. It should not be used to place trades or to make financial decisions. The table generation scripts exist to reproduce the paper's evaluation results; they are not part of a live trading system.