{"slug":"how-mutual-fund-nav-is-calculated","qid":"vol_by_bucket","label":"Share of SPY's session volume by half hour, June 2026 average","post_title":"How Mutual Fund NAV Is Calculated: Example","post_url":"/blog/how-mutual-fund-nav-is-calculated#q-vol_by_bucket","columns":["et_time","share_of_volume_pct"],"rows":[{"et_time":"09:30","share_of_volume_pct":11.24},{"et_time":"10:00","share_of_volume_pct":7.73},{"et_time":"10:30","share_of_volume_pct":6.28},{"et_time":"11:00","share_of_volume_pct":5.7},{"et_time":"11:30","share_of_volume_pct":6.72},{"et_time":"12:00","share_of_volume_pct":5},{"et_time":"12:30","share_of_volume_pct":4.64},{"et_time":"13:00","share_of_volume_pct":5.02},{"et_time":"13:30","share_of_volume_pct":5.08},{"et_time":"14:00","share_of_volume_pct":5.92},{"et_time":"14:30","share_of_volume_pct":6.31},{"et_time":"15:00","share_of_volume_pct":8.45},{"et_time":"15:30","share_of_volume_pct":21.92}],"shape":"series","sql":"WITH minute_bars AS\n(\n    SELECT\n        toDate(toTimeZone(window_start, 'America/New_York')) AS session_date,\n        formatDateTime(\n            toStartOfInterval(toTimeZone(window_start, 'America/New_York'), INTERVAL 30 MINUTE),\n            '%H:%i')                                         AS et_time,\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-07-01 00:00:00', 'UTC')\n      AND (toHour(toTimeZone(window_start, 'America/New_York')) * 60\n           + toMinute(toTimeZone(window_start, 'America/New_York'))) >= 570\n      AND (toHour(toTimeZone(window_start, 'America/New_York')) * 60\n           + toMinute(toTimeZone(window_start, 'America/New_York'))) < 960\n),\nbucket_totals AS\n(\n    SELECT session_date, et_time, sum(shares) AS bucket_shares\n    FROM minute_bars\n    GROUP BY session_date, et_time\n),\nsession_totals AS\n(\n    SELECT session_date, sum(bucket_shares) AS session_shares\n    FROM bucket_totals\n    GROUP BY session_date\n)\nSELECT\n    b.et_time                                               AS et_time,\n    round(avg(b.bucket_shares / s.session_shares) * 100, 2) AS share_of_volume_pct\nFROM bucket_totals AS b\nINNER JOIN session_totals AS s ON s.session_date = b.session_date\nGROUP BY b.et_time\nORDER BY b.et_time","computed_at":"2026-08-06T04:19:16.183512+00:00","elapsed":0.003554266}