Financial Services

A quantitative hedge fund runs a $2.8B equity portfolio across 1,200 positions. Their risk desk needs intraday Value-at-Risk updated every 30 seconds as market prices move — not the overnight batch VaR that's 16 hours stale by market open.

Overnight VaR missed a $14M intraday drawdown last quarter because the model didn't reflect the morning's volatility spike until the next day.
LIVEmarket_ticks
tickerpricevolumebidaskts
NVDA878.35142300878.3878.42024-03-15T14:30:01.112Z
NVDA862.18389700862.1862.252024-03-15T14:30:31.204Z
NVDA841.45612400841.3841.62024-03-15T14:31:01.087Z
AAPL173.2285400173.2173.252024-03-15T14:30:01.318Z
AAPL172.9891200172.951732024-03-15T14:30:31.442Z
TSLA162.87204100162.8162.92024-03-15T14:30:01.507Z
Streaming SQLRunning
Compute 30-second rolling volatility per ticker
CREATE MATERIALIZED VIEW ticker_volatility AS
SELECT
  ticker,
  window_start,
  COUNT(*) AS tick_count,
  AVG(price) AS avg_price,
  STDDEV_SAMP(price) / AVG(price) AS realized_vol,
  (MAX(price) - MIN(price)) / AVG(price) AS price_range_pct,
  LAST_VALUE(price ORDER BY ts) AS last_price,
  (LAST_VALUE(price ORDER BY ts) - FIRST_VALUE(price ORDER BY ts))
    / FIRST_VALUE(price ORDER BY ts) AS return_30s
FROM TUMBLE(market_ticks, ts, INTERVAL '30 SECONDS')
GROUP BY ticker, window_start;
Aggregate portfolio VaR using position weights
portfolio_varauto-updating
portfoliovar_95var_99total_exposurelargest_contributorupdated_at
GLOBAL_EQUITY_ALPHA27.138.32847.2NVDA2024-03-15T14:31:00.000Z
SECTOR_ROTATION_B8.411.9612.5NVDA2024-03-15T14:31:00.000Z
RisingWave recalculates portfolio VaR every 30 seconds. When NVDA drops 4.2% in 10 minutes, the desk sees the portfolio's 95% VaR jump from $18.3M to $27.1M within one update cycle.
Best-in-Class Event Streaming
for Agents, Apps, and Analytics
GitHubXLinkedInSlackYouTube
Sign up for our to stay updated.