Random Walk Models: Pricing UP/DOWN Contracts
Explore a random walk model for trading UP/DOWN contracts: turn volatility, Gaussian price steps, and settlement TWAPs into probability estimates.

A price above the line is only the beginning
An UP/DOWN market looks simple: will the settlement price finish at or above a specified price to beat? But being above that line now does not tell you what an UP contract is worth. Distance, time remaining, volatility, and the settlement rule all matter.
Start without averaging. Let Sₜ be the current price from the market’s resolution source, K its price to beat, T the settlement time, and τ = T − t the seconds remaining. UP pays $1 if S_T reaches or exceeds K; otherwise it pays $0. We want the probability of that payout.
What a Gaussian random walk assumes
A random walk adds a random increment at each step. Here those increments are independent and normally distributed, with zero mean and variance proportional to elapsed time. The scale σ is measured in price units per square root of a second: doubling the time doubles variance, not standard deviation.
In continuous time this is arithmetic Brownian motion. B is standard Brownian motion and ℱₜ represents what is known at time t. Keep σ fixed over the forecast interval. Independent Gaussian increments add to another Gaussian, so the terminal distribution follows exactly. This is a local price-level model, not geometric Brownian motion.
From a distribution to a contract value
Standardize the distance to K by the remaining standard deviation. The normal cumulative distribution function Φ then gives the UP probability; DOWN is its complement. At the barrier the model gives 50%, provided time and volatility are positive. Before settlement, equality has probability zero in this continuous model; the completed contract treats a tie as UP.
If prices really followed this process and σ were known, this would be the exact conditional probability within the model. For a $1 binary payout, that probability is also its expected payout in dollars. Calling it a fair value assumes no discounting or costs and uses this probability model for valuation. It is neither an exact prediction of the future underlying price nor a guarantee that the market quote should match.
Now change what settles: a TWAP
Some contracts settle on the time-weighted average price over the final L seconds. TWAP here means the settlement benchmark, not an order-execution schedule. The event becomes A_T ≥ K. Nearby prices share most of their history, so their levels are correlated: treating each price in the average as an independent observation would produce the wrong uncertainty.
Before the averaging window starts
When τ ≥ L, the conditional average still has mean Sₜ. Its variance has two parts: uncertainty accumulated before the window, and uncertainty from the average within it. Brownian covariance is min(u, v); integrating it over the window produces L³/3. The window’s contribution after dividing by L² is therefore L/3.
The resulting variance is σ²(τ − 2L/3), not σ²τ. At the start of a 60-second window, it is one-third of the variance of the terminal spot price. Averaging smooths uncertainty, but does not eliminate it.
Inside the window, history is already locked
When 0 < τ < L, part of the final average has already been observed. Call its accumulated price × time area Iₜ. That area is fixed. Only the remaining τ seconds are random. In the expression below, B starts at zero at the current observation.
The expected remaining area is τSₜ. Integrating the future Brownian path gives variance σ²τ³/3, then division by L² gives the settlement-average variance. Its standard deviation shrinks as τ³ᐟ², faster than the √τ of a spot close. Use the same normal CDF with this new mean and variance. At τ = L, the before-window and inside-window formulas agree.
The latest price can point the wrong way
Take an illustrative 60-second TWAP with K = 100 and 15 seconds remaining. The first 45 seconds averaged 100.10, but the latest price is 99.90. Let σ = 0.10 price units per √second.
A spot-close calculation gives only about 39.8% for UP. The settlement-TWAP calculation gives about 81.4%: the already-recorded prices pull the expected average above K. Same current price, same volatility, same clock—different settlement event. These are model probabilities for a worked example, not trading returns.
Estimate volatility from the market you are in
The distribution needs σ. A constant chosen once assumes that today’s quiet hour and today’s busy hour have the same variance rate. The block instead estimates recent realized volatility from the matching resolution-price history. Choose 1 minute, 5 minutes, or 1 hour; 5 minutes is the default.
For a history covering H seconds, it sums squared successive log returns and divides by elapsed time. This gives a realized log-return variance rate q̂ₜ. Multiplying its square root by the latest price converts it into local price-unit volatility per √second. Returns are not demeaned in this zero-drift estimator.
This distinction matters: volatility is measured using log returns, but the forecast is a local arithmetic Gaussian model. It is not an exact lognormal pricing formula. The estimate is refreshed with new observations and held constant only within each forecast. The calculation uses the observed, timestamped path; it does not assume every second delivered a fresh report.
Why recent volatility changes UP/DOWN probabilities
Trading hours, participation, volume, order-book depth, news, and liquidations can change how much prices move. High volume does not automatically mean high volatility, and thin liquidity can produce large moves too. Volatility often clusters: an active recent period can contain information about the next one. A recent estimate can therefore be more useful than a fixed constant when conditions persist.
Suppose spot is 10 price units above K with 25 seconds left. At σ = 2, UP is about 84.1%; at σ = 4, it is about 69.1%. Higher volatility pulls the probability toward 50% in this model. Below K it raises UP probability instead. The derivative makes the direction explicit; φ is the standard normal density. The same reasoning applies to the TWAP mean’s distance from K.
A 1-minute window responds faster but is noisier. A 1-hour window smooths more observations but can lag a regime change; 5 minutes sits between them. Better volatility estimation can improve probability calibration, but shorter is not automatically better. Compare out-of-sample forecasts across hours and regimes, using tools such as Brier score or log loss.
What the model does—and what it leaves open
Despite the block’s name, Random-walk simulation, this implementation evaluates closed-form Gaussian probabilities; it does not need Monte Carlo paths. It uses the market’s matching resolution source and settlement definition, reconstructs the observed TWAP area with time-weighted trapezoids, and returns the current outcome’s probability. DOWN receives one minus UP.
Real markets can jump, have fat tails, or change volatility during the forecast. Estimated σ and reconstructed benchmark history are imperfect. The block requires sufficient recent history and checks source gaps and freshness; when required inputs are unavailable, its probability threshold does not pass. Those checks reduce unsupported decisions, but cannot make a misspecified model correct.
All of that becomes one building block
In Crypto Studio, add Random-walk simulation to a decision condition. Select the volatility history and a probability threshold, then connect the result to your strategy’s branches. The same idea can help decide whether to enter, keep waiting, or cancel as the estimated probability changes. The block resolves the supported market’s source, price to beat, timing, and TWAP treatment for you.
A likely outcome is not automatically a good trade: the executable contract price, fees, fill quality, and risk still matter. The companion Random-walk mispricing block compares model probability with a market quote in the intended trade direction. Its output is a model-implied difference to investigate, not proof of alpha.
The derivations, volatility history, settlement details, and missing-data checks are substantial work. On the canvas, the probability is one building block you can branch on systematically—and test as part of your own idea.

