{"slug":"how-monthly-returns-are-measured","qid":"spy_monthly_path","label":"SPY monthly close-to-close returns: twelve months ending June 2026, simple and log","post_title":"How Monthly Stock Returns Are Measured","post_url":"/blog/how-monthly-returns-are-measured#q-spy_monthly_path","columns":["month","month_final_close","simple_return_pct","log_return_pct"],"rows":[{"month":"2025-07","month_final_close":631.97,"simple_return_pct":2.28,"log_return_pct":2.25},{"month":"2025-08","month_final_close":645.04,"simple_return_pct":2.07,"log_return_pct":2.05},{"month":"2025-09","month_final_close":666.11,"simple_return_pct":3.27,"log_return_pct":3.21},{"month":"2025-10","month_final_close":681.99,"simple_return_pct":2.38,"log_return_pct":2.36},{"month":"2025-11","month_final_close":683.39,"simple_return_pct":0.21,"log_return_pct":0.21},{"month":"2025-12","month_final_close":681.84,"simple_return_pct":-0.23,"log_return_pct":-0.23},{"month":"2026-01","month_final_close":691.85,"simple_return_pct":1.47,"log_return_pct":1.46},{"month":"2026-02","month_final_close":686.23,"simple_return_pct":-0.81,"log_return_pct":-0.82},{"month":"2026-03","month_final_close":650.24,"simple_return_pct":-5.25,"log_return_pct":-5.39},{"month":"2026-04","month_final_close":718.43,"simple_return_pct":10.49,"log_return_pct":9.97},{"month":"2026-05","month_final_close":756.4,"simple_return_pct":5.29,"log_return_pct":5.15},{"month":"2026-06","month_final_close":746.32,"simple_return_pct":-1.33,"log_return_pct":-1.34}],"shape":"series","sql":"WITH daily AS (\n    SELECT toDate(toTimeZone(window_start, 'America/New_York')) AS day,\n           argMaxIf(toFloat64(close), window_start,\n               toTimeZone(window_start, 'America/New_York') >= toDateTime(concat(toString(toDate(toTimeZone(window_start, 'America/New_York'))), ' 09:30:00'), 'America/New_York')\n               AND toTimeZone(window_start, 'America/New_York') < toDateTime(concat(toString(toDate(toTimeZone(window_start, 'America/New_York'))), ' 16:00:00'), 'America/New_York')) AS cl\n    FROM global_markets.delayed_stocks_minute_aggs\n    WHERE ticker = 'SPY'\n      AND window_start >= '2025-06-24 04:00:00'\n      AND window_start < '2026-07-01 08:00:00'\n    GROUP BY day\n),\nmonthly AS (\n    SELECT toStartOfMonth(day) AS month_start,\n           argMax(cl, day) AS month_close\n    FROM daily\n    GROUP BY month_start\n),\nrets AS (\n    SELECT month_start,\n           formatDateTime(month_start, '%Y-%m') AS month,\n           round(month_close, 2) AS month_final_close,\n           100 * (month_close / lagInFrame(month_close) OVER (ORDER BY month_start) - 1) AS r\n    FROM monthly\n)\nSELECT month,\n       month_final_close,\n       round(r, 2) AS simple_return_pct,\n       round(100 * log(1 + r / 100), 2) AS log_return_pct\nFROM rets\nWHERE isFinite(r)\nORDER BY month_start","computed_at":"2026-07-26T05:37:28.939504+00:00","elapsed":0.47056117}