prediction-market-analysis
Route analysis, indexing, and data-ops guidance for the prediction-market-analysis repo.
- License 许可
- MIT
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- prediction-market-analysis
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Route analysis, indexing, and data-ops guidance for the prediction-market-analysis repo.
- disable-model-invocation
- true
02 资源文件 9
- 参考文档references/analysis-catalog.md3.4 KB
- 参考文档references/api-reference.md5.2 KB
- 参考文档references/cli-reference.md3.0 KB
- 参考文档references/data-layout.md3.9 KB
- 参考文档references/data-ops.md1.9 KB
- 参考文档references/indexing-catalog.md2.9 KB
- 参考文档references/repo-provenance.md968 B
- 参考文档references/repo-routing-metadata.json515 B
- 参考文档references/troubleshooting.md4.3 KB
03 SKILL.md 正文
prediction-market-analysis
This skill covers the repo that analyzes and collects Kalshi and Polymarket market data. The repo is centered on three user-facing workflows:
analyzefor calibration, returns, volume, category, and comparison studies.indexfor Kalshi and Polymarket market/trade/block backfills.setup/packagefor dataset download, archive management, and local data packaging.
Environment
- Preferred setup:
uv sync --frozen --group devfrom the repo root. - Minimal import smoke:
uv run python -c "import src; print(src.__file__)". - The bundled helper scripts assume the repo runtime dependencies are available.
First stop
- Read
references/cli-reference.mdfor command names and command-line behavior. - Read
references/data-layout.mdfor directory layout, parquet inputs, and env vars. - Read
references/api-reference.mdfor the public Python classes and helper functions. - Read
references/troubleshooting.mdwhen a workflow fails, returns empty data, or cannot find files.
When to use each sub-skill
sub-skills/analysis/
Use when the task is about:
- Running or interpreting an existing analysis.
- Comparing Kalshi vs Polymarket calibration, returns, or volume.
- Understanding
Analysis,AnalysisOutput,ChartConfig, orAnalysis.load()behavior. - Adding a new analysis class under
src/analysis/.
Typical signals:
win_rate_by_price, mispricing, maker_taker, volume_over_time, meta_stats, polymarket, calibration, chart, output/.
sub-skills/indexing/
Use when the task is about:
- Backfilling Kalshi or Polymarket markets or trades.
- Resuming interrupted cursor-based collection jobs.
- Fetching Polygon block timestamps or legacy FPMM trades.
- Understanding
KalshiClient,PolymarketClient,PolygonClient, orIndexer.load()behavior. - Adding a new indexer class under
src/indexers/.
Typical signals:
kalshi_markets, kalshi_trades, polymarket_markets, polymarket_trades, polymarket_blocks, polymarket_fpmm_trades, cursor, backfill, POLYGON_RPC, resume.
sub-skills/data-ops/
Use when the task is about:
- Downloading the prebuilt dataset or restoring the
data/directory. - Packaging the dataset into
data.tar.zst. - Installing or diagnosing local host tools such as
zstd,aria2c,curl, orwget. - Understanding the repo's
make setupandmake packageworkflows.
Typical signals:
make setup, make package, data.tar.zst, download.sh, install-tools.sh, zstd, aria2c, curl, wget.
Shared facts
- The package distribution is
prediction-market-data; the source package tree is rooted atsrc/. Analysis.load()andIndexer.load()default tosrc/analysisandsrc/indexersrelative to the current working directory.- The repo uses Parquet data under
data/kalshi/anddata/polymarket/, plus CSV/JSON/PNG/PDF/GIF outputs underoutput/. main.pydispatchesanalyze,index, andpackage.make setupis a convenience wrapper for host-tool installation plus dataset download.main.py package/make packagecreatedata.tar.zst; the code does not delete the sourcedata/directory.
Bundled helpers
scripts/catalog.pylists available analyses and indexers from the repo checkout when run through the repo environment.scripts/run_analysis.shruns the analysis CLI from the repo root.scripts/run_index.shruns the indexing CLI from the repo root.scripts/package_data.shruns dataset packaging from the repo root.
Shared references
references/analysis-catalog.mdfor the full analysis catalog.references/indexing-catalog.mdfor the full indexer catalog and cursor files.references/data-ops.mdfor download, extraction, and packaging details.references/troubleshooting.mdfor cross-cutting failures.
If a request names missing data, a cursor problem, a Polygon RPC issue, a download failure, or a headless plotting problem, read the matching troubleshooting section before guessing.
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.