Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BTC + SPX Prediction Market Probability Engine

This project studies prediction-market YES/NO contracts through the lens of mathematical finance.

The core idea is that many prediction-market contracts can be interpreted as binary contingent claims. For example, a market such as “Will BTC finish above K by time T?” has a YES payoff of 1 if the event occurs and 0 otherwise. This makes the base case similar to a European digital or binary option, where the payoff depends on whether the underlying asset finishes above a threshold at the resolution time.

The project builds an asset-agnostic threshold probability engine. BTC is used as the primary case study because it is highly relevant to crypto prediction markets, while SPX/SPY is used as a traditional-finance benchmark to test whether the same framework transfers beyond crypto.

The base model focuses on terminal threshold events of the form: will asset S finish above threshold K at time T? Under this setup, the main modeling problem is estimating P(S_T > K). The project starts from stochastic assumptions about the asset price, derives the probability model, implements closed-form and Monte Carlo estimators, validates the results, and compares model-implied probabilities with market-implied prediction-market prices.

This project is not initially an American options project, because Polymarket positions are generally redeemed after market resolution rather than exercised early by the holder. However, the project can be extended toward American-style or optimal stopping problems by modeling the decision to exit a position before resolution. It can also be extended toward exotic options by modeling path-dependent events, such as whether BTC or SPX touches a barrier at any time before expiry, whether an average price crosses a threshold, or whether multiple conditions are triggered before resolution.

Therefore, the project begins as a binary/digital threshold probability engine and can later expand into barrier-style, path-dependent, and optimal-exit extensions.

Research Question

Can an asset-agnostic threshold probability engine estimate the probability of prediction-market-style events such as “Will asset S finish above threshold K by time T?”, and can the same framework be tested on BTC as the primary crypto case study and SPX/SPY as a traditional-finance benchmark?

Methodology

The project follows a math-first quant workflow:

  1. Define the prediction-market payoff.
  2. State the modeling assumptions.
  3. Derive the probability model.
  4. Implement the model in Python.
  5. Validate closed-form results with Monte Carlo simulation.
  6. Compare model-implied probabilities with market-implied prices.
  7. Adjust for spread, slippage, liquidity, and model risk.
  8. Evaluate calibration and execution-aware backtest results.

Planned Components

  • Binary YES/NO payoff framework
  • BTC and SPX threshold-event modeling
  • GBM-based probability model
  • Closed-form probability estimator
  • Monte Carlo probability estimator
  • Volatility sensitivity analysis
  • Market-implied probability comparison
  • Execution-aware edge calculation
  • Calibration metrics such as Brier score and log loss
  • Backtesting with bid/ask, spread, slippage, and liquidity constraints
  • Research note explaining assumptions, derivations, results, and limitations

Current Status

This repository is being built as a math-first quant research project. The first stage defines the research question, contract structure, and binary payoff framework before moving into stochastic modeling, Monte Carlo simulation, and market comparison.

About

Polymarket-style YES/NO pricing, market-implied probabilities, order book signals, ML forecasting, risk controls, and backtesting.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages