Market Timing and Stock Picking

Two ways investors try to beat the S&P 500, tested with tidyquant

Phillip Vogt

2026-04-01

Two ways people try to beat the market

  1. Market timing: moving in and out at the “right” moments.
  2. Stock picking: holding a small group of stocks you believe in.

Both are tested here against the S&P 500 from April 2021 to April 2026.

Data and methods

Daily stock prices are pulled with tidyquant, an R package built around Yahoo Finance.

library(tidyquant)

prices <- tq_get("SPY",
                 from = "2021-04-01",
                 to   = Sys.Date())

Test 1: The cost of missing the wrong days

What if an investor missed only the market’s biggest up days?

To measure this, the number (N) of largest single day gains in SPY are replaced with zero modeling an investor who was not invested at all during those exact days. The total return is then compared to staying fully invested.

Test 1: A few days carry most of the return

Test 1: What this means

Out of roughly 1,260 trading days in five years, fewer than 25 carry most of the return.

Anyone trying to time the market runs the risk of missing these days. The penalty for being out of the market then is huge.

Test 2: Personal portfolio

Eight stocks, all held over the same window:

META, NVDA, AMZN, MSFT, LLY, V, BRK-B, KO

Test 2: Did the picks beat the market on returns?

Test 2: Risk vs. return at a glance

Test 2: What this means

The personal portfolio beat SPY on total return but only because it stayed invested through a much steeper drop in 2022.

Higher returns came with much higher risk. Most retail investors sell during big drops and miss the recovery.

Conclusions

Two main findings:

  1. Timing fails. The market’s best days can’t be predicted, and missing them destroys returns.
  2. Picking can outperform at a cost. Higher returns come with much higher risk.

The data supports long term investing in a broad index over trying to outsmart the market.

References

Dancho, M. (2024). tidyquant: Tidy Quantitative Financial Analysis. R package version 1.0.7. CRAN.

Dancho, M. (2024). Core Functions in tidyquant [package vignette]. CRAN.

Dancho, M. (2024). Performance Analysis with tidyquant [package vignette]. CRAN.

Price data accessed via Yahoo Finance through tq_get() at render time.

https://github.com/Phvogt3/tidyquant-lightning-talk

Phillip Vogt

Baylor University