research: bundle MacBook tier-1 pipeline into one bash script

scripts/run_tier1_macbook.sh wraps earnings resume, coverage probe, deep
snapshot rebuild, sector ETF refresh, and history-depth harness with phase flags.
This commit is contained in:
2026-07-19 09:34:49 +02:00
parent fa25b6ee68
commit 32bf9c9297
2 changed files with 187 additions and 32 deletions
+18 -32
View File
@@ -45,45 +45,31 @@ the 2018 vol shock and full 2020 crash (where the feed allows).
## MacBook runbook
Prefer the bundled script (one entry point):
```bash
# 0. Repo + env
git fetch origin
git checkout research/earnings-gap-and-sue # or history-depth branch once pushed
# ensure .env has ALPACA_* (and FMP if resuming earnings)
git fetch origin && git checkout research/earnings-gap-and-sue
# .env: ALPACA_* required; FMP_* if resuming earnings
# copy backtest_snapshots/prod.sqlite if not already local
# 1. (Optional) finish earnings backfill first — multi-day free tier
python scripts/backfill_earnings_events.py \
--snapshot backtest_snapshots/prod.sqlite \
--provider fmp --force-symbol --limit 250 --sleep 0.35
chmod +x scripts/run_tier1_macbook.sh
# 2. Coverage probe (before long rebuild)
python scripts/run_history_depth_research.py --phase coverage \
--snapshot backtest_snapshots/prod.sqlite
# Default: coverage → deep rebuild → harness (+ era split)
./scripts/run_tier1_macbook.sh
# 3. Full deep rebuild of research.sqlite (LONG — Alpaca per symbol)
# Clears prior completion manifest; writes complete=true only at end.
python scripts/extend_snapshot_universe.py \
--source backtest_snapshots/prod.sqlite \
--output backtest_snapshots/research.sqlite \
--force-copy \
--history-days 5000 \
--min-bars 260 \
--sleep 0.15
# Optional variants
./scripts/run_tier1_macbook.sh --all # + earnings resume first
./scripts/run_tier1_macbook.sh --earnings-only # multi-day FMP + 2a/2b only
./scripts/run_tier1_macbook.sh --harness-only # skip rebuild
./scripts/run_tier1_macbook.sh --coverage-only
# 4. Also refresh SPY + sector ETFs to the same depth on BOTH snapshots
python scripts/fetch_sector_etfs_to_snapshot.py \
--snapshot backtest_snapshots/research.sqlite --history-days 5000
python scripts/fetch_sector_etfs_to_snapshot.py \
--snapshot backtest_snapshots/prod.sqlite --history-days 5000
# 5. Harness + era split (after race guard passes)
python scripts/run_history_depth_research.py --phase harness \
--snapshot backtest_snapshots/research.sqlite \
--workers 8 --allow-spawn
# 6. Copy reports/ + docs/research/history-depth-extension.md results back
# Tunables
WORKERS=12 HISTORY_DAYS=5000 ./scripts/run_tier1_macbook.sh
./scripts/run_tier1_macbook.sh --workers 12 --fmp-limit 250
```
Then commit `reports/` + updated research docs, or copy them back to Windows.
---
## Data provenance