Insider trading detection on historical Polymarket data.
This repo contains the preprocessing pipeline and model-training inputs for the current 5-minute forward-markout binary classification task:
label = 1when the future YES price att + 5mimplies a positive user-side markoutlabel = 0otherwise
The default config applies conservative data-quality controls before training:
- stale labels are dropped when the matched future trade arrives more than
300safter the target horizon - near-zero markouts are dropped when
abs(markout_bps) < 5 - sequence and model-window splits can purge and embargo boundary regions
- model windows include the richer 16-feature market-state and user-history context set
The disk-backed pipeline stages are:
prepare-tradeslabel-user-tradesbuild-sequencesbuild-model-windows
run-pipeline intentionally stops after build-sequences. Exact-width model_windows are built as a separate stage so downstream model experiments can reuse them.
Local repo is the source of truth. Juno should only pull pushed commits, run Slurm jobs, and write generated datasets, model outputs, and reports under scratch-backed paths.
uv sync --extra dev
uv run insider prepare-trades --config configs/pipeline.toml --overwrite
uv run insider label-user-trades --config configs/pipeline.toml --overwrite
uv run insider build-sequences --config configs/pipeline.toml --overwrite
uv run insider build-model-windows --config configs/pipeline.toml --window-size 50 --overwrite
uv run insider run-pipeline --config configs/pipeline.toml --overwrite
uv run insider visualize-signals --config configs/pipeline.toml
uv run insider build-model-leaderboard --config configs/pipeline.toml
uv run insider build-model-audit --config configs/pipeline.toml
uv run insider smoke-test --config configs/pipeline.toml --overwriteDefault derived reports now land under <output.root>/reports/, not inside the git checkout:
visualize-signals:<output.root>/reports/signal-review/build-model-leaderboard:<output.root>/reports/model_leaderboard.csvbuild-model-audit:<output.root>/reports/model_audit.csv
ssh juno.utdallas.edu
bash scripts/link-juno-repo.sh
bash scripts/juno-sync.sh
sbatch jobs/preprocess/run-dev.sbatch
sbatch jobs/preprocess/run-normal.sbatch
sbatch jobs/windowing/run-window-50.sbatch
sbatch jobs/analysis/run-visualize-signals-dev.sbatchThe Juno sync and training scripts now refuse to run from a dirty checkout unless you explicitly opt out with ALLOW_DIRTY_REPO=1. That keeps generated artifacts and accidental notebook edits from polluting the remote repo state.
Juno currently has a broken uv binary in the shell path, so the remote scripts bootstrap a repo-local .venv with python3 -m venv instead of relying on uv there.
See pipeline.md for stage-level details. See output_dataset.md for the current processed-data contract and live Juno counts. See models.md for model-training details and tracked run summaries. See visualize-signals.md for the report workflow.