Volatility measurement method
Version 1.0. Normative.
The keeper reports a volatility measurement when it opens an auction. The contract uses the report to derive a proposed strike distance. The contract then clamps that distance inside governance rails.
This page specifies the input data, recursion, annualization, weekly conversion, rounding, and output scale.
The method has no estimation step. It is deterministic arithmetic on public closing prices.
1. Definitions
- Close: the official daily closing price on the underlying's primary exchange.
- Market date: the trading date of that exchange in New York time.
- Return: the natural logarithm of the ratio of two consecutive closes.
- Variance: the exponentially weighted estimate of squared daily returns.
- Annual sigma: annualized volatility as a decimal.
- Weekly sigma: seven-day volatility as a decimal.
- Basis point: 0.01%. The output uses 10,000 basis points per 1.0.
2. Input data rules
- Use one close per trading day.
- Order closes by market date, ascending.
- Use the official close of the primary exchange.
- A public mirror is permitted.
- End the series at the last close before measurement time.
- Use at least 21 closes.
- Use every close in the committed series.
- Do not truncate early history.
- A market holiday has no row. This is not a data gap.
- Commit the exact input series before measurement.
- Publish the SHA-256 of the input snapshot.
- If the source reports a split or dividend inside the window, use adjusted closes and commit a new snapshot.
3. Constants and arithmetic
| Constant | Value |
|---|---|
| Lambda | 0.94 |
| Seed window | 20 returns |
| Trading days per year | 252 |
| Days per year | 365 |
| Weekly round length | 7 days |
Use IEEE-754 double-precision arithmetic.
Do not round an intermediate value. Round only the final output.
4. Computation
Let C_0 through C_n be the closing prices.
Step 1: daily log returns
For t = 1 through n:
r_t = ln(C_t / C_{t-1})
Step 2: seed variance
Use the first 20 returns:
v_20 = (1 / 20) × sum(r_t² for t = 1 through 20)
Use a zero mean return.
Step 3: update variance
For t = 21 through n:
v_t = 0.94 × v_{t-1} + 0.06 × r_t²
Step 4: annualize
sigma_ann = sqrt(v_n × 252)
Step 5: convert to seven days
sigma_week = sigma_ann × sqrt(7 / 365)
Step 6: produce the report
sigmaWeekBps = round(sigma_week × 10,000)
Round to the nearest integer. Round halves away from zero. This is the only rounding step.
Proposed strike distance
The keeper derives:
proposedDistanceBps = round(sigmaWeekBps × strikeSigmaK / 10,000)
strikeSigmaK is a governance parameter scaled by 10,000. A value of 10,800 represents 1.08.
The contract then applies its floor, ceiling, and maximum-change rails.
5. Worked TSLA example
Input snapshot: 556 daily closes from 2024-05-01 through 2026-07-21.
sha256: e57d451299fd0abccaadaf52b472c59ef4a1138f4f1077bad46f1d44c43c0904
| Step | Value |
|---|---|
| Last close | 378.93 |
| Return count | 555 |
| First return | 0.00011111111122521166 |
| Final return | 0.025011323812001267 |
| Seed variance | 0.0006642174942174634 |
| Final variance | 0.0010471343304365042 |
| Annual sigma | 0.5136904235724071 |
| Weekly sigma | 0.07113839413598368 |
sigmaWeekBps | 711 |
Distance at strikeSigmaK = 10,800 | 768 |
An implementation conforms when it produces these values from the same snapshot.
6. Method reference and versioning
- The canonical reference uses UTF-8 bytes.
- The on-chain
volatilityMethodRefstores the SHA-256 of those canonical bytes. - Governance changes the reference through its timelock.
- Any byte change produces a new hash.
- A normative rule change increments the method version.
- An editorial change can keep the version but still changes the hash.
- A verifier computes the canonical hash and compares it with the on-chain reference.
Normative rules are the input rules, computation, versioning, failure rules, and conformance rule.
7. Failure rules
A data gap exists when:
- the source is unavailable;
- a market-open date has no row;
- a close is missing, zero, negative, or not a number;
- the series has fewer than 21 closes;
- a split or dividend invalidates unadjusted closes; or
- the input snapshot hash does not match its commitment.
When a data gap exists:
- do not report a sigma;
- call the no-report auction-open form;
- let the contract use the previous weekly distance;
- do not interpolate a close;
- do not extrapolate a close;
- do not reuse an old sigma; and
- record the public failure reason and input hash.
Never invent a sigma.
8. Conformance
An implementation conforms to version 1.0 when it reproduces the worked example exactly from the same committed snapshot.
It must expose the intermediate values so another operator can compare every step.