Close the risk book while the market is open.
The Monday reality: positions in one workbook, FX in a terminal, VaR in a Python job someone reruns by hand, and a PDF at 4pm. In Grid it's one model — live FX, revalued positions, VaR three ways — computing continuously, with an API your other systems read directly.
Monday morning, as source.
# live inputs, with a floor under them eur_usd = FX_RATE("EUR", "USD") rate = eur_usd DEFAULT 1.08 # the book, revalued as rates move mv_usd = notionals * prices * rate # risk, three ways, same cells var_hist = VAR_HISTORICAL(returns, 0.95) var_mc = VAR_MONTE_CARLO(returns, 0.95, 10, 100000) sharpe = SHARPE(returns, 0.02, 252) # never stale for the 9am call EVERY 15min SKIP MISSED THEN refresh_stamp = NOW() END
Every function here is in the catalog; DEFAULT keeps the book computing while a quote is in flight, and the schedule declares what happens to missed runs.
Live data with a floor
External functions carry declared cache and staleness policies; ?= keeps the last good value so a transient failure never blanks the book.
How live data works →The warehouse is a range
Native SELECT with joins and window functions, pushed down to BigQuery, Snowflake, Redshift, or Databricks — trade history without an export step.
Relational authoring →Schedules with a contract
EVERY schedules must declare a missed-run policy — SKIP MISSED or BACKFILL — so a laptop lid closing never silently skips a mark.
Rules & schedules →