# mromundset/prediction_market_edge_analysis architecture

> Architecture diagram of the GitHub repository mromundset/prediction_market_edge_analysis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mromundset/prediction_market_edge_analysis
- Repository: https://github.com/mromundset/prediction_market_edge_analysis

## Overview

This repository is a collection of independent prediction-market research explorations, not a single trading application. The common workflow is to investigate a pricing hypothesis, obtain market prices and an independent comparison source, then evaluate whether an apparent discrepancy is meaningful or executable. The graph preserves the README’s major strategy branches and the weather market-making prototype. Some subsystems are represented by their exact enclosing directories because their source was not sampled; arrows are limited to documented or sampled interactions.

Main entry points: [`kalshi_macro_elections_exploration/scan.py`](https://github.com/mromundset/prediction_market_edge_analysis/blob/main/kalshi_macro_elections_exploration/scan.py) (Macro Elections Scan), [`kalshi_cross_venue_exploration/compare_fed.py`](https://github.com/mromundset/prediction_market_edge_analysis/blob/main/kalshi_cross_venue_exploration/compare_fed.py) (Fed Venue Comparison), [`weather_forecast_edge_exploration/analyze.py`](https://github.com/mromundset/prediction_market_edge_analysis/blob/main/weather_forecast_edge_exploration/analyze.py) (Weather Forecast Study), [`meteor_strike_edge_exploration/meteor_analysis.py`](https://github.com/mromundset/prediction_market_edge_analysis/blob/main/meteor_strike_edge_exploration/meteor_analysis.py) (Meteor Rate Study)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_research["Market Research"]
  node_snapshot["Market Snapshot<br/>[scan_markets.py]"]
  node_lopsided["Lopsided Scan<br/>[fetch_lopsided.py]"]
  node_internalarb["Internal Arb Scan"]
  node_consistency["Consistency Scan<br/>[scan_v2.py]"]
  node_ladder["Crypto Ladder Scan<br/>[scan.py]"]
end

subgraph group_crossvenue["Venue Comparisons"]
  node_macro["Macro Elections Scan<br/>[scan.py]"]
  node_fed["Fed Venue Comparison<br/>[compare_fed.py]"]
  node_overlap["Venue Overlap"]
  node_crypto["Crypto Probability Study"]
end

subgraph group_physical["Physical Forecasts"]
  node_weatherforecast["Weather Forecast Study<br/>[analyze.py]"]
  node_meteor["Meteor Rate Study<br/>[meteor_analysis.py]"]
  node_wxexplore["Weather Forecast Fetch<br/>[fetch_data.py]"]
end

subgraph group_marketmaking["Market Making"]
  node_wxmmstudy["Maker Feasibility Study<br/>[analyze_mm.py]"]
  node_kalshiclient["Kalshi Data Client<br/>[kalshi_client.py]"]
  node_recorder["Market Recorder<br/>[recorder.py]"]
  node_simulator["Quote Simulator<br/>[simulator.py]"]
end

node_researcher(("Researcher"))
node_pm["Polymarket"]
node_kalshi["Kalshi"]
node_deribit["Deribit"]
node_nasa["NASA/CNEOS"]
node_weatherdata["Weather Sources"]

node_researcher -->|"runs scan"| node_snapshot
node_snapshot -->|"fetches markets"| node_pm
node_researcher -->|"runs scan"| node_lopsided
node_lopsided -->|"fetches markets"| node_pm
node_researcher -->|"runs scan"| node_internalarb
node_internalarb -->|"fetches books"| node_pm
node_researcher -->|"runs scan"| node_consistency
node_consistency -->|"fetches markets"| node_pm
node_researcher -->|"runs scan"| node_ladder
node_ladder -->|"fetches books"| node_pm
node_researcher -->|"runs scan"| node_macro
node_macro -->|"fetches markets"| node_kalshi
node_macro -->|"searches markets"| node_pm
node_researcher -->|"runs comparison"| node_fed
node_fed -->|"fetches markets"| node_kalshi
node_fed -->|"fetches events"| node_pm
node_researcher -->|"runs analysis"| node_crypto
node_crypto -->|"uses options data"| node_deribit
node_researcher -->|"runs analysis"| node_weatherforecast
node_weatherforecast -->|"evaluates market prices"| node_kalshi
node_weatherforecast -->|"evaluates forecasts"| node_weatherdata
node_researcher -->|"runs fetch"| node_wxexplore
node_wxexplore -->|"fetches forecasts"| node_weatherdata
node_researcher -->|"runs analysis"| node_meteor
node_meteor -->|"fetches price history"| node_pm
node_meteor -->|"fetches record"| node_nasa
node_researcher -->|"runs analysis"| node_wxmmstudy
node_kalshiclient -->|"reads public data"| node_kalshi
node_recorder -->|"uses client"| node_kalshiclient
node_simulator -->|"uses client"| node_kalshiclient

click node_snapshot "https://github.com/mromundset/prediction_market_edge_analysis/blob/main/strategy_research/scan_markets.py"
click node_lopsided "https://github.com/mromundset/prediction_market_edge_analysis/blob/main/lopsided_market_scan/fetch_lopsided.py"
click node_internalarb "https://github.com/mromundset/prediction_market_edge_analysis/blob/main/internal_arb_exploration/scan_internal_arb.py"
click node_consistency "https://github.com/mromundset/prediction_market_edge_analysis/blob/main/cross_market_consistency_exploration/scan_v2.py"
click node_ladder "https://github.com/mromundset/prediction_market_edge_analysis/blob/main/crypto_ladder_d10_exploration/scan.py"
click node_macro "https://github.com/mromundset/prediction_market_edge_analysis/blob/main/kalshi_macro_elections_exploration/scan.py"
click node_fed "https://github.com/mromundset/prediction_market_edge_analysis/blob/main/kalshi_cross_venue_exploration/compare_fed.py"
click node_overlap "https://github.com/mromundset/prediction_market_edge_analysis/tree/main/kalshi_cross_venue_exploration"
click node_crypto "https://github.com/mromundset/prediction_market_edge_analysis/blob/main/crypto_deribit_edge_exploration/advanced_analysis.py"
click node_weatherforecast "https://github.com/mromundset/prediction_market_edge_analysis/blob/main/weather_forecast_edge_exploration/analyze.py"
click node_meteor "https://github.com/mromundset/prediction_market_edge_analysis/blob/main/meteor_strike_edge_exploration/meteor_analysis.py"
click node_wxexplore "https://github.com/mromundset/prediction_market_edge_analysis/blob/main/weather_forecast_edge_exploration/fetch_data.py"
click node_wxmmstudy "https://github.com/mromundset/prediction_market_edge_analysis/blob/main/weather_mm_feasibility_exploration/analyze_mm.py"
click node_kalshiclient "https://github.com/mromundset/prediction_market_edge_analysis/blob/main/weather_mm_feasibility_exploration/system/kalshi_client.py"
click node_recorder "https://github.com/mromundset/prediction_market_edge_analysis/blob/main/weather_mm_feasibility_exploration/system/recorder.py"
click node_simulator "https://github.com/mromundset/prediction_market_edge_analysis/blob/main/weather_mm_feasibility_exploration/system/simulator.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_snapshot,node_lopsided,node_internalarb,node_consistency,node_ladder toneBlue
class node_macro,node_fed,node_overlap,node_crypto toneAmber
class node_weatherforecast,node_meteor,node_wxexplore toneMint
class node_wxmmstudy,node_kalshiclient,node_recorder,node_simulator toneRose
class node_researcher,node_pm,node_kalshi,node_deribit,node_nasa,node_weatherdata toneIndigo
```

## Components

### Market Research

- [Market Snapshot](https://github.com/mromundset/prediction_market_edge_analysis/blob/main/strategy_research/scan_markets.py): `strategy_research/scan_markets.py`
- [Lopsided Scan](https://github.com/mromundset/prediction_market_edge_analysis/blob/main/lopsided_market_scan/fetch_lopsided.py): `lopsided_market_scan/fetch_lopsided.py`
- [Internal Arb Scan](https://github.com/mromundset/prediction_market_edge_analysis/blob/main/internal_arb_exploration/scan_internal_arb.py): `internal_arb_exploration/scan_internal_arb.py`
- [Consistency Scan](https://github.com/mromundset/prediction_market_edge_analysis/blob/main/cross_market_consistency_exploration/scan_v2.py): `cross_market_consistency_exploration/scan_v2.py`
- [Crypto Ladder Scan](https://github.com/mromundset/prediction_market_edge_analysis/blob/main/crypto_ladder_d10_exploration/scan.py): `crypto_ladder_d10_exploration/scan.py`

### Venue Comparisons

- [Macro Elections Scan](https://github.com/mromundset/prediction_market_edge_analysis/blob/main/kalshi_macro_elections_exploration/scan.py): `kalshi_macro_elections_exploration/scan.py`
- [Fed Venue Comparison](https://github.com/mromundset/prediction_market_edge_analysis/blob/main/kalshi_cross_venue_exploration/compare_fed.py): `kalshi_cross_venue_exploration/compare_fed.py`
- [Venue Overlap](https://github.com/mromundset/prediction_market_edge_analysis/tree/main/kalshi_cross_venue_exploration): `kalshi_cross_venue_exploration`
- [Crypto Probability Study](https://github.com/mromundset/prediction_market_edge_analysis/blob/main/crypto_deribit_edge_exploration/advanced_analysis.py): `crypto_deribit_edge_exploration/advanced_analysis.py`

### Physical Forecasts

- [Weather Forecast Study](https://github.com/mromundset/prediction_market_edge_analysis/blob/main/weather_forecast_edge_exploration/analyze.py): `weather_forecast_edge_exploration/analyze.py`
- [Meteor Rate Study](https://github.com/mromundset/prediction_market_edge_analysis/blob/main/meteor_strike_edge_exploration/meteor_analysis.py): `meteor_strike_edge_exploration/meteor_analysis.py`
- [Weather Forecast Fetch](https://github.com/mromundset/prediction_market_edge_analysis/blob/main/weather_forecast_edge_exploration/fetch_data.py): `weather_forecast_edge_exploration/fetch_data.py`

### Market Making

- [Maker Feasibility Study](https://github.com/mromundset/prediction_market_edge_analysis/blob/main/weather_mm_feasibility_exploration/analyze_mm.py): `weather_mm_feasibility_exploration/analyze_mm.py`
- [Kalshi Data Client](https://github.com/mromundset/prediction_market_edge_analysis/blob/main/weather_mm_feasibility_exploration/system/kalshi_client.py): `weather_mm_feasibility_exploration/system/kalshi_client.py`
- [Market Recorder](https://github.com/mromundset/prediction_market_edge_analysis/blob/main/weather_mm_feasibility_exploration/system/recorder.py): `weather_mm_feasibility_exploration/system/recorder.py`
- [Quote Simulator](https://github.com/mromundset/prediction_market_edge_analysis/blob/main/weather_mm_feasibility_exploration/system/simulator.py): `weather_mm_feasibility_exploration/system/simulator.py`

### Other components

- **Researcher**
- **Polymarket**
- **Kalshi**
- **Deribit**
- **NASA/CNEOS**
- **Weather Sources**

## Connections

- Researcher → Market Snapshot: runs scan
- Market Snapshot → Polymarket: fetches markets
- Researcher → Lopsided Scan: runs scan
- Lopsided Scan → Polymarket: fetches markets
- Researcher → Internal Arb Scan: runs scan
- Internal Arb Scan → Polymarket: fetches books
- Researcher → Consistency Scan: runs scan
- Consistency Scan → Polymarket: fetches markets
- Researcher → Crypto Ladder Scan: runs scan
- Crypto Ladder Scan → Polymarket: fetches books
- Researcher → Macro Elections Scan: runs scan
- Macro Elections Scan → Kalshi: fetches markets
- Macro Elections Scan → Polymarket: searches markets
- Researcher → Fed Venue Comparison: runs comparison
- Fed Venue Comparison → Kalshi: fetches markets
- Fed Venue Comparison → Polymarket: fetches events
- Researcher → Crypto Probability Study: runs analysis
- Crypto Probability Study → Deribit: uses options data
- Researcher → Weather Forecast Study: runs analysis
- Weather Forecast Study → Kalshi: evaluates market prices
- Weather Forecast Study → Weather Sources: evaluates forecasts
- Researcher → Weather Forecast Fetch: runs fetch
- Weather Forecast Fetch → Weather Sources: fetches forecasts
- Researcher → Meteor Rate Study: runs analysis
- Meteor Rate Study → Polymarket: fetches price history
- Meteor Rate Study → NASA/CNEOS: fetches record
- Researcher → Maker Feasibility Study: runs analysis
- Kalshi Data Client → Kalshi: reads public data
- Market Recorder → Kalshi Data Client: uses client
- Quote Simulator → Kalshi Data Client: uses client
