rollDown function

Svi rollDown(
  1. Svi svi,
  2. double remainingMs,
  3. double anchorTteMs
)

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. 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 upProbability expects.

Implementation

Svi rollDown(Svi svi, double remainingMs, double anchorTteMs) {
  final frac = anchorTteMs > 0 ? remainingMs / anchorTteMs : 0.0;
  return Svi(
      a: svi.a * frac,
      b: svi.b * frac,
      rho: svi.rho,
      m: svi.m,
      sigma: svi.sigma);
}