When markets crash, some corporate insiders start buying their own stock. The logic is simple: they know their business better than anyone, and if they are spending personal money while the stock is down 20%+, they may be seeing value that the market is missing. But does persistent insider buying during drawdowns actually predict higher forward returns? This study tests the hypothesis across every month from 2016 to 2024 where SPY was down 15% or more from its 52-week high.
The question
"For each month from 2016-2024, check if SPY is down 15% or more from its 52-week high. If yes, find stocks where insiders bought persistently - at least 4 months of purchases by 3 or more distinct buyers, excluding 10b5-1 scheduled plans - and the stock itself is down 20% or more. What were the 12-month forward returns?"
The generated SQL
Claude generated the following query automatically from the prompt above. This is the raw, unedited output - 70 lines of SQL with 6 CTEs, lateral joins, and insider transaction filtering.
WITH months AS (
SELECT (DATE '2016-01-31' + (i * INTERVAL '1 month'))::DATE AS month_end
FROM generate_series(0, 107) AS t(i)
WHERE (DATE '2016-01-31' + (i * INTERVAL '1 month'))::DATE <= DATE '2024-12-31'
),
spy_drawdown AS (
SELECT m.month_end,
entry.close AS spy_close,
hi.spy_high,
ROUND((1 - entry.close / NULLIF(hi.spy_high, 0)) * 100, 1) AS spy_dd_pct
FROM months m
INNER JOIN LATERAL (
SELECT close FROM shibui.stock_quotes
WHERE ticker = 'SPY' AND date <= m.month_end
ORDER BY date DESC LIMIT 1
) entry ON true
INNER JOIN LATERAL (
SELECT MAX(high) AS spy_high FROM shibui.stock_quotes
WHERE ticker = 'SPY'
AND date BETWEEN m.month_end - INTERVAL '52 weeks' AND m.month_end
) hi ON true
WHERE (1 - entry.close / NULLIF(hi.spy_high, 0)) >= 0.15
),
buy_signals AS (
SELECT t.issuer_symbol, sd.month_end,
COUNT(DISTINCT DATE_TRUNC('month', t.tx_date)) AS buying_months,
COUNT(DISTINCT t.owner_cik) AS unique_buyers
FROM shibui.insider_transactions t
CROSS JOIN spy_drawdown sd
INNER JOIN shibui.general_info g ON t.issuer_symbol = g.symbol
WHERE NOT t.is_superseded
AND NOT t.is_derivative
AND NOT t.is_10b5_1
AND t.security_title ILIKE '%common%'
AND t.tx_code = 'P'
AND t.price_per_share IS NOT NULL
AND t.tx_date BETWEEN sd.month_end - INTERVAL '12 months' AND sd.month_end
AND g.type = 'Common Stock'
GROUP BY t.issuer_symbol, sd.month_end
HAVING COUNT(DISTINCT DATE_TRUNC('month', t.tx_date)) >= 4
AND COUNT(DISTINCT t.owner_cik) >= 3
),
with_drawdown AS (
SELECT bs.*,
entry.close AS entry_price,
hi52.wk52_high
FROM buy_signals bs
INNER JOIN LATERAL (
SELECT close FROM shibui.stock_quotes
WHERE symbol = bs.issuer_symbol AND date <= bs.month_end
ORDER BY date DESC LIMIT 1
) entry ON true
INNER JOIN LATERAL (
SELECT MAX(high) AS wk52_high FROM shibui.stock_quotes
WHERE symbol = bs.issuer_symbol
AND date BETWEEN bs.month_end - INTERVAL '52 weeks' AND bs.month_end
) hi52 ON true
WHERE (1 - entry.close / NULLIF(hi52.wk52_high, 0)) >= 0.20
),
with_returns AS (
SELECT wd.month_end, wd.issuer_symbol, wd.entry_price, wd.unique_buyers,
sd.spy_dd_pct,
exit_p.close AS exit_price,
(exit_p.close - wd.entry_price) / NULLIF(wd.entry_price, 0) * 100 AS ret_12m,
spy_exit.close AS spy_exit_price,
(spy_exit.close - sd.spy_close) / NULLIF(sd.spy_close, 0) * 100 AS spy_ret_12m
FROM with_drawdown wd
INNER JOIN spy_drawdown sd ON wd.month_end = sd.month_end
INNER JOIN LATERAL (
SELECT close FROM shibui.stock_quotes
WHERE symbol = wd.issuer_symbol
AND date BETWEEN wd.month_end + INTERVAL '11 months'
AND wd.month_end + INTERVAL '13 months'
ORDER BY date DESC LIMIT 1
) exit_p ON true
INNER JOIN LATERAL (
SELECT close FROM shibui.stock_quotes
WHERE ticker = 'SPY'
AND date BETWEEN wd.month_end + INTERVAL '11 months'
AND wd.month_end + INTERVAL '13 months'
ORDER BY date DESC LIMIT 1
) spy_exit ON true
)
SELECT month_end, spy_dd_pct, COUNT(*) AS signals,
ROUND(COUNT(*) FILTER (WHERE ret_12m > 0) * 100.0 / COUNT(*), 0) AS win_pct,
ROUND(AVG(ret_12m), 1) AS avg_ret,
ROUND(MEDIAN(ret_12m), 1) AS med_ret,
ROUND(PERCENTILE_CONT(0.25) WITHIN GROUP (ORDER BY ret_12m), 1) AS p25,
ROUND(PERCENTILE_CONT(0.75) WITHIN GROUP (ORDER BY ret_12m), 1) AS p75,
ROUND(AVG(spy_ret_12m), 1) AS spy_12m,
ROUND(MEDIAN(ret_12m) - AVG(spy_ret_12m), 1) AS alpha
FROM with_returns
GROUP BY month_end, spy_dd_pct
ORDER BY month_end
LIMIT 50
The results
Ran in 1.1 seconds. Seven months qualified (SPY down 15%+ from its 52-week high):
| Month | SPY Drawdown | Signals | Win % | Avg Return | Median | P25 | P75 | SPY 12m | Alpha |
|---|---|---|---|---|---|---|---|---|---|
| 2020-03 | -24.0% | 227 | 96% | +220.5% | +89.9% | +46.0% | +185.6% | +61.9% | +28.0 pp |
| 2022-06 | -21.4% | 195 | 54% | +16.6% | +5.6% | -21.2% | +31.3% | +21.1% | -15.5 pp |
| 2022-08 | -17.7% | 171 | 36% | -7.5% | -11.0% | -34.2% | +11.3% | +8.2% | -19.1 pp |
| 2022-09 | -25.6% | 205 | 42% | -4.7% | -7.4% | -32.2% | +12.9% | +16.4% | -23.8 pp |
| 2022-10 | -19.5% | 184 | 44% | +1.2% | -5.8% | -34.1% | +22.4% | +18.2% | -24.0 pp |
| 2022-11 | -15.1% | 167 | 52% | +16.1% | +2.5% | -23.0% | +32.6% | +16.6% | -14.1 pp |
| 2022-12 | -20.3% | 172 | 48% | +12.9% | -2.4% | -27.2% | +27.4% | +26.3% | -28.7 pp |
What the data shows
The March 2020 COVID crash was the standout: 227 stocks met the criteria, 96% were higher a year later, and the median return was +89.9%. That is 28 percentage points of alpha over SPY. Insiders who bought during the fastest market crash in history were overwhelmingly right.
The 2022 bear market tells a different story. Across seven months of drawdown (June through December 2022), results were mixed. Win rates ranged from 36% to 54%, and median returns were mostly negative. The insider buying signal was not enough to overcome the broad market headwind of rising rates and margin compression. Stocks with heavy insider buying actually underperformed SPY in every 2022 month tested.
The takeaway: insider buying during crashes is a meaningful signal, but it is not a mechanical trading rule. It worked spectacularly during a sharp, V-shaped recovery (2020) and poorly during a prolonged, grinding bear market (2022). The signal may be more useful for identifying which stocks to research further rather than as a standalone buy list.
Methodology
- Data source: Shibui Finance, covering NYSE + NASDAQ, ~9,900 securities
- Insider transactions from SEC Forms 3/4/5. Excludes 10b5-1 pre-planned transactions, derivative transactions, and superseded filings.
- Signal criteria: SPY down 15%+ from 52-week high, stock down 20%+ from its own 52-week high, 4+ months of insider purchases by 3+ distinct buyers within the trailing 12 months.
- Forward returns computed over an 11-13 month window to account for trading day availability.
- Survivorship bias: delisted stocks are included in the signal count but may be missing forward price data. This biases returns toward survivors.
Frequently asked questions
How was this study run?
A single natural-language prompt to Claude with the Shibui Finance MCP connector. Claude generated the SQL automatically and returned the results in under 2 seconds. The full SQL is shown above on this page.
What counts as insider buying in this study?
Open-market purchases (transaction code P) of common stock by officers and directors, filed on SEC Forms 3, 4, and 5. The study excludes pre-planned 10b5-1 transactions, derivative exercises, and superseded filings to isolate genuine conviction buying.
Why exclude 10b5-1 plans?
10b5-1 plans are pre-scheduled transactions that do not reflect a real-time conviction signal. Including them would dilute the signal with non-informative noise. The study focuses on discretionary purchases where insiders actively chose to buy.
Can I reproduce this backtest?
Yes. Connect Shibui to Claude (free), paste the prompt shown above, and Claude will generate and run the query. Results update daily as new insider filings are processed from SEC EDGAR.
Is this financial advice?
No. This is a statistical study using historical data. Past performance does not predict future results. The study has known limitations including survivorship bias. Consult a licensed advisor before making investment decisions.
Data note: Results shown on this page were generated on a specific date and will change as new insider filings are processed and prices update. Connect Shibui to Claude and run the study yourself for current results. Data covers US equities (NYSE + NASDAQ), updated daily. This is a research tool, not financial advice.
Related studies:
- 10-Bagger Stocks: Drawdown Analysis - what eventual 100x stocks looked like on the way up
- Bollinger Band Breakout Strategy Backtest - testing a multi-signal momentum strategy
- Insider Buying Stocks Screener - current insider buying activity
- All Research Studies
Run your own backtest in 2 minutes
Shibui is free. Connect it to Claude and test any hypothesis against 64 years of US market data, insider transactions, and SEC filings.
Connect to Claude →