Data Engineering · Machine Learning
SignalFiveMachine Learning & Financial Time-Series Analytics
Is the market's next five days predictable? A pipeline built to find out honestly.
Automated daily OHLCV ETL for five securities from 2010 onward, with backfills, deduplication and provenance tracking, feeding leakage-aware walk-forward benchmarks of logistic regression, random forest and CatBoost.
- Timeline
- Mar — Apr 2026
- Status
- Runs every weekday
- Stack
- PythonPandasNumPyScikit-learnCatBoostGitHub Actions
- 2010→
- historical backfill
- 5
- symbols tracked daily
- 4
- models vs baseline
- 5-day
- train/test gap
The problem
Why I built it
Most stock-prediction projects quietly leak the future into training and report accuracy that wouldn't survive a real trading day. I wanted an experiment where a model only counts as useful if it beats simple baselines on unseen periods after transaction costs.
How it works
From input to result
- 01
Ingest
Every weekday after close, GitHub Actions pulls daily OHLCV for SPY, QQQ, IWM, AAPL and NVDA, re-fetching a 7-day overlap so corrections replace stale rows.
- 02
Validate
Malformed dates, duplicates, invalid prices and inconsistent OHLC rows are rejected; every row records its source.
- 03
Feature
Lag-safe features only: returns, range, 20/50-day moving averages, 20-day volatility, volume change.
- 04
Evaluate
Majority baseline, logistic regression, random forest and CatBoost under expanding walk-forward splits.
- 05
Backtest
One prediction every five sessions, a 0.55 probability threshold, and 5 bps cost on each position change, compared with buy-and-hold.
Engineering
Decisions worth talking about
A gap between train and test
A five-session gap between folds stops a training label whose outcome overlaps the test period from leaking information.
Commit only when data changes
The workflow writes deterministic CSVs and data-quality metadata, and commits only when the dataset actually changed, so history stays meaningful.
Limits & next
What it can't do yet
- Results are exploratory and educational, not trading advice. Overlapping labels, regime changes, slippage and unadjusted prices can all move the conclusions.