Buy-and-hold SPY: the same rule, scored year by year
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-09-22, from The Open-Source TradingView Optimizer.
| year | spy_sharpe |
|---|---|
| 2016 | 0.77 |
| 2017 | 2.67 |
| 2018 | -0.3 |
| 2019 | 2.08 |
| 2020 | 0.62 |
| 2021 | 1.9 |
| 2022 | -0.78 |
| 2023 | 1.73 |
| 2024 | 1.73 |
- Rows × columns
- 9 × 2
- Computed
- Completeness
- No missing values
- Source
- US exchange, SIP and OPRA market data
- Licence
- Strasmore terms · free, no signup
What each column holds
| Column | Type | Range | Notes |
|---|---|---|---|
year |
text | 9 distinct values (2016, 2017, 2018…) | |
spy_sharpe |
number | -0.78 to 2.67 |
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.
Run it yourself
This is the exact query behind the result above. Change a ticker, a date or a column and run it against the warehouse — no account, no key. The no-signup tier is smaller than the one this page was computed on; a query that reaches past it comes back saying which plan runs it.
WITH daily AS
(
SELECT
d,
px / prev_px - 1 AS ret
FROM
(
SELECT
date AS d,
toFloat64(close) AS px,
lagInFrame(toFloat64(close)) OVER (ORDER BY date ASC ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) AS prev_px
FROM global_markets.stocks_daily_aggs
WHERE ticker = 'SPY'
AND date >= '2015-12-31'
AND date <= '2024-12-31'
)
WHERE prev_px > 0
)
SELECT
toString(toYear(d)) AS year,
round(avg(ret) / stddevPop(ret) * sqrt(252), 2) AS spy_sharpe
FROM daily
GROUP BY year
ORDER BY year
Work with this data in your AI assistant
Opens ready to query, with this page's data. Free, no account.