Cost Basis Methods: FIFO vs Specific ID
Cheapest to dearest monthly lot in 2024, five household tickersranking ·
2026-08-09 · 5×3
Twelve monthly AAPL lots, first regular session of each month of 2024series ·
2026-08-09 · 12×3
Realized gain per share on each 2024 lot, sold at the same June 2025 priceseries ·
2026-08-09 · 12×3
Cheapest to dearest monthly lot in 2024, five household tickers
Cheapest to dearest monthly lot in 2024, five household tickers
| symbol | lot_price_band | spread_pct |
|---|---|---|
| AAPL | $169.3 to $239.59 | 41.5 |
| SPY | $472.65 to $603.63 | 27.7 |
| MSFT | $370.87 to $456.73 | 23.2 |
| KO | $59.53 to $73.01 | 22.6 |
| JNJ | $146.44 to $167.16 | 14.1 |
the exact SQL behind every number
SELECT
ticker AS symbol,
concat('$', toString(round(min(lot_price), 2)),
' to $', toString(round(max(lot_price), 2))) AS lot_price_band,
round(100 * (max(lot_price) / min(lot_price) - 1), 1) AS spread_pct
FROM
(
SELECT
ticker,
toStartOfMonth(date) AS month,
toFloat64(argMin(close, date)) AS lot_price
FROM global_markets.stocks_daily_aggs
WHERE ticker IN ('AAPL', 'MSFT', 'SPY', 'KO', 'JNJ')
AND date >= '2024-01-01'
AND date < '2025-01-01'
GROUP BY ticker, month
)
GROUP BY ticker
ORDER BY spread_pct DESC
More from this analysisCost Basis Methods: FIFO vs Specific ID
Twelve monthly AAPL lots, first regular session of each month of 2024
series 12×3
→
Realized gain per share on each 2024 lot, sold at the same June 2025 price
series 12×3
→
Average call and put delta by strike distance, AAPL, 20 to 45 days to expiry, June 2026
ranking 5×4
→
One full 61 day wash sale window on the tape: AAPL, Dec 1 2025 through Jan 30 2026
series 42×3
→
See all 2,173 queries →