{"slug":"twap-vs-vwap-vs-pov-orders","qid":"volume_curve","label":"volume_curve","post_title":"twap-vs-vwap-vs-pov-orders","post_url":"/blog/twap-vs-vwap-vs-pov-orders#q-volume_curve","columns":["et_time","avg_volume_millions","vwap_share_pct","twap_share_pct"],"rows":[{"et_time":"09:30","avg_volume_millions":4.61,"vwap_share_pct":11.37,"twap_share_pct":7.69},{"et_time":"10:00","avg_volume_millions":3.33,"vwap_share_pct":8.22,"twap_share_pct":7.69},{"et_time":"10:30","avg_volume_millions":2.79,"vwap_share_pct":6.88,"twap_share_pct":7.69},{"et_time":"11:00","avg_volume_millions":2.47,"vwap_share_pct":6.08,"twap_share_pct":7.69},{"et_time":"11:30","avg_volume_millions":2.48,"vwap_share_pct":6.12,"twap_share_pct":7.69},{"et_time":"12:00","avg_volume_millions":2.2,"vwap_share_pct":5.42,"twap_share_pct":7.69},{"et_time":"12:30","avg_volume_millions":1.97,"vwap_share_pct":4.85,"twap_share_pct":7.69},{"et_time":"13:00","avg_volume_millions":2.04,"vwap_share_pct":5.04,"twap_share_pct":7.69},{"et_time":"13:30","avg_volume_millions":1.87,"vwap_share_pct":4.61,"twap_share_pct":7.69},{"et_time":"14:00","avg_volume_millions":2.28,"vwap_share_pct":5.63,"twap_share_pct":7.69},{"et_time":"14:30","avg_volume_millions":2.46,"vwap_share_pct":6.07,"twap_share_pct":7.69},{"et_time":"15:00","avg_volume_millions":3.14,"vwap_share_pct":7.76,"twap_share_pct":7.69},{"et_time":"15:30","avg_volume_millions":8.9,"vwap_share_pct":21.96,"twap_share_pct":7.69}],"shape":"series","sql":"WITH bars AS\n(\n    SELECT\n        toTimeZone(window_start, 'America/New_York')  AS et,\n        toHour(et) * 60 + toMinute(et)                AS minute_of_day,\n        toDate(et)                                    AS et_date,\n        toFloat64(volume)                             AS shares\n    FROM global_markets.delayed_stocks_minute_aggs\n    WHERE ticker = 'SPY'\n      AND window_start >= toDateTime('2026-06-01 00:00:00', 'UTC')\n      AND window_start <  toDateTime('2026-09-01 00:00:00', 'UTC')\n),\nper_bucket AS\n(\n    SELECT\n        formatDateTime(toStartOfInterval(et, INTERVAL 30 MINUTE), '%H:%i', 'America/New_York') AS et_time,\n        sum(shares)                                                                            AS bucket_shares,\n        countDistinct(et_date)                                                                 AS sessions\n    FROM bars\n    WHERE minute_of_day >= 570\n      AND minute_of_day <  960\n    GROUP BY et_time\n)\nSELECT\n    b.et_time                                          AS et_time,\n    round(b.bucket_shares / b.sessions / 1e6, 2)       AS avg_volume_millions,\n    round(100 * b.bucket_shares / t.window_shares, 2)  AS vwap_share_pct,\n    round(100 / t.bucket_count, 2)                     AS twap_share_pct\nFROM per_bucket AS b\nCROSS JOIN\n(\n    SELECT\n        sum(bucket_shares) AS window_shares,\n        count()            AS bucket_count\n    FROM per_bucket\n) AS t\nORDER BY et_time","computed_at":"2026-09-17T15:50:27.167204+00:00","elapsed":0.003758781}