Chapter 5 Exercises

Section A: Platform Knowledge and Comparison (Exercises 1–10)

Exercise 1: Platform Categorization

Create a table categorizing each of the following platforms along two axes: (a) real money vs. play money, and (b) regulated vs. unregulated/decentralized.

Platforms to classify: Polymarket, Kalshi, Metaculus, Manifold Markets, PredictIt, Augur, Betfair Exchange, Google internal prediction markets.

For each platform, also note: the year it launched, the primary currency used, and whether individual users can create markets.


Exercise 2: Fee Impact Calculation

A trader buys 100 contracts at $0.55 each on a binary event that resolves Yes (paying $1.00 per contract).

Calculate the net profit on each of the following platforms, accounting for their fee structures:

  1. Polymarket: 2% taker fee on entry, no exit fee.
  2. Kalshi: $0.01 per contract per side (buy and settlement).
  3. PredictIt: No trading fee, but 10% profit fee and 5% withdrawal fee.

Which platform yields the highest net profit? Which yields the lowest? Express each result as both a dollar amount and a percentage return on investment.


Exercise 3: Regulatory Landscape Mapping

Write a 300-word summary explaining the regulatory status of prediction markets in the United States. Your summary should address:

  1. What is the CFTC and why does it regulate prediction markets?
  2. What is a Designated Contract Market (DCM)?
  3. What was a no-action letter and how did PredictIt use one?
  4. Why did the CFTC initially block election contracts, and what changed?
  5. How does Polymarket handle U.S. regulatory requirements?

Exercise 4: Market Mechanism Comparison

For each of the following market mechanisms, describe how it works and name at least one platform that uses it:

  1. Central Limit Order Book (CLOB)
  2. Automated Market Maker (AMM) — Constant Product
  3. Forecast Aggregation (non-market mechanism)
  4. Hybrid CLOB with off-chain matching and on-chain settlement

For the CLOB and AMM mechanisms, explain what happens to the price when a large buy order comes in. How do they differ in their response?


Exercise 5: Conditional Token Framework

Explain the Conditional Token Framework used by Polymarket. Specifically:

  1. What happens when a user deposits $1 of USDC?
  2. What are the two tokens they receive, and what is the relationship between them?
  3. If the Yes token is trading at $0.65, what should the No token theoretically trade at? Why?
  4. What happens to each token when the event resolves?
  5. What role does the UMA oracle play in resolution?

Draw a diagram showing the lifecycle of a conditional token from creation to resolution.


Exercise 6: Scoring System Analysis

Metaculus uses a log scoring rule. For the following predictions on a question that resolved Yes, calculate the log score:

  1. Prediction: 90%
  2. Prediction: 70%
  3. Prediction: 50%
  4. Prediction: 30%
  5. Prediction: 10%

Use the formula: Log Score = log2(p), where p is the probability assigned to the correct outcome.

Now answer: If the question had resolved No instead, recalculate the scores for each prediction. What pattern do you notice about the relationship between confidence and score?


Exercise 7: Calibration Curve Interpretation

A forecaster on Metaculus has the following calibration data:

Predicted Probability Range Number of Questions Fraction Resolved Yes
0%–10% 50 0.04
10%–20% 45 0.18
20%–30% 60 0.22
30%–40% 55 0.38
40%–50% 40 0.45
50%–60% 45 0.58
60%–70% 65 0.62
70%–80% 70 0.72
80%–90% 50 0.86
90%–100% 55 0.93
  1. Plot this calibration curve (predicted vs. actual).
  2. Is this forecaster well-calibrated? Where are they overconfident, and where are they underconfident?
  3. Calculate the mean absolute calibration error (average absolute difference between predicted midpoint and actual resolution rate).

Exercise 8: Liquidity Analysis

Explain why Polymarket typically has higher liquidity than Kalshi for political markets, despite Kalshi being the regulated U.S. exchange. Consider the following factors in your analysis:

  1. Geographic access
  2. Position limits
  3. Market maker incentives
  4. Cryptocurrency vs. fiat currency accessibility
  5. Regulatory constraints on market creation

Exercise 9: Platform Selection Framework

For each of the following user profiles, recommend the best platform and justify your choice:

  1. A university researcher studying election forecasting accuracy who needs historical data.
  2. A professional trader with $50,000 to deploy on U.S. political markets.
  3. A high school student who wants to practice making predictions and improve their calibration.
  4. A software developer who wants to build a prediction market aggregator app.
  5. A hedge fund that wants to use prediction market data as a signal for trading equities.
  6. A nonprofit organization that wants to forecast the success of different intervention strategies.

Exercise 10: Counterparty Risk Assessment

Rank the following platforms from lowest to highest counterparty risk and explain your ranking:

  • Polymarket
  • Kalshi
  • PredictIt (during wind-down)
  • Manifold Markets
  • Augur v2

For each platform, identify: (a) who holds user funds, (b) what regulatory protections exist, and (c) what would happen to user funds if the platform ceased operations.


Section B: API and Technical Exercises (Exercises 11–20)

Exercise 11: Polymarket API Explorer

Write a Python script that uses the Polymarket Gamma API to:

  1. Fetch the 20 most active markets.
  2. For each market, extract: question, Yes price, No price, volume, and liquidity.
  3. Calculate the "vig" (the amount by which Yes price + No price exceeds 1.00, if any).
  4. Sort markets by volume and display as a formatted table.

Hint: Use the endpoint GET https://gamma-api.polymarket.com/markets.


Exercise 12: Metaculus API Data Extraction

Write a Python script that uses the Metaculus API to:

  1. Search for all open questions containing the word "AI" or "artificial intelligence."
  2. For each question, extract: title, community prediction (median), number of forecasters, and close date.
  3. Create a histogram showing the distribution of community predictions (bucket by decile).
  4. Identify the question with the most forecasters and the one with the most extreme probability (closest to 0% or 100%).

Exercise 13: Manifold Markets API Interaction

Write a Python script that:

  1. Fetches the top 50 markets on Manifold by number of unique bettors.
  2. Calculates the average probability across all fetched markets.
  3. Finds the market with the highest volume and the one with the lowest probability.
  4. Groups markets by their mechanism type and counts how many use each mechanism.

Exercise 14: Cross-Platform Data Normalization

Design and implement a Python NormalizedMarket dataclass that can represent a market from any of the major platforms. Your dataclass should include at minimum:

  • Platform name
  • Question text
  • Current probability
  • Volume (in native currency)
  • Number of participants
  • URL
  • Market mechanism type
  • Currency type

Write converter functions that take raw API responses from Polymarket, Metaculus, and Manifold and convert them to NormalizedMarket instances.


Exercise 15: Order Book Analysis

Using the Polymarket CLOB API or the Kalshi API, fetch the order book for an active market. Then:

  1. Calculate the bid-ask spread.
  2. Calculate the midpoint price.
  3. Calculate the total depth (in dollars) within 5 cents of the midpoint on each side.
  4. Estimate the price impact of a $1,000 market buy order by walking through the ask levels.
  5. Visualize the order book as a depth chart (cumulative quantity at each price level).

Exercise 16: Historical Price Tracker

Write a Python script that periodically (every 5 minutes, for a configurable duration) fetches the price of a specific market from the Polymarket Gamma API and stores the timestamp and price in a local CSV file.

After collecting at least 1 hour of data, plot the price time series. Discuss what events might cause price movements you observe.

Note: Be mindful of API rate limits. Include appropriate sleep intervals.


Exercise 17: API Rate Limit Testing

Write a Python script that tests the rate limits of the Manifold Markets API by making requests at increasing frequencies. Start at 1 request per second and increase until you receive a 429 (Too Many Requests) response.

Record: (a) the threshold at which rate limiting kicks in, (b) the headers in the rate-limited response, and (c) how long you need to wait before requests succeed again.

Important: Only do this with the Manifold API, which is the most permissive. Do not stress-test other APIs.


Exercise 18: Market Creation Comparison

Compare the process of creating a market on Manifold Markets (via API) with the process on other platforms. Write a Python script that uses the Manifold API to create a new binary market with the following parameters:

  • Question: "Will it rain in [your city] on [a date 7 days from now]?"
  • Initial probability: 50%
  • Close date: The specified date
  • Description: Include resolution criteria

Note: You will need a Manifold API key. Document each API field and what it controls.


Exercise 19: Data Quality Assessment

Write a Python script that assesses data quality across platforms by checking:

  1. Completeness: What fraction of markets have non-null values for key fields (probability, volume, close date)?
  2. Consistency: For markets that exist on multiple platforms, how different are the probabilities?
  3. Timeliness: How recently were prices updated? (Check any available timestamp fields.)
  4. Validity: Are all probabilities between 0 and 1? Are volumes non-negative?

Run this across 100+ markets from each platform and produce a data quality report.


Exercise 20: WebSocket Price Stream

