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:
- Polymarket: 2% taker fee on entry, no exit fee.
- Kalshi: $0.01 per contract per side (buy and settlement).
- 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:
- What is the CFTC and why does it regulate prediction markets?
- What is a Designated Contract Market (DCM)?
- What was a no-action letter and how did PredictIt use one?
- Why did the CFTC initially block election contracts, and what changed?
- 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:
- Central Limit Order Book (CLOB)
- Automated Market Maker (AMM) — Constant Product
- Forecast Aggregation (non-market mechanism)
- 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:
- What happens when a user deposits $1 of USDC?
- What are the two tokens they receive, and what is the relationship between them?
- If the Yes token is trading at $0.65, what should the No token theoretically trade at? Why?
- What happens to each token when the event resolves?
- 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:
- Prediction: 90%
- Prediction: 70%
- Prediction: 50%
- Prediction: 30%
- 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 |
- Plot this calibration curve (predicted vs. actual).
- Is this forecaster well-calibrated? Where are they overconfident, and where are they underconfident?
- 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:
- Geographic access
- Position limits
- Market maker incentives
- Cryptocurrency vs. fiat currency accessibility
- 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:
- A university researcher studying election forecasting accuracy who needs historical data.
- A professional trader with $50,000 to deploy on U.S. political markets.
- A high school student who wants to practice making predictions and improve their calibration.
- A software developer who wants to build a prediction market aggregator app.
- A hedge fund that wants to use prediction market data as a signal for trading equities.
- 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:
- Fetch the 20 most active markets.
- For each market, extract: question, Yes price, No price, volume, and liquidity.
- Calculate the "vig" (the amount by which Yes price + No price exceeds 1.00, if any).
- 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:
- Search for all open questions containing the word "AI" or "artificial intelligence."
- For each question, extract: title, community prediction (median), number of forecasters, and close date.
- Create a histogram showing the distribution of community predictions (bucket by decile).
- 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:
- Fetches the top 50 markets on Manifold by number of unique bettors.
- Calculates the average probability across all fetched markets.
- Finds the market with the highest volume and the one with the lowest probability.
- 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:
- Calculate the bid-ask spread.
- Calculate the midpoint price.
- Calculate the total depth (in dollars) within 5 cents of the midpoint on each side.
- Estimate the price impact of a $1,000 market buy order by walking through the ask levels.
- 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:
- Completeness: What fraction of markets have non-null values for key fields (probability, volume, close date)?
- Consistency: For markets that exist on multiple platforms, how different are the probabilities?
- Timeliness: How recently were prices updated? (Check any available timestamp fields.)
- 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:
- Connects to one of these WebSocket endpoints.
- Subscribes to price updates for a specific market.
- Prints each price update as it arrives, with a timestamp.
- 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:
- How does capping the number of traders affect price accuracy? Use the concept of the "wisdom of crowds" to frame your answer.
- What market distortions arise? Consider: locked-out informed traders, early-mover advantage, and liquidity.
- 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:
- Polymarket (UMA oracle with dispute mechanism)
- Kalshi (centralized resolution team)
- Metaculus (admin resolution)
- Manifold (creator resolution)
- 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:
- Why do people forecast accurately when there is no money at stake?
- What non-monetary incentives drive accuracy on Manifold?
- Are there categories of questions where play-money markets are more or less accurate than real-money markets?
- 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.
- Is this an arbitrage opportunity? Why or why not?
- What frictions prevent a single trader from exploiting this difference?
- What does the persistent price difference tell us about the "law of one price" in prediction markets?
- 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:
- Revenue model: How does each platform make money? Is it sustainable?
- Regulatory risk: What regulatory changes could threaten each platform?
- Network effects: Does the platform benefit from more users? How strong is the effect?
- 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:
- Identify a set of questions that are asked on multiple platforms.
- Define how you would measure "information aggregation efficiency" (consider speed of reaction to news, accuracy of final probability, and calibration).
- Specify what data you would collect and how.
- Describe potential confounds and how you would control for them.
- 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:
- Moral hazard: Should people be allowed to profit from disasters (e.g., betting on pandemic severity)?
- Market manipulation: Can prediction markets be manipulated to influence outcomes (e.g., election markets affecting voter behavior)?
- Access inequality: Real-money platforms exclude those without capital or crypto knowledge. Is this a problem?
- Regulation: Should prediction markets be regulated as gambling, as financial instruments, or as something new?
- Privacy: What privacy concerns arise from participating in prediction markets, especially crypto-native ones with public blockchain records?
End of Chapter 5 Exercises