# monte carlo

Bounded random walk simulation that projects the distribution of possible price paths for a prediction market.

## How It Works

1. **Starting point**: Current market price
2. **Simulation**: Runs N random walks (configurable, default 1,000)
3. **Each walk**: Steps forward in time with random price changes drawn from a calibrated distribution
4. **Bounds**: Prices are bounded between 0% and 100% (prediction market constraints)
5. **Output**: Distribution of final prices across all simulations

```
For each simulation:
  price = current_price
  for each time step:
    price += drift + volatility * random_normal()
    price = clamp(price, 0.01, 0.99)
  record final price
```

## Parameters

| Parameter       | Default                        | Configurable | Description                                  |
| --------------- | ------------------------------ | ------------ | -------------------------------------------- |
| **Simulations** | 1,000                          | Yes          | Number of random walks to run                |
| **Volatility**  | Estimated from historical data | Yes          | Standard deviation of price changes per step |
| **Drift**       | Based on momentum signals      | Yes          | Directional bias per step                    |
| **Time steps**  | Based on days to resolution    | Auto         | How many steps to simulate                   |

## Reading the Output

The Monte Carlo output shows:

* **Histogram**: Distribution of simulated final prices
* **Median outcome**: The 50th percentile price
* **Confidence interval**: Typically 10th to 90th percentile range
* **Probability above/below current**: What percentage of simulations end higher or lower than the current price

## Interpretation

| Result                      | Meaning                                   |
| --------------------------- | ----------------------------------------- |
| **Tight distribution**      | Market is stable, low volatility expected |
| **Wide distribution**       | High uncertainty, many possible outcomes  |
| **Skewed distribution**     | Asymmetric risk (more upside or downside) |
| **Median far from current** | Drift suggests the market may move        |

## Limitations

* Random walk assumes future price changes are independent of past changes. In reality, prediction markets can trend.
* Volatility is estimated from historical data, which may not reflect future conditions.
* Near-resolution markets converge toward 0% or 100%, which the bounded model captures but the drift estimates may lag.

## Calibration

Adjust Monte Carlo parameters in the [Calibrate tab](file:///6948179/calibration/parameters.md):

* Number of simulations
* Volatility multiplier
* Drift sensitivity


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yesno-1.gitbook.io/yesno-docs/models/monte-carlo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