Polymarket and Kalshi both offer WebSocket APIs for real-time price updates. Write a Python script using the websockets library that:

  1. Connects to one of these WebSocket endpoints.
  2. Subscribes to price updates for a specific market.
  3. Prints each price update as it arrives, with a timestamp.
  4. After 100 updates, calculates and prints: the average update frequency, the price range observed, and the largest single price movement.

Note: WebSocket endpoints may require authentication. Document the connection process.


Section C: Analysis and Critical Thinking (Exercises 21–28)

Exercise 21: The 850-Trader Problem

PredictIt's no-action letter limited each market to 850 traders. Analyze the theoretical and practical effects of this limit:

  1. How does capping the number of traders affect price accuracy? Use the concept of the "wisdom of crowds" to frame your answer.
  2. What market distortions arise? Consider: locked-out informed traders, early-mover advantage, and liquidity.
  3. If you could redesign PredictIt's constraints, what limits would you propose and why?

Exercise 22: Resolution Risk Comparison

For each platform, explain how market resolution works and identify potential failure modes:

  1. Polymarket (UMA oracle with dispute mechanism)
  2. Kalshi (centralized resolution team)
  3. Metaculus (admin resolution)
  4. Manifold (creator resolution)
  5. Augur (REP token holder voting)

Which system is most robust? Which is most prone to manipulation? Justify your answer with specific examples or hypothetical scenarios.


Exercise 23: The Play Money Puzzle

Research and analysis exercise: Manifold Markets uses play money (Mana) yet often produces surprisingly accurate forecasts. Write a 500-word analysis exploring:

  1. Why do people forecast accurately when there is no money at stake?
  2. What non-monetary incentives drive accuracy on Manifold?
  3. Are there categories of questions where play-money markets are more or less accurate than real-money markets?
  4. What evidence exists comparing play-money vs. real-money prediction accuracy?

Exercise 24: Geographic Arbitrage

A market asks "Will Bitcoin exceed $100,000 by December 31, 2025?" Suppose this market exists on both Polymarket (accessible globally, excluding U.S.) and Kalshi (U.S. only). The Polymarket price is $0.72 and the Kalshi price is $0.65.

  1. Is this an arbitrage opportunity? Why or why not?
  2. What frictions prevent a single trader from exploiting this difference?
  3. What does the persistent price difference tell us about the "law of one price" in prediction markets?
  4. List all costs and risks of attempting to arbitrage this difference.

Exercise 25: Platform Longevity Assessment

Evaluate the long-term sustainability of each major platform by considering:

  1. Revenue model: How does each platform make money? Is it sustainable?
  2. Regulatory risk: What regulatory changes could threaten each platform?
  3. Network effects: Does the platform benefit from more users? How strong is the effect?
  4. Competition: What competitive threats does each platform face?

Rank the platforms from most likely to least likely to still be operating in 5 years. Justify your ranking.


Exercise 26: Information Aggregation Efficiency

Design an experiment (on paper) to test which platform aggregates information most efficiently. Your experiment should:

  1. Identify a set of questions that are asked on multiple platforms.
  2. Define how you would measure "information aggregation efficiency" (consider speed of reaction to news, accuracy of final probability, and calibration).
  3. Specify what data you would collect and how.
  4. Describe potential confounds and how you would control for them.
  5. State your hypothesis about which platform will perform best and why.

Exercise 27: Building a Platform Recommendation Engine

Design (and optionally implement) a "Platform Recommendation Engine" that takes as input:

  • User's country of residence
  • Investment amount (or $0 for play money)
  • Primary interest (politics, economics, technology, science, sports, personal)
  • Experience level (beginner, intermediate, advanced)
  • Goal (profit, research, practice, building)

And outputs a ranked list of recommended platforms with explanations.

Implement this as a Python function with a simple command-line interface.


Exercise 28: Ethical Analysis

Prediction markets raise several ethical questions. Write a 500-word analysis addressing at least three of the following:

  1. Moral hazard: Should people be allowed to profit from disasters (e.g., betting on pandemic severity)?
  2. Market manipulation: Can prediction markets be manipulated to influence outcomes (e.g., election markets affecting voter behavior)?
  3. Access inequality: Real-money platforms exclude those without capital or crypto knowledge. Is this a problem?
  4. Regulation: Should prediction markets be regulated as gambling, as financial instruments, or as something new?
  5. Privacy: What privacy concerns arise from participating in prediction markets, especially crypto-native ones with public blockchain records?

End of Chapter 5 Exercises