STRASMORE/EXPLORE 2,173 QUERIES

Monthly return, monthly risk-free rate and the excess, 2020 to 2024

Answered against 22 years of US equities and 12 years of US options data and published with the query that produced it. This result is stored as of 2026-08-14, from Risk-free rate in the Sharpe ratio.

as of series 60×4read in context →
Monthly return, monthly risk-free rate and the excess, 2020 to 2024 — 60 rows by 4 columns, computed from US exchange, SIP and OPRA data.
monthspy_ret_pctrf_pctexcess_pct
2020-01-01-0.040.128-0.17
2020-02-01-7.920.128-8.04
2020-03-01-130.025-13.02
2020-04-0112.70.01212.69
2020-05-014.760.0114.75
2020-06-011.330.0131.31
2020-07-015.890.0115.88
2020-08-016.980.0096.97
2020-09-01-4.130.009-4.14
2020-10-01-2.490.008-2.5
2020-11-0110.880.00810.87
2020-12-013.260.0073.26
2021-01-01-1.020.007-1.03
2021-02-012.780.0042.78
2021-03-014.20.0034.2
2021-04-015.290.0025.29
2021-05-010.660.0010.66
2021-06-011.910.0031.91
2021-07-012.440.0042.44
2021-08-012.980.0052.97
2021-09-01-4.970.003-4.97
2021-10-017.020.0047.01
2021-11-01-0.80.004-0.81
2021-12-014.260.0054.25
2022-01-01-5.270.012-5.29
2022-02-01-2.950.026-2.98
2022-03-013.440.0373.4
2022-04-01-8.780.063-8.84
2022-05-010.230.0820.14
2022-06-01-8.640.127-8.77
2022-07-019.210.199.02
2022-08-01-4.080.224-4.3
2022-09-01-9.620.265-9.88
2022-10-018.130.3177.81
2022-11-015.560.3535.21
2022-12-01-6.190.356-6.55
2023-01-016.290.3825.91
2023-02-01-2.510.39-2.9
2023-03-013.310.3962.92
2023-04-011.60.4131.18
2023-05-010.460.4320.03
2023-06-016.090.445.65
2023-07-013.270.4462.83
2023-08-01-1.630.452-2.08
2023-09-01-5.080.452-5.53
2023-10-01-2.170.455-2.63
2023-11-019.130.4498.69
2023-12-014.140.4433.7
2024-01-011.590.4441.15
2024-02-015.220.4424.78
2024-03-012.950.4452.51
2024-04-01-4.030.443-4.47
2024-05-015.060.4444.61
2024-06-013.20.4482.75
2024-07-011.210.4420.77
2024-08-012.340.4311.91
2024-09-011.790.4011.39
2024-10-01-0.890.385-1.28
2024-11-015.960.3775.59
2024-12-01-2.730.359-3.09
Rows × columns
60 × 4
Period covered
to
Computed
Completeness
No missing values
Source
US exchange, SIP and OPRA market data
Licence
Strasmore terms · free, no signup
Formats
JSON · CSV · the SQL below

What each column holds

Column definitions for Monthly return, monthly risk-free rate and the excess, 2020 to 2024, derived from the stored result.
ColumnTypeRangeNotes
month date 2020-01-01 to 2024-12-01
spy_ret_pct number -13 to 12.7 percent
rf_pct number 0.001 to 0.455 percent
excess_pct number -13.02 to 12.69 percent

Computed from Strasmore's warehouse of US exchange, SIP and OPRA market data. Equity prices are delayed; options greeks and implied volatility are end-of-day. This result is stored, not recomputed on load — it is exactly the numbers that were returned on , and the query below is what returned them.

the exact SQL behind every number
WITH
    monthly_px AS
    (
        SELECT
            toStartOfMonth(date)           AS m,
            argMax(toFloat64(close), date) AS month_close
        FROM global_markets.stocks_daily_aggs
        WHERE ticker = 'SPY'
          AND date >= '2019-12-01'
          AND date <  '2025-01-01'
        GROUP BY m
    ),
    prior_px AS
    (
        SELECT
            addMonths(m, 1) AS m,
            month_close     AS prev_close
        FROM monthly_px
    ),
    monthly_rf AS
    (
        SELECT
            toStartOfMonth(date)                                       AS m,
            pow(1 + avg(toFloat64(yield_3_month)) / 100, 1.0 / 12) - 1 AS rf_month
        FROM global_markets.treasury_yields
        WHERE date >= '2019-12-01'
          AND date <  '2025-01-01'
          AND yield_3_month IS NOT NULL
        GROUP BY m
    )
SELECT
    toString(cur.m)                                                      AS month,
    round(100 * (cur.month_close / prv.prev_close - 1), 2)               AS spy_ret_pct,
    round(100 * rf.rf_month, 3)                                          AS rf_pct,
    round(100 * (cur.month_close / prv.prev_close - 1 - rf.rf_month), 2) AS excess_pct
FROM monthly_px AS cur
INNER JOIN prior_px AS prv ON prv.m = cur.m
INNER JOIN monthly_rf AS rf ON rf.m = cur.m
ORDER BY cur.m

Run your own version of this

The same 22 years of US equities and 12 years of options data are queryable in SQL or plain English. A free account runs 100 queries a day and takes no card.

More from this analysisRisk-free rate in the Sharpe ratio
Three-month Treasury bill yield by calendar year ranking 22×4 Annualized risk premium: subtract monthly, or annualize each leg first ranking 5×4 Sharpe ratio on a matched rate series against one fixed rate ranking 5×4 Dividend yield by ticker vs the 3-month Treasury bill (flat line) ranking 15×3 One position, one year at a time: SPY annualized Sharpe by calendar year table 14×5 SPY annualized Sharpe ratio, year by year, fixed 4.25% assumed rate ranking 10×3 See all 2,173 queries →