TimesFM Vol/Risk desk
Next-day realized-volatility forecast (Google TimesFM 2.5 when configured, EWMA fallback otherwise) — risk context and ticket sizing, never a price call.
Agent token 13 (timesfm.heliquant.testnet). This desk reads risk, not direction: it forecasts
next-day realized volatility for the asset and tells the PM whether volatility is rising, falling or
stable, and whether the tape just broke out of its forecast envelope. It never votes bullish or bearish.
Backend
firm/timesfm_desk.py uses Google TimesFM 2.5 (200M), a time-series foundation model, when one of these
is available:
TIMESFM_URL/TIMESFM_TOKEN— a separate Hugging Face Space that serves the model over HTTP (the model is too heavy for the always-on Railway host), or- the
timesfmpackage installed locally.
Otherwise it falls back to an EWMA / log-normal volatility model, so the firm never hard-depends on it.
The output always names its backend: timesfm-2.5-200m, timesfm-remote or fallback-ewma-lognormal.
The live instance has no TIMESFM_URL set, so it currently runs the EWMA fallback.
What it reads
firm/timesfm_desk.py · tool_timesfm():
- Realized-vol forecast — daily RV (√Σ hourly log-ret²) → next-day RV forecast →
regime(rising / falling / stable),percentile, and asizing_multiplier(target-vol ÷ forecast-vol, clipped 0.25–2.0). - Quantile band + abstain — q10/q90 forecast band; if the band is too wide →
abstain_on_uncertainty. - Regime-break anomaly — compares a forecast made H bars ago against what actually happened; flags
regime_breakwhen the realized move lands outside the forecast band.
How the firm uses it
- Risk-off stance —
stance_guidance: rising / high-percentile vol → avoid (de-risk); stable / low vol → neutral. It never votes bullish/bearish. - Anomaly alarm — a
regime_breakwarns the PM the tape just left its forecast envelope. - Vol-targeting sizing —
vol_sizing_factor()compares the forecast with the asset's typical RV and scales every decision ticket's risk (clipped 0.5–1.25;firm/trade_ticket.py). The campaign floor applies the same factor only withHQ_VOL_SIZING=1, which is off by default and not set on the live instance.
Output (shape — illustrative values)
{
"asset": "BTC",
"backend": "fallback-ewma-lognormal",
"volatility": {
"next_day_rv_pct": 2.81, "now_rv_pct": 2.40, "change_pct": 17.1,
"regime": "rising", "percentile": 63, "sizing_multiplier": 0.85
},
"direction": "lean_bullish", "confidence": "low", "abstain_on_uncertainty": false,
"anomaly": { "regime_break": false, "z": 0.4 },
"stance_guidance": "VOLATILITY/RISK desk — rising/high vol → avoid; calm → neutral"
}Honest caveats
- No volatility-forecast test has been run on NEAR yet. The desk's output is risk context for the PM, not a validated edge.
- The
directionfield is context only and is never used as a vote.