declare namespace pricing_d_exports { export { BoardPricer, PricerInputs, Svi, boardPricer, downProbability, forward, probability, rangeProbability, rollDown, strikeAtProbability, upProbability }; } /** Rolled-down SVI parameters for one expiry, in decimal (NOT the chain's 1e9/1e18 integer * scaling) — the surface AFTER Predict's remaining-time roll-down, as carried by the * on-chain `Pricer`. `a`, `rho`, `m` are signed; `b`, `sigma` are non-negative. */ interface Svi { a: number; b: number; rho: number; m: number; sigma: number; } /** A resolved pricer snapshot: the forward the contract prices against and its rolled SVI * surface, both in decimal. Produced by `read.pricer(market)`; consume via {@link boardPricer} * or the pure functions below. */ interface PricerInputs { /** Forward price the digital settles against, in decimal (same units as `strike`). */ forward: number; svi: Svi; } /** P(settle > strike) — the UP digital, with the SVI skew correction. `inputs.svi` is the * already-rolled surface (no roll-down applied here). `forward` and `strike` share units. * Returns a probability in [0, 1]. */ declare function upProbability(inputs: PricerInputs, strike: number): number; /** P(settle < strike) — the DOWN digital. Exactly `1 − up`, matching the chain's * `range_price(-inf, strike] = up(-inf) − up(strike) = 1 − up(strike)`. */ declare function downProbability(inputs: PricerInputs, strike: number): number; /** Probability mass in `(lower, higher]`, floored at 0 (matches `compute_range_price`'s * saturating subtraction). Use `lower <= 0` for the −∞ bound and `higher = Infinity` for +∞. */ declare function rangeProbability(inputs: PricerInputs, lower: number, higher: number): number; /** Binary probability at `strike` for the given side (`up` = P(>strike), `down` = 1 − up). */ declare function probability(inputs: PricerInputs, strike: number, side: 'up' | 'down'): number; /** Strike where P(settle > strike) = `p`, by bisection (UP is monotone-decreasing in * strike). Null when no crossing exists within ±64% of forward. */ declare function strikeAtProbability(inputs: PricerInputs, p: number): number | null; /** Roll `a` and `b` down by the fraction of anchored time remaining, matching the chain's * `roll_down_svi` (variance decays toward expiry). `remainingMs` = expiry − now; * `anchorTteMs` = expiry − the SVI observation's **provider `svi_timestamp`** (its per-update * source timestamp) — the same clock the freshness gate accepts, and what the chain anchors on * (`pricing.move`: "One clock serves every job"). Anchoring on the batch's ingestion time * instead rolls by the wrong fraction. `read.pricer` avoids the question entirely (the chain * has already rolled). `rho`, `m`, `sigma` are unchanged. Feed an UNrolled provider surface; * the result is what {@link upProbability} expects. */ declare function rollDown(svi: Svi, remainingMs: number, anchorTteMs: number): Svi; /** The forward the contract prices against: Pyth spot re-anchored by the Block-Scholes * basis (`spot · forward/bsSpot`), falling back to the Block-Scholes forward when Pyth is * absent. Pass `pythSpot <= 0` to force the fallback. NOTE: on-chain this branch is also * gated by the admin flag `use_pyth_spot_for_forward` (default on) and a Pyth freshness * window — when the flag is off or the Pyth spot is stale, the chain uses `bsForward`. If * you track that config/freshness, apply it before calling (or use `read.pricer`, which * gets the resolved forward from the chain). */ declare function forward(pythSpot: number, bsSpot: number, bsForward: number): number; /** A pricer bound to one resolved snapshot: price a whole board of strikes locally, no * chain calls. Returned by `read.pricer(market)`; also constructable directly from inputs * you already hold (e.g. from a `Pricer` snapshot decoded elsewhere). */ interface BoardPricer extends PricerInputs { /** P(settle > strike). */ up(strike: number): number; /** P(settle < strike) = 1 − up. */ down(strike: number): number; /** P(side wins at strike). */ probability(strike: number, side: 'up' | 'down'): number; /** Probability mass in `(lower, higher]` (use `lower<=0`/`higher=Infinity` for the tails). */ range(lower: number, higher: number): number; /** Strike where P(> strike) = `p`, or null if outside ±64% of forward. */ strikeAtProbability(p: number): number | null; } /** Build a {@link BoardPricer} from a resolved snapshot (decimal forward + rolled SVI). Pure. */ declare function boardPricer(inputs: PricerInputs): BoardPricer; //#endregion export { BoardPricer, PricerInputs, pricing_d_exports }; //# sourceMappingURL=pricing.d.mts.map